Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IExtensionRegistry


    }
   
    private InputStream findGlobalResource(String resourceName) {
        try {
            // Look if someone implemented an extension point to retrive the platform
            IExtensionRegistry reg = org.eclipse.core.runtime.Platform.getExtensionRegistry();
            if (reg != null) {
                IConfigurationElement[] elt = reg.getConfigurationElementsFor("com.ibm.commons.GlobalResourceFactory"); // $NON-NLS-1$
                for( int i=0; i<elt.length; i++ ) {
                    if( "globalResourceFactory".equalsIgnoreCase(elt[i].getName()) ) { // $NON-NLS-1$
                        try {
                            Object o = elt[i].createExecutableExtension("class"); // $NON-NLS-1$
                            IGlobalResourceProvider factory = (IGlobalResourceProvider)o;
View Full Code Here


    }

    private IPlatformService findService(String serviceId) {
        try {
            // Look if someone implemented an extension point to retrive the platform
            IExtensionRegistry reg = org.eclipse.core.runtime.Platform.getExtensionRegistry();
            if (reg != null) {
                IConfigurationElement[] elt = reg.getConfigurationElementsFor("com.ibm.commons.ServiceFactory"); // $NON-NLS-1$
                for( int i=0; i<elt.length; i++ ) {
                    if( "serviceFactory".equalsIgnoreCase(elt[i].getName()) ) { // $NON-NLS-1$
                        try {
                            Object o = elt[i].createExecutableExtension("class"); // $NON-NLS-1$
                            IServiceFactory factory = (IServiceFactory)o;
View Full Code Here

        if (contributedDetectors != null) {
            return contributedDetectors;
        }
        TreeMap<String, String> set = new TreeMap<String, String>();

        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint point = registry.getExtensionPoint(EXTENSION_POINT_ID);
        if (point == null) {
            return set;
        }
        IExtension[] extensions = point.getExtensions();
        for (IExtension extension : extensions) {
View Full Code Here

    }
    return new IWizardPage[]{};
  }

  private static IExtension[] findExtension(String extensionId) {
    IExtensionRegistry registry = Platform.getExtensionRegistry();
    IExtensionPoint extensionPoint = registry
        .getExtensionPoint(extensionId);
    return extensionPoint.getExtensions();
  }
View Full Code Here

    }
    providers = tmp;
  }

  private static IExtension[] findExtension(String extensionId) {
    IExtensionRegistry registry = Platform.getExtensionRegistry();
    IExtensionPoint extensionPoint = registry
        .getExtensionPoint(extensionId);
    return extensionPoint.getExtensions();
  }
View Full Code Here

        "-Dcom.sun.management.jmxremote.ssl=false");
    return wc;
  }

  private static IExtension[] findExtension(String extensionId) {
    IExtensionRegistry registry = Platform.getExtensionRegistry();
    IExtensionPoint extensionPoint = registry
        .getExtensionPoint(extensionId);
    return extensionPoint.getExtensions();
  }
View Full Code Here

   * This method can be called more than once in order to reload from
   * a changed extension registry.
   * </p>
   */
  public void reload() {
    IExtensionRegistry registry= Platform.getExtensionRegistry();
    List elements= new ArrayList(Arrays.asList(registry.getConfigurationElementsFor(TextEditorPlugin.PLUGIN_ID, EXTENSION_POINT)));
   
    List descriptors= new ArrayList();
    Map descriptorMap= new HashMap();
   
    for (Iterator iter= elements.iterator(); iter.hasNext();) {
View Full Code Here

   * 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;
  }
View Full Code Here

   * 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;
  }
View Full Code Here

   * order to reload from a changed extension registry.
   * </p>
   */
  public synchronized void reloadExtensions() {
    fDefaultDescriptor= null;
    IExtensionRegistry registry= Platform.getExtensionRegistry();
    List list= new ArrayList();

    IConfigurationElement[] elements= registry.getConfigurationElementsFor(TextEditorPlugin.PLUGIN_ID, TextEditorPlugin.REFERENCE_PROVIDER_EXTENSION_POINT);
    for (int i= 0; i < elements.length; i++) {
      ReferenceProviderDescriptor desc= new ReferenceProviderDescriptor(elements[i]);
      if (desc.getId().equals("org.eclipse.ui.internal.editors.quickdiff.LastSaveReferenceProvider")) //$NON-NLS-1$
        fDefaultDescriptor= desc;
      list.add(desc);
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.IExtensionRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.