Eclipse Platform
Release 3.1

org.eclipse.debug.ui.console
Interface IConsole


public interface IConsole

A console that displays output and writes input to a process. Implementors of IConsoleColorProvider should connect streams to a console document when connected to.

Clients are not intended to implement this interface.

Since:
2.1
See Also:
IConsoleColorProvider

Method Summary
 void addLink(IConsoleHyperlink link, int offset, int length)
          Deprecated. replaced with addLink(IHyperlink link, int offset, int length)
 void addLink(IHyperlink link, int offset, int length)
          Adds the given hyperlink to this console.
 void addPatternMatchListener(IPatternMatchListener matchListener)
          Adds the given pattern match listener to this console.
 void connect(IStreamMonitor streamMonitor, String streamIdentifer)
          Connects this console to the given stream monitor, uniquely identified by the given identifier.
 void connect(IStreamsProxy streamsProxy)
          Connects this console to the given streams proxy.
 IDocument getDocument()
          Returns the document associated with this console.
 IProcess getProcess()
          Returns the process associated with this console.
 IRegion getRegion(IConsoleHyperlink link)
          Deprecated. replaced with getRegion(IHyperlink link) instead
 IRegion getRegion(IHyperlink link)
          Returns the region of text associated with the given hyperlink, or null if the given hyperlink is not contained in this console.
 IOConsoleOutputStream getStream(String streamIdentifier)
          Returns the stream associated with the specified stream identifier.
 void removePatternMatchListener(IPatternMatchListener matchListener)
          Removes the given pattern match listener from this console.
 

Method Detail

connect

public void connect(IStreamsProxy streamsProxy)
Connects this console to the given streams proxy. This associates the standard in, out, and error streams with the console. Keyboard input will be written to the given proxy.

Parameters:
streamsProxy -

connect

public void connect(IStreamMonitor streamMonitor,
                    String streamIdentifer)
Connects this console to the given stream monitor, uniquely identified by the given identifier. This allows for more than the standard (in, out, error) streams to be connected to the console.

Parameters:
streamMonitor -
streamIdentifer -

addLink

public void addLink(IConsoleHyperlink link,
                    int offset,
                    int length)
Deprecated. replaced with addLink(IHyperlink link, int offset, int length)

Adds the given hyperlink to this console. The link will be notified when entered, exited, and activated.

If the link's region (offset/length) is within the console's document current bounds, it is added immediately. Otherwise, the link is added when the console's document grows to contain the link's region.

Parameters:
link - the hyperlink to add
offset - the character offset within the console document where the text assoicated with the hyperlink begins
length - the length of the associated hyperlink text

addLink

public void addLink(IHyperlink link,
                    int offset,
                    int length)
Adds the given hyperlink to this console. The link will be notified when entered, exited, and activated.

If the link's region (offset/length) is within the console's document current bounds, it is added immediately. Otherwise, the link is added when the console's document grows to contain the link's region.

Parameters:
link - the hyperlink to add
offset - the character offset within the console document where the text assoicated with the hyperlink begins
length - the length of the associated hyperlink text
Since:
3.1

getRegion

public IRegion getRegion(IConsoleHyperlink link)
Deprecated. replaced with getRegion(IHyperlink link) instead

Returns the region of text associated with the given hyperlink, or null if the given hyperlink is not contained in this console.

Parameters:
link - a console hyperlink
Returns:
region of text associated with the hyperlink, or null

getRegion

public IRegion getRegion(IHyperlink link)
Returns the region of text associated with the given hyperlink, or null if the given hyperlink is not contained in this console.

Parameters:
link - a console hyperlink
Returns:
region of text associated with the hyperlink, or null
Since:
3.1

getDocument

public IDocument getDocument()
Returns the document associated with this console.

Returns:
document

getProcess

public IProcess getProcess()
Returns the process associated with this console.

Returns:
the process associated with this console

addPatternMatchListener

public void addPatternMatchListener(IPatternMatchListener matchListener)
Adds the given pattern match listener to this console. The listener will be connected and receive match notifications.

Parameters:
matchListener - the listener to add
Since:
3.1

removePatternMatchListener

public void removePatternMatchListener(IPatternMatchListener matchListener)
Removes the given pattern match listener from this console. The listener will be disconnected and will no longer receive match notifications.

Parameters:
matchListener - the pattern match listener to remove.
Since:
3.1

getStream

public IOConsoleOutputStream getStream(String streamIdentifier)
Returns the stream associated with the specified stream identifier.

Parameters:
streamIdentifier - Uniquely identifies the required stream
Returns:
The stream or null if none found with matching streamIdentifier
Since:
3.1

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.