Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » IProcess
IProcess [message #162731] Thu, 27 November 2003 05:17 Go to next message
Eclipse UserFriend
Originally posted by: brogger.daimi.au.dk

Hi.

I building an IDE in Eclipse. I've created a button and when it's pushed
I want to invoke my compiler on the edited file. At first I simply used
Runtime.exec(...) and wrote the output in my own console.

But now I want to use the same console as the JDT uses (ID
org.eclipse.debug.ui.ConsoleView). I can see that it has a method named
setViewerInput(IProcess) - so my guess is that if you give the console
your process, then the output will be written in the window. Nothing
happens, but I want it to happen, so what am I doing wrong?

Thanks,
Mads

PS. To me it's very counter intuitive that when one creates an IProcess
using DebugPlugin.newProcess(..., Process, ...) - a running Process is
given to newProcess(...), but the IProcess that is created doesn't run.
Only when you call Launch in the ILaunchConfigurationDelegate class, the
IProcess starts running. It's not at all obvious to me how IProcess and
ILaunchConfigurationDelegate are connected!
Re: IProcess [message #162924 is a reply to message #162731] Thu, 27 November 2003 10:44 Go to previous message
Eclipse UserFriend
In 3.0, a generic console plug-in has been created to simplify the use of
consoles. See org.eclipse.ui.console. You can create an instance of a
MessageConsole, and register it with the console manager. Then, you can
write messages to the console via it's API. You do not need to create a
process to do this. The "process console" is now contributed by the
debugger - which implements a console per system process.

Whether a process is running or not (and its lifecycle) is up to the
implementation of the IProcess (see ITerminate). A launch delegate can
create one or more processes and contribute them to a launch.

Darin

"Mads Brogger Enevoldsen" <brogger@daimi.au.dk> wrote in message
news:3FC5CF32.421AC063@daimi.au.dk...
> Hi.
>
> I building an IDE in Eclipse. I've created a button and when it's pushed
> I want to invoke my compiler on the edited file. At first I simply used
> Runtime.exec(...) and wrote the output in my own console.
>
> But now I want to use the same console as the JDT uses (ID
> org.eclipse.debug.ui.ConsoleView). I can see that it has a method named
> setViewerInput(IProcess) - so my guess is that if you give the console
> your process, then the output will be written in the window. Nothing
> happens, but I want it to happen, so what am I doing wrong?
>
> Thanks,
> Mads
>
> PS. To me it's very counter intuitive that when one creates an IProcess
> using DebugPlugin.newProcess(..., Process, ...) - a running Process is
> given to newProcess(...), but the IProcess that is created doesn't run.
> Only when you call Launch in the ILaunchConfigurationDelegate class, the
> IProcess starts running. It's not at all obvious to me how IProcess and
> ILaunchConfigurationDelegate are connected!
>
Previous Topic:Help appServer performance
Next Topic:current selected stack frame
Goto Forum:
  


Current Time: Fri Jul 18 05:24:32 EDT 2025

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

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

Back to the top