I'm writing an Eclipse plugin with a custom launch configuration, i.e. a launch()
method inside a subclass of LaunchConfigurationDelegate
. This method essentially just calls Runtime.exec()
, but when I write to System.out from within launch()
it goes to the console of the Eclipse instance which is debugging the plugin, rather than to the console of the plugin instance itself. I've analysed the ILaunchConfiguration
and ILaunch
arguments to the method but cannot find anywhere that they specify any output/error streams I can write to.
As is recommended in the tutorials, I have 2 separate plugins running together; one which handles the UI stuff (LaunchConfigurationTab
,LaunchConfigurationTabGroup
,LaunchShortcut
,) and the other which contains the LaunchConfigurationDelegate
itself.
I created a console in my UI plugin using this code, and I can write to it fine from within the UI code. But I cannot figure out how to direct output generated in my non-UI plugin to the console created in my UI plugin.
I've read this post and this one, but they do not specify how to "get ahold" of the output which is generated within the launch()
method in the first place.
Any pointers would be really welcome, I am stuck!