Java 类org.eclipse.core.runtime.IExtensionDelta 实例源码

项目:typescript.java    文件:IDEResourcesManager.java   
@Override
public void registryChanged(final IRegistryChangeEvent event) {
    IExtensionDelta[] deltas = event.getExtensionDeltas(TypeScriptCorePlugin.PLUGIN_ID,
            EXTENSION_TYPESCRIPT_RESOURCE_PARTICIPANTS);
    if (deltas != null) {
        synchronized (this) {
            for (IExtensionDelta delta : deltas) {
                IConfigurationElement[] cf = delta.getExtension().getConfigurationElements();
                if (delta.getKind() == IExtensionDelta.ADDED) {
                    addExtensionResourceParticipants(cf);
                } else {
                    removeExtensionResourceParticipants(cf);
                }
            }
        }
    }
}
项目:typescript.java    文件:IDETypeScriptRepositoryManager.java   
@Override
public void registryChanged(final IRegistryChangeEvent event) {
    IExtensionDelta[] deltas = event.getExtensionDeltas(TypeScriptCorePlugin.PLUGIN_ID,
            EXTENSION_TYPESCRIPT_REPOSITORIES);
    if (deltas != null) {
        synchronized (this) {
            for (IExtensionDelta delta : deltas) {
                IConfigurationElement[] cf = delta.getExtension().getConfigurationElements();
                if (delta.getKind() == IExtensionDelta.ADDED) {
                    addExtensionRepositories(cf);
                } else {
                    removeExtensionRepositories(cf);
                }
            }
        }
    }
}
项目:typescript.java    文件:TypeScriptConsoleConnectorManager.java   
protected void handleTypeScriptConsoleConnectorDelta(IExtensionDelta delta) {
    if (typeScriptConsoleConnectors == null) // not loaded yet
        return;

    IConfigurationElement[] cf = delta.getExtension().getConfigurationElements();

    List<ITypeScriptConsoleConnector> list = new ArrayList<ITypeScriptConsoleConnector>(
            typeScriptConsoleConnectors);
    if (delta.getKind() == IExtensionDelta.ADDED) {
        addTypeScriptConsoleConnectors(cf, list);
    } else {
        /*
         * int size = list.size(); ITypeScriptConsoleConfiguration[] st = new
         * ITypeScriptConsoleConfiguration[size]; list.toArray(st); int size2 =
         * cf.length;
         * 
         * for (int i = 0; i < size; i++) { for (int j = 0; j < size2; j++)
         * { if (st[i].getId().equals(cf[j].getAttribute("id"))) {
         * st[i].dispose(); list.remove(st[i]); } } }
         */
    }
    typeScriptConsoleConnectors = list;
}
项目:typescript.java    文件:NodejsInstallManager.java   
protected void handleNodejsInstallDelta(IExtensionDelta delta) {
    if (nodeJSInstalls == null) // not loaded yet
        return;

    IConfigurationElement[] cf = delta.getExtension().getConfigurationElements();

    List<IEmbeddedNodejs> list = new ArrayList<IEmbeddedNodejs>(nodeJSInstalls);
    if (delta.getKind() == IExtensionDelta.ADDED) {
        addNodejsInstalls(cf, list);
    } else {
        int size = list.size();
        NodejsInstall[] st = new NodejsInstall[size];
        list.toArray(st);
        int size2 = cf.length;

        for (int i = 0; i < size; i++) {
            for (int j = 0; j < size2; j++) {
                if (st[i].getId().equals(cf[j].getAttribute("id"))) {
                    st[i].dispose();
                    list.remove(st[i]);
                }
            }
        }
    }
    nodeJSInstalls = list;
}
项目:birt    文件:DNDService.java   
public void registryChanged( IRegistryChangeEvent event )
{
    IExtensionDelta[] deltas = event.getExtensionDeltas( "org.eclipse.birt.report.designer.ui", //$NON-NLS-1$
            "DNDServices" ); //$NON-NLS-1$
    for ( int i = 0; i < deltas.length; i++ )
    {
        if ( deltas[i].getKind( ) == IExtensionDelta.ADDED )
        {
            addRegistry( deltas[i].getExtensionPoint( ) );
        }
        else if ( deltas[i].getKind( ) == IExtensionDelta.REMOVED )
        {
            removeRegistry( deltas[i].getExtensionPoint( ) );
        }
    }
}
项目:codelens-eclipse    文件:CodeLensProviderRegistry.java   
@Override
public void registryChanged(IRegistryChangeEvent event) {
    IExtensionDelta[] deltas = event.getExtensionDeltas(CodeLensPlugin.PLUGIN_ID, EXTENSION_CODELENS_PROVIDERS);
    if (deltas != null) {
        for (IExtensionDelta delta : deltas)
            handleCodeLensProvidersDelta(delta);
    }
}
项目:codelens-eclipse    文件:CodeLensProviderRegistry.java   
protected void handleCodeLensProvidersDelta(IExtensionDelta delta) {
    if (!codeLensProviderLoaded) // not loaded yet
        return;

    IConfigurationElement[] cf = delta.getExtension().getConfigurationElements();

    // List<CodeLensProviderType> list = new
    // ArrayList<CodeLensProviderType>(
    // codeLensProviders);
    // if (delta.getKind() == IExtensionDelta.ADDED) {
    // loadCodeLensProvidersFromExtension(cf, list);
    // } else {
    // int size = list.size();
    // CodeLensProviderType[] st = new CodeLensProviderType[size];
    // list.toArray(st);
    // int size2 = cf.length;
    //
    // for (int i = 0; i < size; i++) {
    // for (int j = 0; j < size2; j++) {
    // if (st[i].getId().equals(cf[j].getAttribute("id"))) {
    // list.remove(st[i]);
    // }
    // }
    // }
    // }
    // codeLensProviders = list;
}
项目:codelens-eclipse    文件:CodeLensControllerRegistry.java   
@Override
public void registryChanged(IRegistryChangeEvent event) {
    IExtensionDelta[] deltas = event.getExtensionDeltas(CodeLensEditorPlugin.PLUGIN_ID,
            EXTENSION_CODELENS_CONTROLLER_FACTORIES);
    if (deltas != null) {
        for (IExtensionDelta delta : deltas)
            handleCodeLensProvidersDelta(delta);
    }
}
项目:codelens-eclipse    文件:CodeLensControllerRegistry.java   
protected void handleCodeLensProvidersDelta(IExtensionDelta delta) {
    if (!loaded) // not loaded yet
        return;

    IConfigurationElement[] cf = delta.getExtension().getConfigurationElements();

    // List<CodeLensProviderType> list = new
    // ArrayList<CodeLensProviderType>(
    // codeLensProviders);
    // if (delta.getKind() == IExtensionDelta.ADDED) {
    // loadCodeLensProvidersFromExtension(cf, list);
    // } else {
    // int size = list.size();
    // CodeLensProviderType[] st = new CodeLensProviderType[size];
    // list.toArray(st);
    // int size2 = cf.length;
    //
    // for (int i = 0; i < size; i++) {
    // for (int j = 0; j < size2; j++) {
    // if (st[i].getId().equals(cf[j].getAttribute("id"))) {
    // list.remove(st[i]);
    // }
    // }
    // }
    // }
    // codeLensProviders = list;
}
项目:typescript.java    文件:TypeScriptConsoleConnectorManager.java   
@Override
public void registryChanged(final IRegistryChangeEvent event) {
    IExtensionDelta[] deltas = event.getExtensionDeltas(TypeScriptCorePlugin.PLUGIN_ID,
            EXTENSION_TYPESCRIPT_CONSOLE_CONNECTORS);
    if (deltas != null) {
        for (IExtensionDelta delta : deltas)
            handleTypeScriptConsoleConnectorDelta(delta);
    }
}
项目:typescript.java    文件:NodejsInstallManager.java   
@Override
public void registryChanged(final IRegistryChangeEvent event) {
    IExtensionDelta[] deltas = event.getExtensionDeltas(TypeScriptCorePlugin.PLUGIN_ID, EXTENSION_NODEJS_INSTALLS);
    if (deltas != null) {
        for (IExtensionDelta delta : deltas)
            handleNodejsInstallDelta(delta);
    }
}
项目:eclipse-wtp-webresources    文件:WebResourcesFinderTypeProviderManager.java   
@Override
public void registryChanged(final IRegistryChangeEvent event) {
    IExtensionDelta[] deltas = event.getExtensionDeltas(
            WebResourcesCorePlugin.PLUGIN_ID,
            EXTENSION_WEB_RESOURCES_FINDER_TYPE_PROVIDERS);
    if (deltas != null) {
        for (IExtensionDelta delta : deltas)
            handleDelta(delta);
    }
}
项目:eclipse-wtp-webresources    文件:WebResourcesFinderTypeProviderManager.java   
protected void handleDelta(IExtensionDelta delta) {
    if (webResourcesFinderTypeProviders == null) // not loaded yet
        return;

    IConfigurationElement[] cf = delta.getExtension()
            .getConfigurationElements();

    List<IWebResourcesFinderTypeProvider> list = new ArrayList<IWebResourcesFinderTypeProvider>(
            webResourcesFinderTypeProviders);
    if (delta.getKind() == IExtensionDelta.ADDED) {
        addTernServerConfigurations(cf, list);
    }
    webResourcesFinderTypeProviders = list;
}
项目:eclipse-avro    文件:RegistryReader.java   
/**
 * Reads from the plugin registry and parses it.
 */
public void readRegistry()
{
  final IExtensionPoint point = pluginRegistry.getExtensionPoint(pluginID, extensionPointID);
  if (point != null)
  {
    IConfigurationElement[] elements = point.getConfigurationElements();
    for (int i = 0; i < elements.length; i++)
    {
      internalReadElement(elements[i], true);
    }

    pluginRegistry.addRegistryChangeListener
      (new IRegistryChangeListener()
       {
         public void registryChanged(IRegistryChangeEvent event)
         {
           IExtensionDelta[] deltas = event.getExtensionDeltas();
           for (int i = 0; i < deltas.length; ++i) 
           {
             IExtensionDelta delta = deltas[i];
             if (point.equals(delta.getExtensionPoint()))
             {
               boolean add = delta.getKind() == IExtensionDelta.ADDED;
               IExtension extension = delta.getExtension();
               IConfigurationElement[] configurationElement = extension.getConfigurationElements();
               for (int j = 0; j < configurationElement.length; ++j) 
               {
                 internalReadElement(configurationElement[j], add);
               }
             }
           }
         }
       });
    }
}
项目:clickwatch    文件:RegistryReader.java   
/**
 * Reads from the plugin registry and parses it.
 */
public void readRegistry()
{
  IExtensionPoint point = pluginRegistry.getExtensionPoint(pluginID, extensionPointID);
  if (point != null)
  {
    IConfigurationElement[] elements = point.getConfigurationElements();
    for (int i = 0; i < elements.length; i++)
    {
      internalReadElement(elements[i], true);
    }
  }

  pluginRegistry.addRegistryChangeListener
    (new IRegistryChangeListener()
     {
       public void registryChanged(IRegistryChangeEvent event)
       {
         IExtensionDelta[] deltas = event.getExtensionDeltas();
         for (int i = 0; i < deltas.length; ++i) 
         {
           IExtensionDelta delta = deltas[i];
           if (delta.getExtensionPoint().getUniqueIdentifier().equals(qualifiedExtensionPointID))
           {
             boolean add = delta.getKind() == IExtensionDelta.ADDED;
             IExtension extension = delta.getExtension();
             IConfigurationElement[] configurationElement = extension.getConfigurationElements();
             for (int j = 0; j < configurationElement.length; ++j) 
             {
               internalReadElement(configurationElement[j], add);
             }
           }
         }
       }
     });
}