congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IExtensionRegistry.getExtensions
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.eclipse.core.runtime.IExtensionRegistry.getExtensions (Showing top 8 results out of 315)

origin: org.eclipse/org.eclipse.pde.runtime

private Object[] getFolderChildren(Bundle bundle, int id) {
  Object[] array = null;
  String bundleId = bundle.getSymbolicName();
  switch (id) {
    case IBundleFolder.F_EXTENSIONS :
      array = Platform.getExtensionRegistry().getExtensions(bundleId);
      break;
    case IBundleFolder.F_EXTENSION_POINTS :
      array = Platform.getExtensionRegistry().getExtensionPoints(bundleId);
      break;
    case IBundleFolder.F_IMPORTS :
      array = getManifestHeaderArray(bundle, Constants.REQUIRE_BUNDLE);
      break;
    case IBundleFolder.F_LIBRARIES :
      array = getManifestHeaderArray(bundle, Constants.BUNDLE_CLASSPATH);
      break;
  }
  Object[] result = null;
  if (array != null && array.length > 0) {
    result = new Object[array.length];
    for (int i = 0; i < array.length; i++) {
      result[i] = createAdapter(array[i], id);
    }
  }
  return result;
}
public Object getParent(Object element) {
origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

public IPluginExtension[] findExtensionsForPlugin(IPluginModelBase base) {
  IContributor contributor = fStrategy.createContributor(base);
  if (contributor == null)
    return new IPluginExtension[0];
  IExtension[] extensions = getRegistry().getExtensions(fStrategy.createContributor(base));
  ArrayList<PluginExtension> list = new ArrayList<>();
  for (int i = 0; i < extensions.length; i++) {
    PluginExtension extension = new PluginExtension(extensions[i]);
    extension.setModel(getExtensionsModel(base));
    extension.setParent(base.getExtensions());
    list.add(extension);
  }
  return list.toArray(new IPluginExtension[list.size()]);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

try {
  registry.addContribution(new BufferedInputStream(new FileInputStream(pxml)), contributor, false, null, null, this);
  IExtension[] extensions = registry.getExtensions(contributor);
  for (int i = 0; i < extensions.length; i++) {
    IExtension extension = extensions[i];
origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

public IExtension[] findExtensions(String extensionPointId, boolean activeOnly) {
  ArrayList<IExtension> list = new ArrayList<>();
  IExtensionPoint point = getExtensionPoint(extensionPointId);
  if (point != null) {
    IExtension[] extensions = point.getExtensions();
    if (!activeOnly)
      return extensions;
    for (int i = 0; i < extensions.length; i++) {
      IPluginModelBase base = getPlugin(extensions[i].getContributor(), true);
      if (base != null && base.isEnabled())
        list.add(extensions[i]);
    }
  } else {
    IPluginModelBase[] bases = activeOnly ? PluginRegistry.getActiveModels() : PluginRegistry.getAllModels();
    for (int i = 0; i < bases.length; i++) {
      IContributor contributor = fStrategy.createContributor(bases[i]);
      if (contributor == null)
        continue;
      IExtension[] extensions = getRegistry().getExtensions(contributor);
      for (int j = 0; j < extensions.length; j++) {
        if (extensions[j].getExtensionPointUniqueIdentifier().equals(extensionPointId))
          list.add(extensions[j]);
      }
    }
  }
  return list.toArray(new IExtension[list.size()]);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.registry

public void _ns(CommandInterpreter ci) throws Exception {
  String namespace = getArgument(ci);
  if (namespace == null) {
    String[] namespaces = RegistryFactory.getRegistry().getNamespaces();
    ci.println("Namespace(s):"); //$NON-NLS-1$
    ci.println("-------------------"); //$NON-NLS-1$
    for (int i = 0; i < namespaces.length; i++)
      ci.println(namespaces[i]);
    return;
  }
  IExtensionRegistry registry = RegistryFactory.getRegistry();
  IExtensionPoint[] extpts = registry.getExtensionPoints(namespace);
  ci.println("Extension point(s):"); //$NON-NLS-1$
  ci.println("-------------------"); //$NON-NLS-1$
  for (int i = 0; i < extpts.length; i++)
    displayExtensionPoint(extpts[i], ci);
  if (verbose) {
    ci.println("\nExtension(s):"); //$NON-NLS-1$
    ci.println("-------------------"); //$NON-NLS-1$
    IExtension[] exts = RegistryFactory.getRegistry().getExtensions(namespace);
    for (int j = 0; j < exts.length; j++)
      displayExtension(exts[j], ci, true /*full*/);
  }
}
origin: org.eclipse.equinox/registry

public void _ns(CommandInterpreter ci) throws Exception {
  String namespace = getArgument(ci);
  if (namespace == null) {
    String[] namespaces = RegistryFactory.getRegistry().getNamespaces();
    ci.println("Namespace(s):"); //$NON-NLS-1$
    ci.println("-------------------"); //$NON-NLS-1$
    for (int i = 0; i < namespaces.length; i++)
      ci.println(namespaces[i]);
    return;
  }
  IExtensionRegistry registry = RegistryFactory.getRegistry();
  IExtensionPoint[] extpts = registry.getExtensionPoints(namespace);
  ci.println("Extension point(s):"); //$NON-NLS-1$
  ci.println("-------------------"); //$NON-NLS-1$
  for (int i = 0; i < extpts.length; i++)
    displayExtensionPoint(extpts[i], ci);
  if (verbose) {
    ci.println("\nExtension(s):"); //$NON-NLS-1$
    ci.println("-------------------"); //$NON-NLS-1$
    IExtension[] exts = RegistryFactory.getRegistry().getExtensions(namespace);
    for (int j = 0; j < exts.length; j++)
      displayExtension(exts[j], ci, true /*full*/);
  }
}
origin: org.eclipse.platform/org.eclipse.equinox.registry

public void _ns(CommandInterpreter ci) throws Exception {
  String namespace = getArgument(ci);
  if (namespace == null) {
    String[] namespaces = RegistryFactory.getRegistry().getNamespaces();
    ci.println("Namespace(s):"); //$NON-NLS-1$
    ci.println("-------------------"); //$NON-NLS-1$
    for (int i = 0; i < namespaces.length; i++)
      ci.println(namespaces[i]);
    return;
  }
  IExtensionRegistry registry = RegistryFactory.getRegistry();
  IExtensionPoint[] extpts = registry.getExtensionPoints(namespace);
  ci.println("Extension point(s):"); //$NON-NLS-1$
  ci.println("-------------------"); //$NON-NLS-1$
  for (int i = 0; i < extpts.length; i++)
    displayExtensionPoint(extpts[i], ci);
  if (verbose) {
    ci.println("\nExtension(s):"); //$NON-NLS-1$
    ci.println("-------------------"); //$NON-NLS-1$
    IExtension[] exts = RegistryFactory.getRegistry().getExtensions(namespace);
    for (int j = 0; j < exts.length; j++)
      displayExtension(exts[j], ci, true /*full*/);
  }
}
origin: org.eclipse/equinox-registry

public void _ns(CommandInterpreter ci) throws Exception {
  String namespace = getArgument(ci);
  if (namespace == null) {
    String[] namespaces = RegistryFactory.getRegistry().getNamespaces();
    ci.println("Namespace(s):"); //$NON-NLS-1$
    ci.println("-------------------"); //$NON-NLS-1$
    for (int i = 0; i < namespaces.length; i++)
      ci.println(namespaces[i]);
    return;
  }
  IExtensionRegistry registry = RegistryFactory.getRegistry();
  IExtensionPoint[] extpts = registry.getExtensionPoints(namespace);
  ci.println("Extension point(s):"); //$NON-NLS-1$
  ci.println("-------------------"); //$NON-NLS-1$
  for (int i = 0; i < extpts.length; i++)
    displayExtensionPoint(extpts[i], ci);
  if (verbose) {
    ci.println("\nExtension(s):"); //$NON-NLS-1$
    ci.println("-------------------"); //$NON-NLS-1$
    IExtension[] exts = RegistryFactory.getRegistry().getExtensions(namespace);
    for (int j = 0; j < exts.length; j++)
      displayExtension(exts[j], ci, true /*full*/);
  }
}
org.eclipse.core.runtimeIExtensionRegistrygetExtensions

Javadoc

Returns all extensions declared in the given namespace. Returns an empty array if no extensions are declared in the namespace.

Popular methods of IExtensionRegistry

  • 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
  • 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

  • Updating database using SQL prepared statement
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getApplicationContext (Context)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Vim 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