/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.debug.ui.console; import org.eclipse.debug.core.model.IProcess; import org.eclipse.swt.graphics.Color; /** * Provides coloring for a console document. When a process is added to a * registered launch the debug plug-in creates a console document for the * process. By default, a document is created which is connected to the standard * input, output, and error streams associated with the process. A client may * override the default coloring by specifying a custom content provider for a * process type. A process type is defined via the process attribute * IProcess. ATTR_PROCESS_TYPE. *

* A console color provider extension is defined in plugin.xml. * Following is an example definition of a console color * provider extension. *

 * <extension point="org.eclipse.debug.ui.consoleColorProviders">
 *   <consoleColorProvider 
 *      id="com.example.ExampleConsoleColorProvider"
 *      class="com.example.ExampleConsoleColorProviderClass"
 *      processType="ExampleProcessType">
 *   </consoleColorProvider>
 * </extension>
 * 
* The attributes are specified as follows: * *

*

* Clients may implement this interface. *

* @since 2.1 */ public interface IConsoleColorProvider { /** * Returns whether the console associated with this color provider's * process can currently accept keyboard input. This attribute is dynamic * and may change over the lifetime of a process/document. * * @return whether the console associated with this color provider's * process can currently accept keyboard input */ public boolean isReadOnly(); /** * Returns the color to draw output associated with the given stream. * * @param streamIdentifer the identifier of the stream * @return Color */ public Color getColor(String streamIdentifer); /** * Connects this color provider to the given process and console. * This color provider should connect its streams to the given console * document. * * @param process the process to connect this color provider to * @param console the console to connect this color provider to */ public void connect(IProcess process, IConsole console); /** * Disconnects this color provider. */ public void disconnect(); }