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

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

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

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

editors = new HashMap<String, ThemePreferenceMapper>();
IConfigurationElement[] config = Platform.getExtensionRegistry()
    .getConfigurationElementsFor(
        Activator.EXTENSION_POINT_ID_MAPPER);
try {
origin: eclipse-color-theme/eclipse-color-theme

private void readStockThemes(Map<String, ColorTheme> themes) {
  IConfigurationElement[] config = Platform.getExtensionRegistry()
      .getConfigurationElementsFor(
          Activator.EXTENSION_POINT_ID_THEME);
  try {
    for (IConfigurationElement e : config) {
      String xml = e.getAttribute("file");
      String contributorPluginId = e.getContributor().getName();
      Bundle bundle = Platform.getBundle(contributorPluginId);
      InputStream input = (InputStream) bundle.getResource(xml)
          .getContent();
      ParsedTheme theme = parseTheme(input, false);
      amendThemeEntries(theme.getTheme().getEntries());
      themes.put(theme.getTheme().getName(), theme.getTheme());
    }
  } catch (Exception e) {
    e.printStackTrace();
  }
}
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.pde/launching

private void loadElements() {
  fFrameworks = new HashMap();
  IExtensionRegistry registry = Platform.getExtensionRegistry();
  IConfigurationElement[] elements = registry.getConfigurationElementsFor(POINT_ID);
  for (int i = 0; i < elements.length; i++) {
    String id = elements[i].getAttribute(ATT_ID);
    if (id == null || elements[i].getAttribute(ATT_NAME) == null || elements[i].getAttribute(ATT_DELEGATE) == null)
      continue;
    fFrameworks.put(id, elements[i]);
  }
}
origin: com.b2international.snowowl/com.b2international.snowowl.core

public boolean isEffectiveTimeSupported(final String terminologyId) {
  Preconditions.checkNotNull(terminologyId, "terminologyId");
  //iterate through all registered terminology component extensions
  for (final IConfigurationElement terminology : Platform.getExtensionRegistry().getConfigurationElementsFor(TERMINOLOGY_EXTENSION_POINT_ID)) {
    if (terminologyId.equals(terminology.getAttribute(ID_ATTRIBUTE))) {
      final String supportsEffectiveTime = nullToEmpty(terminology.getAttribute(SUPPORTS_EFFECTIVE_TIME_ATTRIBUTE));
      return Boolean.parseBoolean(supportsEffectiveTime);
    }
  }
  throw new RuntimeException("Cannot find terminology with ID: '" + terminologyId + "'.");
}

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/org.eclipse.search

/**
 * @return Returns all search pages contributed to the workbench.
 */
public List getSearchPageDescriptors() {
  if (fPageDescriptors == null) {
    IConfigurationElement[] elements= Platform.getExtensionRegistry().getConfigurationElementsFor(NewSearchUI.PLUGIN_ID, SEARCH_PAGE_EXTENSION_POINT);
    fPageDescriptors= createSearchPageDescriptors(elements);
  }    
  return fPageDescriptors;
} 
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

/**
 * Returns descriptors for all editor association override extensions.
 *
 * @return an array with the contributed editor association overrides
 */
public static EditorAssociationOverrideDescriptor[] getContributedEditorAssociationOverrides() {
  IExtensionRegistry registry= Platform.getExtensionRegistry();
  IConfigurationElement[] elements= registry.getConfigurationElementsFor(EDITOR_ASSOCIATION_OVERRIDE_EXTENSION_POINT);
  EditorAssociationOverrideDescriptor[] editorAssociationOverrideDescs= createDescriptors(elements);
  return editorAssociationOverrideDescs;
}
origin: com.b2international.snowowl/com.b2international.snowowl.core

public String getTerminologyId(final String terminologyComponentId) {
  Preconditions.checkNotNull(terminologyComponentId, "Terminology component identifier argument cannot be null.");
  Preconditions.checkArgument(!StringUtils.isEmpty(terminologyComponentId), "Terminology component identifier argument cannot be empty string.");
  for (final IConfigurationElement terminologComponents : Platform.getExtensionRegistry().getConfigurationElementsFor(TERMINOLOGY_COMPONENT_EXTENSION_POINT_ID)) {
    if (terminologyComponentId.equals(terminologComponents.getAttribute(ID_ATTRIBUTE))) {
      return terminologComponents.getAttribute(TERMINOLOGY_ID_ATTRIBUTE);
    }
  }
  throw new IllegalArgumentException("No terminology extension has been registered for the passed in terminology component identifier: " + terminologyComponentId);
}
origin: org.eclipse.platform/org.eclipse.search

/**
 * @return Returns all search pages contributed to the workbench.
 */
public List<SearchPageDescriptor> getSearchPageDescriptors() {
  if (fPageDescriptors == null) {
    IConfigurationElement[] elements= Platform.getExtensionRegistry().getConfigurationElementsFor(NewSearchUI.PLUGIN_ID, SEARCH_PAGE_EXTENSION_POINT);
    fPageDescriptors= createSearchPageDescriptors(elements);
  }
  return fPageDescriptors;
}
origin: org.eclipse.platform/org.eclipse.urischeme

private IConfigurationElement[] getOrReadConfigurationElements() {
  if (this.configurationElements == null) {
    IExtensionRegistry registry = RegistryFactory.getRegistry();
    this.configurationElements = registry.getConfigurationElementsFor(EXT_POINT_ID_URI_SCHEME_HANDLERS);
  }
  return configurationElements;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor

/**
 * Returns descriptors for all hyperlink detector extensions.
 *
 * @return an array with the contributed hyperlink detectors
 */
public static HyperlinkDetectorDescriptor[] getContributedHyperlinkDetectors() {
  IExtensionRegistry registry= Platform.getExtensionRegistry();
  IConfigurationElement[] elements= registry.getConfigurationElementsFor(HYPERLINK_DETECTORS_EXTENSION_POINT);
  HyperlinkDetectorDescriptor[] hyperlinkDetectorDescs= createDescriptors(elements);
  return hyperlinkDetectorDescs;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor

/**
 * Returns descriptors for all hyperlink detector extensions.
 *
 * @return an array with the contributed hyperlink detectors
 */
public static HyperlinkDetectorTargetDescriptor[] getContributedHyperlinkDetectorTargets() {
  IExtensionRegistry registry= Platform.getExtensionRegistry();
  IConfigurationElement[] elements= registry.getConfigurationElementsFor(HYPERLINK_DETECTOR_TARGETS_EXTENSION_POINT);
  HyperlinkDetectorTargetDescriptor[] hyperlinkDetectorDescs= createDescriptors(elements);
  return hyperlinkDetectorDescs;
}
origin: org.eclipse.platform/org.eclipse.search

/**
 * @return Returns all sorters contributed to the workbench.
 */
public List<SorterDescriptor> getSorterDescriptors() {
  if (fSorterDescriptors == null) {
    IConfigurationElement[] elements= Platform.getExtensionRegistry().getConfigurationElementsFor(NewSearchUI.PLUGIN_ID, SORTER_EXTENSION_POINT);
    fSorterDescriptors= createSorterDescriptors(elements);
  }
  return fSorterDescriptors;
}
origin: com.b2international.snowowl/com.b2international.snowowl.core

private String getTerminologyAttributeValueByOid(final String attribute, final String oid) {
  Preconditions.checkArgument(!StringUtils.isEmpty(attribute), "Terminology extension attribute argument cannot be empty.");
  Preconditions.checkNotNull(oid, "Terminology OID argument cannot be null.");
  Preconditions.checkArgument(!StringUtils.isEmpty(oid), "Terminology OID argument cannot be empty.");
  for (final IConfigurationElement terminologComponents : Platform.getExtensionRegistry().getConfigurationElementsFor(TERMINOLOGY_EXTENSION_POINT_ID)) {
    if (oid.equals(terminologComponents.getAttribute(OID_ATTRIBUTE))) {
      return terminologComponents.getAttribute(attribute);
    }
  }
  throw new IllegalArgumentException("No terminology extension has been registered for the passed in terminology OID: " + oid);
}
origin: com.b2international.snowowl/com.b2international.snowowl.core

public String getTerminologyOid(final Object object) {
  Preconditions.checkNotNull(object, "Object argument cannot be null.");
  for (final IConfigurationElement element : Platform.getExtensionRegistry().getConfigurationElementsFor(REPRESENTATION_EXTENSION_POINT_ID)) {
    final String representationClass = element.getAttribute(CLASS_ATTRIBUTE);
    if (ClassUtils.isClassAssignableFrom(object.getClass(), representationClass)) {
      final String terminologyComponentId = element.getAttribute(TERMINOLOGY_COMPONENT_ID_ATTRIBUTE);
      return getTerminologyOidByTerminologyComponentId(terminologyComponentId);
    }
  }
  throw new IllegalArgumentException("No terminology extension has been registered for the passed in object: " + object.getClass());
}
origin: org.eclipse.pde/org.eclipse.pde.ui

private void createCandidates() {
  ArrayList<Object> candidates;
  candidates = new ArrayList<>();
  IExtensionRegistry registry = Platform.getExtensionRegistry();
  IConfigurationElement[] elements = registry.getConfigurationElementsFor(PDEPlugin.getPluginId(), "templates"); //$NON-NLS-1$
  for (IConfigurationElement element : elements) {
    addTemplate(element, candidates);
  }
  fCandidates = candidates.toArray(new ITemplateSection[candidates.size()]);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * Returns all Java editor text hovers contributed to the workbench.
 *
 * @return an array with the contributed text hovers
 */
public static JavaEditorTextHoverDescriptor[] getContributedHovers() {
  IExtensionRegistry registry= Platform.getExtensionRegistry();
  IConfigurationElement[] elements= registry.getConfigurationElementsFor(JAVA_EDITOR_TEXT_HOVER_EXTENSION_POINT);
  JavaEditorTextHoverDescriptor[] hoverDescs= createDescriptors(elements);
  initializeFromPreferences(hoverDescs);
  return hoverDescs;
}
origin: org.eclipse/org.eclipse.jdt.ui

/**
 * Returns all Java editor text hovers contributed to the workbench.
 * 
 * @return an array with the contributed text hovers 
 */
public static JavaEditorTextHoverDescriptor[] getContributedHovers() {
  IExtensionRegistry registry= Platform.getExtensionRegistry();
  IConfigurationElement[] elements= registry.getConfigurationElementsFor(JAVA_EDITOR_TEXT_HOVER_EXTENSION_POINT);
  JavaEditorTextHoverDescriptor[] hoverDescs= createDescriptors(elements);
  initializeFromPreferences(hoverDescs);
  return hoverDescs;
}
origin: org.eclipse/org.eclipse.wst.server.ui

/**
 * Load the server images.
 */
private static void loadServerImages() {
  Trace.trace(Trace.CONFIG, "->- Loading .serverImages extension point ->-");
  IExtensionRegistry registry = Platform.getExtensionRegistry();
  loadServerImages(registry.getConfigurationElementsFor(ServerUIPlugin.PLUGIN_ID, ServerUIPlugin.EXTENSION_SERVER_IMAGES));
  ServerUIPlugin.addRegistryListener();
  Trace.trace(Trace.CONFIG, "-<- Done loading .serverImages extension point -<-");
}
org.eclipse.core.runtimeIExtensionRegistrygetConfigurationElementsFor

Javadoc

Returns all configuration elements from all extensions configured into the identified extension point. Returns an empty array if the extension point does not exist, has no extensions configured, or none of the extensions contain configuration elements.

Popular methods of IExtensionRegistry

  • getExtensionPoint
    Returns the extension point in this extension registry with the given namespace and extension point
  • 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
  • getNamespaces

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • getApplicationContext (Context)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top PhpStorm plugins
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