Tabnine Logo
IExtensionRegistry
Code IndexAdd Tabnine to your IDE (free)

How to use
IExtensionRegistry
in
org.eclipse.core.runtime

Best Java code snippets using org.eclipse.core.runtime.IExtensionRegistry (Showing top 20 results out of 2,322)

Refine searchRefine arrow

  • IConfigurationElement
  • Platform
  • IExtensionPoint
  • IExtension
origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

private void readExtentions() {
  IExtensionRegistry registry = Platform.getExtensionRegistry();
  IExtensionPoint point = registry.getExtensionPoint(PDECore.PLUGIN_ID, TARGET_LOC_EXTPT);
  if (point == null)
    return;
  IExtension[] extensions = point.getExtensions();
  for (int i = 0; i < extensions.length; i++) {
    IConfigurationElement[] elements = extensions[i].getConfigurationElements();
    for (int j = 0; j < elements.length; j++) {
      String type = elements[j].getAttribute(ATTR_TYPE);
      if (type != null) {
        fExtentionMap.put(type, elements[j]);
      }
    }
  }
}
origin: org.eclipse.platform/org.eclipse.search

public SearchPageRegistry() {
  fExtensionToInstance= new HashMap<>();
  fResultClassNameToExtension= new HashMap<>();
  fExtensions= Platform.getExtensionRegistry().getConfigurationElementsFor(ID_EXTENSION_POINT);
  for (IConfigurationElement fExtension : fExtensions) {
    fResultClassNameToExtension.put(fExtension.getAttribute(ATTRIB_SEARCH_RESULT_CLASS), fExtension);
  }
}
origin: org.eclipse.platform/org.eclipse.ltk.core.refactoring

/**
 * Connects this manager to the platform's extension registry.
 */
public void connect() {
  Platform.getExtensionRegistry().addRegistryChangeListener(this, RefactoringCore.ID_PLUGIN);
}
origin: org.openehealth.ipf.eclipse.ocl/ipf-eclipse-ocl

private void readRegistryImpl() {
  extensionRegistry.addRegistryChangeListener(this, namespace);
  
  IExtension[] extensions = extensionRegistry.getExtensionPoint(
      namespace, PT_ENVIRONMENTS).getExtensions();
  
  for (IExtension extension : extensions) {
    read(extension);
  }
}

origin: org.eclipse/org.eclipse.pde.core

private void loadElements() {
  fTargets = new HashMap();
  IExtensionRegistry registry = Platform.getExtensionRegistry();
  registry.addRegistryChangeListener(this);
  IConfigurationElement[] elements = registry.getConfigurationElementsFor("org.eclipse.pde.core.targets"); //$NON-NLS-1$
  add(elements);
}

origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jdt.launching

/**
 * Loads runtime classpath extensions
 */
private void initializeRuntimeClasspathExtensions() {
  IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(LaunchingPlugin.ID_PLUGIN, ID_EXTENSION_POINT_RUNTIME_CLASSPATH_ENTRIES);
  IConfigurationElement[] configs= extensionPoint.getConfigurationElements();
  fClasspathEntryExtensions = new HashMap<String, IConfigurationElement>(configs.length);
  for (int i= 0; i < configs.length; i++) {
    fClasspathEntryExtensions.put(configs[i].getAttribute("id"), configs[i]); //$NON-NLS-1$
  }
}

origin: eclipse-color-theme/eclipse-color-theme

IConfigurationElement[] config = Platform.getExtensionRegistry()
    .getConfigurationElementsFor(
        Activator.EXTENSION_POINT_ID_MAPPER);
try {
  for (IConfigurationElement e : config) {
    final Object o = e.createExecutableExtension("class");
    if (o instanceof ThemePreferenceMapper) {
      String pluginId = e.getAttribute("pluginId");
      ThemePreferenceMapper mapper = (ThemePreferenceMapper) o;
      mapper.setPluginId(pluginId);
      if (o instanceof GenericMapper) {
        String xml = e.getAttribute("xml");
        String contributorPluginId = e.getContributor()
            .getName();
        Bundle bundle = Platform.getBundle(contributorPluginId);
        InputStream input = (InputStream) bundle.getResource(
            xml).getContent();
origin: org.eclipse/org.eclipse.jem.util

private static String[] readGlobalLoadingPluginNames() {
  IExtensionRegistry reg = Platform.getExtensionRegistry();
  IExtensionPoint exPoint = reg.getExtensionPoint(ID, "globalPluginResourceLoad"); //$NON-NLS-1$
  IExtension[] extensions = exPoint.getExtensions();
  String[] names = new String[extensions.length];
  if (extensions.length > 0) {
    for (int i = 0; i < extensions.length; i++)
      names[i] = extensions[i].getContributor().getName();
  }
  return names;
}
origin: org.eclipse.platform/org.eclipse.ui.workbench

private Map<String, String> createThemeAssociations() {
  Map<String, String> result = new HashMap<>();
  IExtensionRegistry registry = RegistryFactory.getRegistry();
  IExtensionPoint extPoint = registry.getExtensionPoint(E4_THEME_EXTENSION_POINT);
  for (IExtension e : extPoint.getExtensions()) {
    for (IConfigurationElement ce : e.getConfigurationElements()) {
      if (ce.getName().equals(ATT_THEME_ASSOCIATION)) {
        String themeId = ce.getAttribute(ATT_THEME_ID);
        String osVersion = ce.getAttribute(ATT_OS_VERSION);
        result.put(osVersion != null ? themeId + osVersion : themeId,
            ce.getAttribute(ATT_COLOR_AND_FONT_ID));
      }
    }
  }
  return result;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private synchronized void ensureCleanUpInitializersRegistered() {
  if (fCleanUpInitializerDescriptors != null)
    return;
  ArrayList<CleanUpInitializerDescriptor> result= new ArrayList<>();
  IExtensionPoint point= Platform.getExtensionRegistry().getExtensionPoint(JavaPlugin.getPluginId(), EXTENSION_POINT_NAME);
  IConfigurationElement[] elements= point.getConfigurationElements();
  for (int i= 0; i < elements.length; i++) {
    IConfigurationElement element= elements[i];
    if (CLEAN_UP_INITIALIZER_CONFIGURATION_ELEMENT_NAME.equals(element.getName())) {
      result.add(new CleanUpInitializerDescriptor(element));
    }
  }
  fCleanUpInitializerDescriptors= result.toArray(new CleanUpInitializerDescriptor[result.size()]);
}
origin: org.eclipse/org.eclipse.wst.common.frameworks.ui

private void setupWizardPluginIDMap() {
  wizardPluginIDMap = new HashMap();
  // get editor plugin and save it to a hash map
  // Note: editors extension id is different from editor id
  IExtensionPoint[] point = new IExtensionPoint[]{Platform.getExtensionRegistry().getExtensionPoint(ORG_ECLIPSE_UI, "exportWizards"), //$NON-NLS-1$
        Platform.getExtensionRegistry().getExtensionPoint(ORG_ECLIPSE_UI, "importWizards"), //$NON-NLS-1$
        Platform.getExtensionRegistry().getExtensionPoint(ORG_ECLIPSE_UI, "newWizards"), //$NON-NLS-1$
        Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.wst.common.frameworks.ui", "extendableWizard")}; //$NON-NLS-1$ //$NON-NLS-2$
  for (int x = 0; x < point.length; x++) {
    IConfigurationElement[] elements = point[x].getConfigurationElements();
    for (int i = 0; i < elements.length; i++) {
      String wizardID = elements[i].getAttribute("id"); //$NON-NLS-1$
      String pluginID = elements[i].getDeclaringExtension().getNamespace();
      wizardPluginIDMap.put(wizardID, pluginID);
    }
  }
}
origin: org.eclipse.platform/org.eclipse.debug.ui

/**
 * Load extensions
 */
private void initialize() {
  fConfigurations = new HashMap<>();
  IExtensionPoint point= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), EXTENSION_POINT_STRING_VARIABLE_PRESENTATIONS);
  IConfigurationElement elements[]= point.getConfigurationElements();
  for (int i = 0; i < elements.length; i++) {
    IConfigurationElement element = elements[i];
    String name= element.getAttribute(ATTR_NAME);
    if (name == null) {
      DebugUIPlugin.logErrorMessage(MessageFormat.format("String variable presentation extension missing required 'variableName' attribute: {0}", new Object[] { element.getDeclaringExtension().getLabel() })); //$NON-NLS-1$
      continue;
    }
    fConfigurations.put(name, element);
  }
}
origin: de.dentrassi.eclipse.neoscada.ide/org.eclipse.scada.configuration.generator

  public void stop ()
  {
    Platform.getExtensionRegistry ().removeRegistryChangeListener ( this.changeListener );
  }
}
origin: org.eclipse/org.eclipse.wst.xml.ui

protected IConfigurationElement[] getExtendedConfigurationElements() {
  IExtensionRegistry registry = Platform.getExtensionRegistry();
  IExtensionPoint exampleWizardXP = registry.getExtensionPoint(EXAMPLE_WIZARD_XP_ID);
  if (exampleWizardXP == null) {
    return new IConfigurationElement[0];
  }
  IExtension extension = exampleWizardXP.getExtension(getWizardExtensionId());
  if (extension != null) {
    return extension.getConfigurationElements();
  }
  IConfigurationElement[] exampleWizardCEs = exampleWizardXP.getConfigurationElements();
  return exampleWizardCEs;
}
origin: org.eclipse.equinox/registry

/**
 * Loads adapters registered with the adapters extension point from
 * the plug-in registry.  Note that the actual factory implementations
 * are loaded lazily as they are needed.
 */
public boolean addFactories(AdapterManager adapterManager) {
  IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(ADAPTER_POINT_ID);
  if (point == null)
    return false;
  boolean factoriesAdded = false;
  IExtension[] extensions = point.getExtensions();
  for (int i = 0; i < extensions.length; i++) {
    IConfigurationElement[] elements = extensions[i].getConfigurationElements();
    for (int j = 0; j < elements.length; j++) {
      AdapterFactoryProxy proxy = AdapterFactoryProxy.createProxy(elements[j]);
      if (proxy != null) {
        adapterManager.registerFactory(proxy, proxy.getAdaptableType());
        factoriesAdded = true;
      }
    }
  }
  RegistryFactory.getRegistry().addListener(this, ADAPTER_POINT_ID);
  return factoriesAdded;
}
origin: org.eclipse.platform/org.eclipse.ui.workbench

private static IExtension[] getPerspectiveExtensions() {
  IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(PlatformUI.PLUGIN_ID,
      IWorkbenchRegistryConstants.PL_PERSPECTIVE_EXTENSIONS);
  if (point == null) {
    return null;
  }
  IExtension[] extensions = point.getExtensions();
  extensions = RegistryReader.orderExtensions(extensions);
  return extensions;
}
origin: org.eclipse.platform/org.eclipse.ui.workbench

private IConfigurationElement[] loadElements() {
  IExtensionPoint point = Platform.getExtensionRegistry()
      .getExtensionPoint("org.eclipse.ui", "installationPages"); //$NON-NLS-1$ //$NON-NLS-2$
  return point.getConfigurationElements();
}
origin: eclipse/eclipse.jdt.ls

private static synchronized Set<DelegateCommandHandlerDescriptor> getDelegateCommandHandlerDescriptors() {
  if (fgContributedCommandHandlers == null) {
    IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_POINT_ID);
    fgContributedCommandHandlers = Stream.of(elements).map(e -> new DelegateCommandHandlerDescriptor(e)).collect(Collectors.toSet());
  }
  return fgContributedCommandHandlers;
}
origin: org.eclipse.neoscada.ide/org.eclipse.scada.configuration.component.lib

public ForwardingDanglingReferenceResolver ()
{
  Platform.getExtensionRegistry ().addListener ( this, EXPT_DANGLING_RESOLVER );
  buildCache ();
}
origin: edu.stanford.protege/org.protege.editor.core.application

public Bundle getExtensionPointBundle(IExtension extension) {
  IExtensionRegistry  registry = getExtensionRegistry();
  String extensionPtId = extension.getExtensionPointUniqueIdentifier();
  IExtensionPoint extensionPt = registry.getExtensionPoint(extensionPtId);
  IContributor contributor = extensionPt.getContributor();
  return getBundle(contributor);
}

org.eclipse.core.runtimeIExtensionRegistry

Most used methods

  • getExtensionPoint
    Returns the extension point in this extension registry with the given namespace and extension point
  • getConfigurationElementsFor
    Returns all configuration elements from the identified extension. Returns an empty array if the exte
  • addRegistryChangeListener
    Note: for new implementations consider using #addListener(IRegistryEventListener,String). Adds the g
  • removeRegistryChangeListener
    Removes the given registry change listener from this registry. Has no effect if an identical listene
  • addListener
    Adds the given listener for registry change events related to specified extension point. Once regist
  • removeListener
    Removes the given registry change listener from this registry. This method has no effect if the list
  • getExtension
    Returns the specified extension in this extension registry, or null if there is no such extension. T
  • getExtensionPoints
    Returns all extension points supplied by the contributor, or null if there are no such extension poi
  • addContribution
    Adds to this extension registry an extension point(s), extension(s), or a combination of those descr
  • getExtensions
    Returns all extensions supplied by the contributor, or null if there are no such extensions.
  • stop
    Call this method to properly stop the registry. The method stops registry event processing and write
  • getNamespaces
    Returns all namespaces currently used by extensions and extension points in this registry. Returns a
  • stop,
  • getNamespaces

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • findViewById (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now