private IConsoleColorProvider getColorProvider(String type)
	{
		if (fColorProviders == null)
		{
			fColorProviders = new HashMap<String, IConfigurationElement>();
			IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(IDebugUIConstants.PLUGIN_ID, IDebugUIConstants.EXTENSION_POINT_CONSOLE_COLOR_PROVIDERS);
			IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
			for (int i = 0; i < elements.length; i++)
			{
				IConfigurationElement extension = elements[i];
				fColorProviders.put(extension.getAttribute("processType"), extension); //$NON-NLS-1$
			}
		}
		IConfigurationElement extension = fColorProviders.get(type);
		if (extension != null)
		{
			try
			{
				Object colorProvider = extension.createExecutableExtension("class"); //$NON-NLS-1$
				if (colorProvider instanceof IConsoleColorProvider)
				{
					return (IConsoleColorProvider) colorProvider;
				}
				VdmDebugPlugin.logError(MessageFormat.format("Extension {0} must specify an instanceof IConsoleColorProvider for class attribute.", //$NON-NLS-1$
						new Object[] { extension.getDeclaringExtension().getUniqueIdentifier() }));
			} catch (CoreException e)
			{
				VdmDebugPlugin.log(e);
			}
		}
		// no color provider found of specified type, return default color
		// provider.
		if (fDefaultColorProvider == null)
		{
			fDefaultColorProvider = new ConsoleColorProvider();
		}
		return fDefaultColorProvider;
	}
private IConsoleColorProvider getColorProvider ( String type ) { if ( fColorProviders == null ) { fColorProviders = new HashMap < String , IConfigurationElement > ( ) ; IExtensionPoint extensionPoint = Platform . getExtensionRegistry ( ) . getExtensionPoint ( IDebugUIConstants . PLUGIN_ID , IDebugUIConstants . EXTENSION_POINT_CONSOLE_COLOR_PROVIDERS ) ; IConfigurationElement [ ] elements = extensionPoint . getConfigurationElements ( ) ; for ( int i = 0 ; i < elements . length ; i ++ ) { IConfigurationElement extension = elements [ i ] ; fColorProviders . put ( extension . getAttribute ( "processType" ) , extension ) ; } } IConfigurationElement extension = fColorProviders . get ( type ) ; if ( extension != null ) { try { Object colorProvider = extension . createExecutableExtension ( "class" ) ; if ( colorProvider instanceof IConsoleColorProvider ) { return ( IConsoleColorProvider ) colorProvider ; } VdmDebugPlugin . logError ( MessageFormat . format ( "Extension {0} must specify an instanceof IConsoleColorProvider for class attribute." , new Object [ ] { extension . getDeclaringExtension ( ) . getUniqueIdentifier ( ) } ) ) ; } catch ( CoreException e ) { VdmDebugPlugin . log ( e ) ; } } if ( fDefaultColorProvider == null ) { fDefaultColorProvider = new ConsoleColorProvider ( ) ; } return fDefaultColorProvider ; }
Returns a new console document color provider extension for the given process type, or <code>null</code> if none.

@param type
corresponds to <code>IProcess.ATTR_PROCESS_TYPE</code>
@return IConsoleColorProvider