/** * Create a new instance of the receiver. * * @param id * @param configurationElement */ public WorkbenchPreferenceExtensionNode(String id, IConfigurationElement configurationElement) { super(id); this.configurationElement = configurationElement; this.pluginId = configurationElement.getNamespaceIdentifier(); }
@Override public String getPluginId() { return (configurationElement != null) ? configurationElement .getNamespaceIdentifier() : null; }
@Override public String getPluginId() { return configElement == null ? pluginId : configElement.getNamespaceIdentifier(); }
@Override public String getPluginId() { return configurationElement.getNamespaceIdentifier(); }
public String getPluginId() { return (configElement != null) ? configElement.getNamespaceIdentifier() : null; } }
@Override public int compare(IConfigurationElement e1, IConfigurationElement e2) { return e1.getNamespaceIdentifier().compareTo(e2.getNamespaceIdentifier()); } });
@Override public int compare(IConfigurationElement e1, IConfigurationElement e2) { return e1.getNamespaceIdentifier().compareTo(e2.getNamespaceIdentifier()); } });
/** * Clients who wish to implement their own {@link IExecutableExtension} * behaviour <strong>must</strong> invoke this method prior to any * customization they perform. * * @throws CoreException * so that a subclass may throw this */ @Override public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException { locationURI = config .getAttribute(IWorkbenchRegistryConstants.TAG_LOCATION_URI); namespace = config.getNamespaceIdentifier(); } }
@Override public ImageDescriptor getDescriptionImage() { if (descriptionImage == null) { String descImage = configurationElement.getAttribute(IWorkbenchRegistryConstants.ATT_DESCRIPTION_IMAGE); if (descImage == null) { return null; } descriptionImage = AbstractUIPlugin.imageDescriptorFromPlugin( configurationElement.getNamespaceIdentifier(), descImage); } return descriptionImage; }
@Override public String getPluginId() { return element == null ? model.getElementId() : element.getNamespaceIdentifier(); }
@Override public String getPluginId() { return getConfigurationElement().getNamespaceIdentifier(); }
public int hashCode() { if (hashCode == HASH_CODE_NOT_COMPUTED) { String hashCodeString = configElement.getNamespaceIdentifier() + getId(); hashCode = hashCodeString.hashCode(); if (hashCode == HASH_CODE_NOT_COMPUTED) hashCode++; } return hashCode; }
/** * Returns page icon as defined in the registry. * * @return the page icon */ public ImageDescriptor getPageIcon() { String iconName = pageElement .getAttribute(IWorkbenchRegistryConstants.ATT_ICON); if (iconName == null) return null; return AbstractUIPlugin.imageDescriptorFromPlugin(pageElement .getNamespaceIdentifier(), iconName); }
@Override public IBasePluginWizard createWizard() throws CoreException { IExtensionWizard wizard = createWizard(wizardElement); if (wizard == null) throw new CoreException(new Status(IStatus.ERROR, wizardElement.getConfigurationElement().getNamespaceIdentifier(), PDEUIMessages.PointSelectionPage_cannotFindTemplate)); wizard.init(fProject, fModel); return wizard; }
public static boolean isActive(WizardElement element) { IConfigurationElement config = element.getConfigurationElement(); final String pluginId = config.getNamespaceIdentifier(); final String contributionId = config.getAttribute("id"); //$NON-NLS-1$ IPluginContribution contribution = new IPluginContribution() { @Override public String getLocalId() { return contributionId; } @Override public String getPluginId() { return pluginId; } }; return !WorkbenchActivityHelper.filterItem(contribution); }
@Override public ImageDescriptor getImageDescriptor() { if (image != null) return image; // Try and get an image from the IConfigElement if (configElement != null) { String icon = configElement.getAttribute(IWorkbenchRegistryConstants.ATT_ICON); if (icon != null) { image = AbstractUIPlugin.imageDescriptorFromPlugin( configElement.getNamespaceIdentifier(), icon); } } // Get a default image if (image == null) image = WorkbenchImages.getImageDescriptor(ISharedImages.IMG_ETOOL_DEF_PERSPECTIVE); return image; }
protected WizardElement createWizardElement(IConfigurationElement config) { String name = config.getAttribute(WizardElement.ATT_NAME); String id = config.getAttribute(WizardElement.ATT_ID); String className = config.getAttribute(WizardElement.ATT_CLASS); if (name == null || id == null || className == null) return null; WizardElement element = new WizardElement(config); String imageName = config.getAttribute(WizardElement.ATT_ICON); if (imageName != null) { String pluginID = config.getNamespaceIdentifier(); Image image = PDEPlugin.getDefault().getLabelProvider().getImageFromPlugin(pluginID, imageName); element.setImage(image); } return element; }
public static WizardElement create(IConfigurationElement config) { String name = config.getAttribute(ATT_NAME); String id = config.getAttribute(ATT_ID); String className = config.getAttribute(ATT_CLASS); if (name == null || id == null || className == null) return null; WizardElement element = new WizardElement(config); String imageName = config.getAttribute(ATT_ICON); if (imageName != null) { String pluginID = config.getNamespaceIdentifier(); Image image = PDEPlugin.getDefault().getLabelProvider().getImageFromPlugin(pluginID, imageName); element.setImage(image); } return element; }
protected WizardElement createWizardElement(IConfigurationElement config) { String name = config.getAttribute(WizardElement.ATT_NAME); String id = config.getAttribute(WizardElement.ATT_ID); String className = config.getAttribute(WizardElement.ATT_CLASS); if (name == null || id == null || className == null) return null; WizardElement element = new WizardElement(config); String imageName = config.getAttribute(WizardElement.ATT_ICON); if (imageName != null) { String pluginID = config.getNamespaceIdentifier(); Image image = PDEPlugin.getDefault().getLabelProvider().getImageFromPlugin(pluginID, imageName); element.setImage(image); } return element; }
private static boolean filterItem(IConfigurationElement element) { String extensionId = element.getAttribute(ATT_ID); String extensionPluginId = element.getNamespaceIdentifier(); IActivityManager activityMgr = PlatformUI.getWorkbench().getActivitySupport().getActivityManager(); IIdentifier id = activityMgr.getIdentifier(extensionPluginId + "/" + extensionId); //$NON-NLS-1$ return (!id.isEnabled()); }