@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); } } } } }
@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); } } } } }
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; }
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; }
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( ) ); } } }
@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); } }
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; }
@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); } }
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; }
@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); } }
@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); } }
@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); } }
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; }
/** * 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); } } } } }); } }
/** * 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); } } } } }); }