Writing to Console [message #157004] |
Fri, 14 November 2003 13:21  |
Eclipse User |
|
|
|
Originally posted by: mcfaddin.us.ibm.com
I am developing a new plug-in which writes messages to stdout and stderr.
I am building the plug-in, exporting its JAR and plugin.xml files to the
eclipse\plugins directory and restarting the Eclipse environment.
However I am not seeing the output in the console viewer.
I have both options "Show when program writes to standard out" and "Show
when program writes to standard error" checked in the dialog
Window->Preferences->Debug->Console.
Is there another flag that needs to be thrown somewhere?
|
|
|
Re: Writing to Console [message #157029 is a reply to message #157004] |
Fri, 14 November 2003 13:39   |
Eclipse User |
|
|
|
Try running your eclipse by starting it in a terminal using java.exe and not
javaw.exe. You will see your output on the terminal window. I don't think
that stdout normally goes to the console. I may be wrong.
David
--
David L. Whitehurst
aka. PiratePete
http://www.piratepetesoftware.com
dlwhitehurst@comcast.net
"Scott McFaddin" <mcfaddin@us.ibm.com> wrote in message
news:bp36g6$fhp$1@eclipse.org...
> I am developing a new plug-in which writes messages to stdout and stderr.
> I am building the plug-in, exporting its JAR and plugin.xml files to the
> eclipse\plugins directory and restarting the Eclipse environment.
>
> However I am not seeing the output in the console viewer.
>
> I have both options "Show when program writes to standard out" and "Show
> when program writes to standard error" checked in the dialog
> Window->Preferences->Debug->Console.
>
> Is there another flag that needs to be thrown somewhere?
>
>
|
|
|
Re: Writing to Console [message #157171 is a reply to message #157004] |
Fri, 14 November 2003 17:16   |
Eclipse User |
|
|
|
I'm pretty sure that "Show when program writes to standard out" only means
"programs that are children of Eclipse"; i.e. programs launched from within
Eclipse (this does not include plugins).
I would suggest logging your message to the PDE log (plugins come with a
log(IStatus) method). Or, you could create two new OutputStreams (one for
your plugin error, and one for your plugin out) wrapped in IStreamMonitors.
And have those wrapped in an IStreamsProxy which can be connected to the
console via Console.connect(IStreamsProxy).
Check out the API for org.eclipse.debug.ui.console.
Del.
"Scott McFaddin" <mcfaddin@us.ibm.com> wrote in message
news:bp36g6$fhp$1@eclipse.org...
> I am developing a new plug-in which writes messages to stdout and stderr.
> I am building the plug-in, exporting its JAR and plugin.xml files to the
> eclipse\plugins directory and restarting the Eclipse environment.
>
> However I am not seeing the output in the console viewer.
>
> I have both options "Show when program writes to standard out" and "Show
> when program writes to standard error" checked in the dialog
> Window->Preferences->Debug->Console.
>
> Is there another flag that needs to be thrown somewhere?
>
>
|
|
|
Re: Writing to Console [message #157229 is a reply to message #157171] |
Fri, 14 November 2003 22:57  |
Eclipse User |
|
|
|
Enough people seem to ask this question, but I guess nobody has actually
raised a feature request.
You need to launch a 'program' from within your plugin. Any output your
program has to stdout / stderr will then go to the Console view. There are
articles on the Eclipse website that explain how to launch a program, see
Launching Java Applications Programmatically Darin Wright (IBM) August 26,
2003
Note that the Console is part of the Debug component of Eclipse. When I
looked I couldn't find a straightforward API call that you can use instead
of System.out.println() and thereby avoid the launching framework.
Tim.
"Del" <delmyers@cs.uvic.ca> wrote in message
news:bp3jcj$uj1$1@eclipse.org...
> I'm pretty sure that "Show when program writes to standard out" only means
> "programs that are children of Eclipse"; i.e. programs launched from
within
> Eclipse (this does not include plugins).
>
> I would suggest logging your message to the PDE log (plugins come with a
> log(IStatus) method). Or, you could create two new OutputStreams (one for
> your plugin error, and one for your plugin out) wrapped in
IStreamMonitors.
> And have those wrapped in an IStreamsProxy which can be connected to the
> console via Console.connect(IStreamsProxy).
>
>
> Check out the API for org.eclipse.debug.ui.console.
>
> Del.
>
>
> "Scott McFaddin" <mcfaddin@us.ibm.com> wrote in message
> news:bp36g6$fhp$1@eclipse.org...
> > I am developing a new plug-in which writes messages to stdout and
stderr.
> > I am building the plug-in, exporting its JAR and plugin.xml files to the
> > eclipse\plugins directory and restarting the Eclipse environment.
> >
> > However I am not seeing the output in the console viewer.
> >
> > I have both options "Show when program writes to standard out" and "Show
> > when program writes to standard error" checked in the dialog
> > Window->Preferences->Debug->Console.
> >
> > Is there another flag that needs to be thrown somewhere?
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03160 seconds