Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Launching and consoles
Launching and consoles [message #329844] Tue, 08 July 2008 11:11 Go to next message
Kilian is currently offline KilianFriend
Messages: 3
Registered: July 2009
Junior Member
Dear community,

I'm working on a plug-in with a launch configuration that starts an
external compiler. The output of the compiler is displayed in a console.
This works by calling the following in my custom
ILaunchConfigurationDelegate implementation:

DebugPlugin.newProcess(launch, process, Utilities.join(commandList, " "));

What I don't know: What console does the debug plug-in use to display
the output of the process? How can I tell it to create a special console
of a specific type for this?

I think I need this because I want to decorate the console output with
hyperlinks using the extension point
org.eclipse.ui.console.consolePatternMatchListeners.

Thanks in advance
Kilian
Re: Launching and consoles [message #329872 is a reply to message #329844] Tue, 08 July 2008 21:20 Go to previous messageGo to next message
John J. Barton is currently offline John J. BartonFriend
Messages: 311
Registered: July 2009
Senior Member
Kilian Evang wrote:
> Dear community,
>
> I'm working on a plug-in with a launch configuration that starts an
> external compiler. The output of the compiler is displayed in a console.
> This works by calling the following in my custom
> ILaunchConfigurationDelegate implementation:
>
> DebugPlugin.newProcess(launch, process, Utilities.join(commandList, " "));
>
> What I don't know: What console does the debug plug-in use to display
> the output of the process? How can I tell it to create a special console
> of a specific type for this?
>
> I think I need this because I want to decorate the console output with
> hyperlinks using the extension point
> org.eclipse.ui.console.consolePatternMatchListeners.
>
> Thanks in advance
> Kilian

Put the returned IProcess into something like this:
private void attachNewConsole(IProcess process) {
IStreamListener toConsole = new FerryProcessIOToConsole();
process.getStreamsProxy().getErrorStreamMonitor().addListene r(toConsole);
process.getStreamsProxy().getOutputStreamMonitor().addListen er(toConsole);
}
Re: Launching and consoles [message #329938 is a reply to message #329872] Thu, 10 July 2008 21:36 Go to previous message
Kilian is currently offline KilianFriend
Messages: 3
Registered: July 2009
Junior Member
John J Barton wrote:
> Kilian Evang wrote:
>> What I don't know: What console does the debug plug-in use to display
>> the output of the process? How can I tell it to create a special console
>> of a specific type for this?
>
> Put the returned IProcess into something like this:
> private void attachNewConsole(IProcess process) {
> IStreamListener toConsole = new FerryProcessIOToConsole();
>
> process.getStreamsProxy().getErrorStreamMonitor().addListene r(toConsole);
>
> process.getStreamsProxy().getOutputStreamMonitor().addListen er(toConsole);
> }

Thanks!

As to what kind of console to attach, it's a pity that the
ProcessConsole is not part of the public API.
Previous Topic:Pre-populating External Tools
Next Topic:org.eclipse.runtime.products Extension point
Goto Forum:
  


Current Time: Thu Dec 26 15:08:11 GMT 2024

Powered by FUDForum. Page generated in 0.05221 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top