Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Routing PE plugin stderr output to Eclipse view

That looks like what i did not too long ago...
public MessageConsole findConsole(String name) {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();

for (int i = 0; i < existing.length; i++) {
if (name.equals(existing[i].getName()))
return (MessageConsole) existing[i];
}
// no console found, so create a new one
MessageConsole myConsole = new MessageConsole(name, null);
conMan.addConsoles(new IConsole[] { myConsole });
return myConsole;
}

...Beth

Beth Tibbitts (859) 243-4981 (TL 545-4981)
Eclipse Parallel Tools Platform http://eclipse.org/ptp
Mailing Address: IBM Corp., Coldstream Research Campus, 745 West New Circle Road, Lexington, KY 40511

Inactive hide details for Dave Wootton---06/03/2009 03:33:27 PM---I'm looking at changes to my PE plugin to route stderr outputDave Wootton---06/03/2009 03:33:27 PM---I'm looking at changes to my PE plugin to route stderr output generated by

          Dave Wootton/Poughkeepsie/IBM@IBMUS
          Sent by: ptp-dev-bounces@xxxxxxxxxxx

          06/03/2009 03:33 PM

          Please respond to
          Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>

To

ptp-dev@xxxxxxxxxxx

cc


Subject

[ptp-dev] Routing PE plugin stderr output to Eclipse view

I'm looking at changes to my PE plugin to route stderr output generated by
the application run by the user to an Eclipse view. Does it make sense to
use the Eclipse console view as the target for the stderr output rather
than implementing a new view to display the output? I think this would be
sufficient for my purposes, where the intent is to send whatever the
application writes to stderr to a view it is not lost.

It looks like I can get a console to write to by getting the console
plugin object via ConsolePlugin.getDefault(), calling getConsoleManager()
on that object then calling getConsoles() to get a list of consoles and
picking the first console that is an instance of IOConsole. If there is no
instance of IOConsole, I have to create one and add it to the consoles
managed by the ConsoleManager object. Does this make sense?
Dave
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev

GIF image

GIF image

GIF image


Back to the top