public static Map<String, String> getAttributes(IExtension ext) { Map<String, String> attributes = new HashMap<>(); for (IConfigurationElement config : ext.getConfigurationElements()) { String id = config.getName(); String value = config.getAttribute(PluginProperties.PLUGIN_XML_VALUE); attributes.put(id, value); } return attributes; }
public static Map<String, String> getAttributes(IExtension ext) { Map<String, String> attributes = new HashMap<String, String>(); for (IConfigurationElement config : ext.getConfigurationElements()) { String id = config.getName(); String value = config.getAttribute(PluginProperties.PLUGIN_XML_VALUE); attributes.put(id, value); } return attributes; }
private static IConfigurationElement[] getSequenceModifierElements(IConfigurationElement configurationElement) { IExtension extension = configurationElement.getDeclaringExtension(); List modifierElements = new ArrayList(); for (final IConfigurationElement configElement : extension.getConfigurationElements()) { if(TAG_SEQUENCE_MODIFIER.equals(configElement.getName())) modifierElements.add(configElement); } return (IConfigurationElement[]) modifierElements.toArray(new IConfigurationElement[modifierElements.size()]); }
private void remove(IExtension extension) { IConfigurationElement[] elements = extension.getConfigurationElements(); for (IConfigurationElement element : elements) { if (E_ENVIRONMENT_FACTORY.equals(element.getName())) { removeEnvironmentFactory(element); } } }
@Override protected Iterator<IConfigurationElement> transform(IExtension next) { return CollectionTools.iterator(next.getConfigurationElements()); } }
public IConfigurationElement[] getConfigurationElementsFor(String pluginId, String extensionPointName, String extensionId) { // this is just a convenience API - no need to do any sync'ing here IExtension extension = this.getExtension(pluginId, extensionPointName, extensionId); if (extension == null) return new IConfigurationElement[0]; return extension.getConfigurationElements(); }
/** * Read one extension by looping through its * configuration elements. */ protected void readExtension(IExtension extension) { readElements(extension.getConfigurationElements()); }
/** * Read one extension by looping through its configuration elements. */ protected void readExtension(IExtension extension) { readElements(extension.getConfigurationElements()); } /**
/** * Read one extension by looping through its * configuration elements. */ private void readExtension(IExtension extension) { readElements(extension.getConfigurationElements()); }
private void remove(IExtension extension) { IConfigurationElement[] elements = extension.getConfigurationElements(); for (IConfigurationElement element : elements) { if (E_ENVIRONMENT_FACTORY.equals(element.getName())) { removeEnvironmentFactory(element); } } }
public IConfigurationElement[] getConfigurationElementsFor(String pluginId, String extensionPointName, String extensionId) { // this is just a convenience API - no need to do any sync'ing here IExtension extension = this.getExtension(pluginId, extensionPointName, extensionId); if (extension == null) return new IConfigurationElement[0]; return extension.getConfigurationElements(); }
@Override public void added(IExtension[] extensions) { for (IExtension extension : extensions) { List<Class<? extends MApplicationElement>> elementsToCleanup = addToMapping(extension .getConfigurationElements()); if (elementsToCleanup != null) { // keep the list of registered class per extension to remove them in the // #remove(IExtension[]) method registeredClasses.put(extension, elementsToCleanup); } } }
public static List<InjectionDescriptor> getDescriptors() { final IExtensionRegistry registry = Platform.getExtensionRegistry(); final IExtensionPoint extpoint = registry.getExtensionPoint(EXT_POINT_ID); final List<InjectionDescriptor> descriptors = Lists.newArrayList(); for (final IExtension ext : extpoint.getExtensions()) { for (final IConfigurationElement config : ext.getConfigurationElements()) { final InjectionDescriptor desc = new InjectionDescriptor(config); descriptors.add(desc); } } return descriptors; }
protected void processExtension(IExtension extension) { IConfigurationElement[] elements = extension.getConfigurationElements(); for (int i = 0; i < elements.length; i++) { IConfigurationElement element = elements[i]; if (element.getName().equalsIgnoreCase(FILTER_ELEMENT)) { IFilterMatcherDescriptor desc = new FilterDescriptor(element); factories.put(desc.getId(), desc); } } }
protected void processExtension(IExtension extension) { IConfigurationElement[] elements = extension.getConfigurationElements(); for (IConfigurationElement element : elements) { if (element.getName().equalsIgnoreCase(FILTER_ELEMENT)) { IFilterMatcherDescriptor desc = new FilterDescriptor(element); factories.put(desc.getId(), desc); } } }
protected void processRemovedExtension(IExtension extension) { IConfigurationElement[] elements = extension.getConfigurationElements(); for (int i = 0; i < elements.length; i++) { IConfigurationElement element = elements[i]; if (element.getName().equalsIgnoreCase(FILTER_ELEMENT)) { IFilterMatcherDescriptor desc = new FilterDescriptor(element, false); factories.remove(desc.getId()); } } }
private void registerExtension(IExtension extension) { IConfigurationElement[] elements = extension.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { AdapterFactoryProxy proxy = AdapterFactoryProxy.createProxy(elements[j]); if (proxy != null) theAdapterManager.registerFactory(proxy, proxy.getAdaptableType()); } }
private void registerExtension(IExtension extension) { IConfigurationElement[] elements = extension.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { AdapterFactoryProxy proxy = AdapterFactoryProxy.createProxy(elements[j]); if (proxy != null) theAdapterManager.registerFactory(proxy, proxy.getAdaptableType()); } }
private void registerExtension(IExtension extension) { IConfigurationElement[] elements = extension.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { AdapterFactoryProxy proxy = AdapterFactoryProxy.createProxy(elements[j]); if (proxy != null) theAdapterManager.registerFactory(proxy, proxy.getAdaptableType()); } }
private IConfigurationElement getConfiguration() { IExtension applicationExtension = ((EclipseAppDescriptor) getApplicationDescriptor()).getContainerManager().getAppExtension(getApplicationDescriptor().getApplicationId()); if (applicationExtension == null) throw new RuntimeException(NLS.bind(Messages.application_notFound, getApplicationDescriptor().getApplicationId(), ((EclipseAppDescriptor) getApplicationDescriptor()).getContainerManager().getAvailableAppsMsg())); IConfigurationElement[] configs = applicationExtension.getConfigurationElements(); if (configs.length == 0) throw new RuntimeException(NLS.bind(Messages.application_invalidExtension, getApplicationDescriptor().getApplicationId())); return configs[0]; }