Search in sources :

Example 66 with IExtensionPoint

use of org.eclipse.core.runtime.IExtensionPoint in project eclipse-integration-commons by spring-projects.

the class AbstractDashboardPage method readExtensions.

private void readExtensions() {
    this.partDescriptors = new ArrayList<PartDescriptor>();
    IExtensionRegistry registry = Platform.getExtensionRegistry();
    IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENSION_ID_DASHBOARD);
    IExtension[] extensions = extensionPoint.getExtensions();
    for (IExtension extension : extensions) {
        IConfigurationElement[] elements = extension.getConfigurationElements();
        for (IConfigurationElement element : elements) {
            if (element.getName().equals(ELEMENT_PART)) {
                readPartExtension(element);
            }
        }
    }
}
Also used : IExtensionPoint(org.eclipse.core.runtime.IExtensionPoint) IExtension(org.eclipse.core.runtime.IExtension) IConfigurationElement(org.eclipse.core.runtime.IConfigurationElement) IExtensionRegistry(org.eclipse.core.runtime.IExtensionRegistry)

Example 67 with IExtensionPoint

use of org.eclipse.core.runtime.IExtensionPoint in project webtools.sourceediting by eclipse.

the class CommentElementRegistry method getConfigurations.

public synchronized CommentElementConfiguration[] getConfigurations() {
    if (fConfigurations == null) {
        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint point = registry.getExtensionPoint(PLUGIN_ID, EXTENSION_POINT_ID);
        if (point != null) {
            IConfigurationElement[] elements = point.getConfigurationElements();
            fConfigurations = new CommentElementConfiguration[elements.length];
            for (int i = 0; i < elements.length; i++) {
                fConfigurations[i] = new CommentElementConfiguration(elements[i]);
            }
        }
        if (fConfigurations == null) {
            fConfigurations = new CommentElementConfiguration[0];
        }
    }
    return fConfigurations;
}
Also used : IExtensionPoint(org.eclipse.core.runtime.IExtensionPoint) IConfigurationElement(org.eclipse.core.runtime.IConfigurationElement) IExtensionPoint(org.eclipse.core.runtime.IExtensionPoint) IExtensionRegistry(org.eclipse.core.runtime.IExtensionRegistry)

Example 68 with IExtensionPoint

use of org.eclipse.core.runtime.IExtensionPoint in project webtools.sourceediting by eclipse.

the class AnnotationFileRegistryReader method readRegistry.

/**
 * read from plugin registry and parse it.
 */
public void readRegistry() {
    IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
    // $NON-NLS-1$
    String pluginId = "org.eclipse.wst.xml.core";
    IExtensionPoint point = extensionRegistry.getExtensionPoint(pluginId, EXTENSION_POINT_ID);
    if (point != null) {
        IConfigurationElement[] elements = point.getConfigurationElements();
        for (int i = 0; i < elements.length; i++) {
            readElement(elements[i]);
        }
    }
}
Also used : IExtensionPoint(org.eclipse.core.runtime.IExtensionPoint) IConfigurationElement(org.eclipse.core.runtime.IConfigurationElement) IExtensionPoint(org.eclipse.core.runtime.IExtensionPoint) IExtensionRegistry(org.eclipse.core.runtime.IExtensionRegistry)

Example 69 with IExtensionPoint

use of org.eclipse.core.runtime.IExtensionPoint in project webtools.sourceediting by eclipse.

the class ErrorCustomizationPluginRegistryReader method readRegistry.

/**
 * Read from plugin registry for the errorcustomizer extension.
 */
public void readRegistry() {
    IExtensionRegistry pluginRegistry = Platform.getExtensionRegistry();
    IExtensionPoint point = pluginRegistry.getExtensionPoint(PLUGIN_ID, EXTENSION_POINT_ID);
    if (point != null) {
        IConfigurationElement[] elements = point.getConfigurationElements();
        for (int i = 0; i < elements.length; i++) {
            readElement(elements[i]);
        }
    }
}
Also used : IExtensionPoint(org.eclipse.core.runtime.IExtensionPoint) IConfigurationElement(org.eclipse.core.runtime.IConfigurationElement) IExtensionPoint(org.eclipse.core.runtime.IExtensionPoint) IExtensionRegistry(org.eclipse.core.runtime.IExtensionRegistry)

Example 70 with IExtensionPoint

use of org.eclipse.core.runtime.IExtensionPoint in project pmd-eclipse-plugin by pmd.

the class RuleSetsExtensionProcessor method process.

/**
 * Process the extension point
 */
public void process() throws CoreException {
    final IExtensionRegistry registry = Platform.getExtensionRegistry();
    final IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENTION_POINT);
    for (IConfigurationElement element : extensionPoint.getConfigurationElements()) {
        processExecutableExtension(element);
    }
}
Also used : IExtensionPoint(org.eclipse.core.runtime.IExtensionPoint) IConfigurationElement(org.eclipse.core.runtime.IConfigurationElement) IExtensionRegistry(org.eclipse.core.runtime.IExtensionRegistry)

Aggregations

IExtensionPoint (org.eclipse.core.runtime.IExtensionPoint)187 IConfigurationElement (org.eclipse.core.runtime.IConfigurationElement)160 IExtensionRegistry (org.eclipse.core.runtime.IExtensionRegistry)107 IExtension (org.eclipse.core.runtime.IExtension)92 CoreException (org.eclipse.core.runtime.CoreException)70 ArrayList (java.util.ArrayList)29 HashMap (java.util.HashMap)17 Platform (org.eclipse.core.runtime.Platform)17 Stream (java.util.stream.Stream)16 List (java.util.List)15 NodeLogger (org.knime.core.node.NodeLogger)15 Map (java.util.Map)14 Optional (java.util.Optional)14 Collection (java.util.Collection)9 Bundle (org.osgi.framework.Bundle)9 Collectors (java.util.stream.Collectors)8 IOException (java.io.IOException)6 Collections (java.util.Collections)6 LinkedList (java.util.LinkedList)6 Objects (java.util.Objects)6