public IPropertyDescriptor[] getPropertyDescriptors() { List<IPropertyDescriptor> resultList = new ArrayList<IPropertyDescriptor>(); PropertyDescriptor desc = new PropertyDescriptor( ConfigConstants.CONFIG_KEY_MERGE, UIText.BranchPropertySource_UpstreamBranchDescriptor); desc.setCategory(UIText.BranchPropertySource_UpstreamConfigurationCategory); resultList.add(desc); desc = new PropertyDescriptor(ConfigConstants.CONFIG_KEY_REMOTE, UIText.BranchPropertySource_RemoteDescriptor); desc.setCategory(UIText.BranchPropertySource_UpstreamConfigurationCategory); resultList.add(desc); desc = new PropertyDescriptor(ConfigConstants.CONFIG_KEY_REBASE, UIText.BranchPropertySource_RebaseDescriptor); desc.setCategory(UIText.BranchPropertySource_UpstreamConfigurationCategory); resultList.add(desc); return resultList.toArray(new IPropertyDescriptor[0]); }
/** * The <code>SimplePropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method returns true if the other * property has the same id and category and <code>getAlwaysIncompatible()</code> * returns false */ @Override public boolean isCompatibleWith(IPropertyDescriptor anotherProperty) { if (getAlwaysIncompatible()) { return false; } // Compare id Object id1 = getId(); Object id2 = anotherProperty.getId(); if (!id1.equals(id2)) { return false; } // Compare Category (may be null) if (getCategory() == null) { if (anotherProperty.getCategory() != null) { return false; } } else { if (!getCategory().equals(anotherProperty.getCategory())) { return false; } } return true; }
final PropertyDescriptor pd = new PropertyDescriptor ( Properties.URI, Messages.PropertySourceWrapper_UriName ); pd.setCategory ( CAT_CONNECTION_INFORMATION ); pd.setDescription ( Messages.PropertySourceWrapper_UriDesc ); properties.add ( pd ); final PropertyDescriptor pd = new PropertyDescriptor ( Properties.ID, Messages.PropertySourceWrapper_IdName ); pd.setCategory ( CAT_CONNECTION_INFORMATION ); pd.setDescription ( Messages.PropertySourceWrapper_IdDesc ); properties.add ( pd ); final PropertyDescriptor pd = new PropertyDescriptor ( Properties.INTERFACES, Messages.PropertySourceWrapper_InterfacesName ); pd.setCategory ( CAT_CONNECTION_SERVICE ); pd.setDescription ( Messages.PropertySourceWrapper_InterfacesDesc ); properties.add ( pd ); final PropertyDescriptor pd = new PropertyDescriptor ( Properties.STATE, Messages.PropertySourceWrapper_StateName ); pd.setCategory ( CAT_CONNECTION_STATE ); pd.setDescription ( Messages.PropertySourceWrapper_StateDesc ); properties.add ( pd ); final PropertyDescriptor pd = new PropertyDescriptor ( new SessionPropertyDescriptor ( key ), key ); pd.setCategory ( CAT_SESSION_PROPERTIES ); properties.add ( pd );
@Override public IPropertyDescriptor[] getPropertyDescriptors () { final List<IPropertyDescriptor> result = new LinkedList<IPropertyDescriptor> (); { final PropertyDescriptor pd = new PropertyDescriptor ( Properties.ITEM_ID, Messages.ListEntry_Property_Name_Id ); pd.setCategory ( Messages.ListEntry_Property_Category_Id ); pd.setAlwaysIncompatible ( true ); result.add ( pd ); } { final PropertyDescriptor pd = new PropertyDescriptor ( Properties.CONNECTION_URI, Messages.ListEntry_Property_Name_Connection ); pd.setCategory ( Messages.ListEntry_Property_Category_Connection ); pd.setAlwaysIncompatible ( true ); result.add ( pd ); } { final PropertyDescriptor pd = new PropertyDescriptor ( Properties.VALUE, Messages.ListEntry_Property_Name_Value ); pd.setCategory ( Messages.ListEntry_Property_Category_Value ); pd.setAlwaysIncompatible ( true ); result.add ( pd ); } { final PropertyDescriptor pd = new PropertyDescriptor ( Properties.SUBSCRIPTION_STATE, Messages.ListEntry_Property_Name_Subscription ); pd.setCategory ( Messages.ListEntry_Property_Category_State ); pd.setAlwaysIncompatible ( true ); result.add ( pd ); } return result.toArray ( new IPropertyDescriptor[0] ); }
public IPropertyDescriptor[] getPropertyDescriptors() { try { myConfig.load(); } catch (IOException e) { Activator.handleError( UIText.RepositoryRemotePropertySource_ErrorHeader, e, true); } catch (ConfigInvalidException e) { Activator.handleError( UIText.RepositoryRemotePropertySource_ErrorHeader, e, true); } List<IPropertyDescriptor> resultList = new ArrayList<IPropertyDescriptor>(); PropertyDescriptor desc = new PropertyDescriptor(RepositoriesView.URL, UIText.RepositoryRemotePropertySource_RemoteFetchURL_label); resultList.add(desc); desc = new PropertyDescriptor(RepositoriesView.FETCH, UIText.RepositoryRemotePropertySource_FetchLabel); resultList.add(desc); desc = new PropertyDescriptor(RepositoriesView.PUSHURL, UIText.RepositoryRemotePropertySource_RemotePushUrl_label); resultList.add(desc); desc = new PropertyDescriptor(RepositoriesView.PUSH, UIText.RepositoryRemotePropertySource_PushLabel); resultList.add(desc); return resultList.toArray(new IPropertyDescriptor[resultList.size()]); }
/** * The <code>ComboBoxPropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method returns the value set by * the <code>setProvider</code> method or, if no value has been set * it returns a <code>ComboBoxLabelProvider</code> created from the * valuesArray of this <code>ComboBoxPropertyDescriptor</code>. * * @see #setLabelProvider(ILabelProvider) */ @Override public ILabelProvider getLabelProvider() { if (isLabelProviderSet()) { return super.getLabelProvider(); } return new ComboBoxLabelProvider(labels); } }
/** * The <code>ComboBoxPropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method returns the value set by * the <code>setProvider</code> method or, if no value has been set * it returns a <code>ComboBoxLabelProvider</code> created from the * valuesArray of this <code>ComboBoxPropertyDescriptor</code>. * * @see #setLabelProvider */ public ILabelProvider getLabelProvider() { if (isLabelProviderSet()) { return super.getLabelProvider(); } else { return new ComboBoxLabelProvider(labels); } } }
public IPropertyDescriptor[] getPropertyDescriptors() { PropertyDescriptor desName = new PropertyDescriptor(P_ID_ENTITY_NAME, ConnectivityUIPlugin.getDefault().getResourceString( "properties.category.name")); //$NON-NLS-1$ desName.setCategory(ConnectivityUIPlugin.getDefault() .getResourceString("properties.category.general")); //$NON-NLS-1$ PropertyDescriptor desType = new PropertyDescriptor(P_ID_ENTITY_TYPE, ConnectivityUIPlugin.getDefault().getResourceString( "properties.category.id")); //$NON-NLS-1$ desType.setCategory(ConnectivityUIPlugin.getDefault() .getResourceString("properties.category.general")); //$NON-NLS-1$ return new IPropertyDescriptor[] { desName, desType}; }
final PropertyDescriptor pd = new PropertyDescriptor ( Properties.URI, Messages.PropertySourceWrapper_UriName ); pd.setCategory ( CAT_CONNECTION_INFORMATION ); pd.setDescription ( Messages.PropertySourceWrapper_UriDesc ); properties.add ( pd ); final PropertyDescriptor pd = new PropertyDescriptor ( Properties.ID, Messages.PropertySourceWrapper_IdName ); pd.setCategory ( CAT_CONNECTION_INFORMATION ); pd.setDescription ( Messages.PropertySourceWrapper_IdDesc ); properties.add ( pd ); final PropertyDescriptor pd = new PropertyDescriptor ( Properties.INTERFACES, Messages.PropertySourceWrapper_InterfacesName ); pd.setCategory ( CAT_CONNECTION_SERVICE ); pd.setDescription ( Messages.PropertySourceWrapper_InterfacesDesc ); properties.add ( pd ); final PropertyDescriptor pd = new PropertyDescriptor ( Properties.STATE, Messages.PropertySourceWrapper_StateName ); pd.setCategory ( CAT_CONNECTION_STATE ); pd.setDescription ( Messages.PropertySourceWrapper_StateDesc ); properties.add ( pd ); final PropertyDescriptor pd = new PropertyDescriptor ( new SessionPropertyDescriptor ( key ), key ); pd.setCategory ( CAT_SESSION_PROPERTIES ); properties.add ( pd );
/** * The <code>SimplePropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method returns true if the other * property has the same id and category and <code>getAlwaysIncompatible()</code> * returns false */ public boolean isCompatibleWith(IPropertyDescriptor anotherProperty) { if (getAlwaysIncompatible()) { return false; } // Compare id Object id1 = getId(); Object id2 = anotherProperty.getId(); if (!id1.equals(id2)) { return false; } // Compare Category (may be null) if (getCategory() == null) { if (anotherProperty.getCategory() != null) { return false; } } else { if (!getCategory().equals(anotherProperty.getCategory())) { return false; } } return true; }
/** * The <code>ComboBoxPropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method returns the value set by * the <code>setProvider</code> method or, if no value has been set * it returns a <code>ComboBoxLabelProvider</code> created from the * valuesArray of this <code>ComboBoxPropertyDescriptor</code>. * * @see #setLabelProvider(ILabelProvider) */ @Override public ILabelProvider getLabelProvider() { if (isLabelProviderSet()) { return super.getLabelProvider(); } return new ComboBoxLabelProvider(labels); } }
public IPropertyDescriptor[] getPropertyDescriptors() { PropertyDescriptor desName = new PropertyDescriptor(P_ID_ENTITY_NAME, ConnectivityUIPlugin.getDefault().getResourceString( "properties.connectionprofile.name")); //$NON-NLS-1$ desName.setCategory(ConnectivityUIPlugin.getDefault() .getResourceString("properties.category.general")); //$NON-NLS-1$ PropertyDescriptor desDesc = new PropertyDescriptor(P_ID_ENTITY_DESC, ConnectivityUIPlugin.getDefault().getResourceString( "properties.connectionprofile.desc")); //$NON-NLS-1$ desDesc.setCategory(ConnectivityUIPlugin.getDefault() .getResourceString("properties.category.general")); //$NON-NLS-1$ PropertyDescriptor desType = new PropertyDescriptor(P_ID_ENTITY_TYPE, ConnectivityUIPlugin.getDefault().getResourceString( "properties.connectionprofile.type")); //$NON-NLS-1$ desType.setCategory(ConnectivityUIPlugin.getDefault() .getResourceString("properties.category.general")); //$NON-NLS-1$ if (!_showAutoConnect) { return new IPropertyDescriptor[] { desName, desType}; } PropertyDescriptor autoConnectType = new PropertyDescriptor( P_ID_ENTITY_AUTOCONNECT, ConnectivityUIPlugin.getDefault() .getResourceString( "properties.connectionprofile.autoconnect")); //$NON-NLS-1$ autoConnectType.setCategory(ConnectivityUIPlugin.getDefault() .getResourceString("properties.category.general")); //$NON-NLS-1$ return new IPropertyDescriptor[] { desName, desDesc, desType, autoConnectType}; }
/** * The <code>SimplePropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method returns true if the other * property has the same id and category and <code>getAlwaysIncompatible()</code> * returns false */ @Override public boolean isCompatibleWith(IPropertyDescriptor anotherProperty) { if (getAlwaysIncompatible()) { return false; } // Compare id Object id1 = getId(); Object id2 = anotherProperty.getId(); if (!id1.equals(id2)) { return false; } // Compare Category (may be null) if (getCategory() == null) { if (anotherProperty.getCategory() != null) { return false; } } else { if (!getCategory().equals(anotherProperty.getCategory())) { return false; } } return true; }
for (String sectionItem : config.getNames(key)) { String sectionId = key + "." + sectionItem; //$NON-NLS-1$ PropertyDescriptor desc = new PropertyDescriptor(prefix + sectionId, sectionId); desc.setCategory(category); resultList.add(desc); for (String sectionItem : config.getNames(key, sub)) { String sectionId = key + "." + sub + "." + sectionItem; //$NON-NLS-1$ //$NON-NLS-2$ PropertyDescriptor desc = new PropertyDescriptor(prefix + sectionId, sectionId); desc.setCategory(category); resultList.add(desc);