Java Code Examples for org.eclipse.core.runtime.IExtensionDelta#ADDED

The following examples show how to use org.eclipse.core.runtime.IExtensionDelta#ADDED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IDEResourcesManager.java    From typescript.java with MIT License 6 votes vote down vote up
@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);
				}
			}
		}
	}
}
 
Example 2
Source File: IDETypeScriptRepositoryManager.java    From typescript.java with MIT License 6 votes vote down vote up
@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);
				}
			}
		}
	}
}
 
Example 3
Source File: TypeScriptConsoleConnectorManager.java    From typescript.java with MIT License 6 votes vote down vote up
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;
}
 
Example 4
Source File: NodejsInstallManager.java    From typescript.java with MIT License 6 votes vote down vote up
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;
}
 
Example 5
Source File: DNDService.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
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( ) );
		}
	}
}