public String getPluginId() { return configurationElement.getNamespace(); } }
/** * <p> * Returns the an id component used for Activity filtering. * </p> * * <p> * The Plugin ID is determined from the configuration element specified in * {@see #setInitializationData(IConfigurationElement, String, Object)}. * </p> * * @return Returns the plugin id associated with this wizard */ public final String getPluginId() { return (configurationElement != null) ? configurationElement.getNamespace() : ""; //$NON-NLS-1$ }
void createContributionFrom(IConfigurationElement element) { final String id = element.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_ID); final String namespace = element.getNamespace(); contributionDescriptor = new IPluginContribution() { @Override public String getLocalId() { return id; } @Override public String getPluginId() { return namespace; } }; }
private void loadFromExtension() throws CoreException { String identifier = configElement.getAttribute(ATT_ID); label = configElement.getAttribute(ATT_NAME); className = configElement.getAttribute(ATT_CLASS); description = configElement.getAttribute(ATT_DESCRIPTION); // Sanity check. if ((label == null) || (className == null) || (identifier == null) || (description == null)) { throw new CoreException(new Status(IStatus.ERROR, configElement.getNamespace(), 0, "Invalid extension (missing label or class name): " + identifier, //$NON-NLS-1$ null)); } id = identifier; }
/** * load a view descriptor from the registry. */ private void loadFromExtension() throws CoreException { String identifier = configElement.getAttribute(ATT_ID); label = configElement.getAttribute(ATT_NAME); className = configElement.getAttribute(ATT_CLASS); String persistentString = configElement.getAttribute(ATT_PERSISTENT); if(persistentString == null) { persistent = true; } else { persistent = Boolean.valueOf(persistentString).booleanValue(); } // Sanity check. if ((label == null) || (className == null) || (identifier == null)) { throw new CoreException(new Status(IStatus.ERROR, configElement.getNamespace(), 0, "Invalid extension (missing label or class name): " + identifier, //$NON-NLS-1$ null)); } id = identifier; }
/** * Create a descriptor from a configuration element. * * @param configElement the configuration element * @throws CoreException thrown if there is an issue creating the descriptor */ public ActionSetDescriptor(IConfigurationElement configElement) throws CoreException { super(); this.configElement = configElement; id = configElement.getAttribute(IWorkbenchRegistryConstants.ATT_ID); pluginId = configElement.getNamespace(); label = configElement.getAttribute(IWorkbenchRegistryConstants.ATT_LABEL); description = configElement.getAttribute(IWorkbenchRegistryConstants.TAG_DESCRIPTION); String str = configElement.getAttribute(IWorkbenchRegistryConstants.ATT_VISIBLE); if (str != null && str.equals("true")) { //$NON-NLS-1$ visible = true; } // Sanity check. if (label == null) { throw new CoreException(new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, 0, "Invalid extension (missing label): " + id,//$NON-NLS-1$ null)); } }
/** * Creates a descriptor for the marker provider extension * and add it to the list of providers. */ public void addProvider(IConfigurationElement element) { Descriptor desc = new Descriptor(); desc.element = element; desc.pluginBundle = Platform.getBundle(element.getNamespace()); desc.id = element.getAttribute(ATT_ID); desc.markerType = element.getAttribute(ATT_MARKER_TYPE); desc.imagePath = element.getAttribute(ATT_ICON); desc.className = element.getAttribute(ATT_PROVIDER_CLASS); if (desc.imagePath != null) { desc.imageDescriptor = getImageDescriptor(desc); } if (desc.className == null) { //Don't need to keep these references. desc.element = null; desc.pluginBundle = null; } descriptors.add(desc); }
Bundle plugin = Platform.getBundle(element.getNamespace()); if (plugin.getState() == Bundle.ACTIVE) { return element.createExecutableExtension(classAttribute);
Bundle bundle = Platform.getBundle(element.getNamespace()); if (bundle.getState() == org.osgi.framework.Bundle.ACTIVE) { return element.createExecutableExtension(classAttribute);
/** * readElement() - parse and deal with an extension like: * * <extension * point="org.eclipse.wst.xml.core.internal.contentmodel.util_implementation"> * <util_implementation class = * corg.eclipse.wst.baseutil.CMUtilImplementationImpl /> </extension> */ protected void readElement(IConfigurationElement element) { if (element.getName().equals(TAG_NAME)) { String publicId = element.getAttribute(ATT_PUBLIC_ID); String location = element.getAttribute(ATT_LOCATION); if (publicId != null && location != null) { try { String bundleId = element.getNamespace(); AnnotationFileInfo fileInfo = new AnnotationFileInfo(location, bundleId); annotationFileRegistry.addAnnotationFile(publicId, fileInfo); } catch (Exception e) { Logger.logException("problem adding annotation file " + location, e); //$NON-NLS-1$ } } } } }
return true; String extendingPluginId = element.getNamespace(); ImageDescriptor image = AbstractUIPlugin.imageDescriptorFromPlugin( extendingPluginId, icon);
private boolean filterItem(IConfigurationElement element) { String extensionId = element.getAttribute(ATT_ID); String extensionPluginId = element.getNamespace(); IActivityManager activityMgr = PlatformUI.getWorkbench().getActivitySupport().getActivityManager(); IIdentifier id = activityMgr.getIdentifier(extensionPluginId + "/" + extensionId); //$NON-NLS-1$ return (!id.isEnabled()); }
if (Platform.getBundle(element.getNamespace()).getState() == Bundle.ACTIVE) {