Community
Participate
Working Groups
An ant launch confuration allways logs to the console. Here is a short brief what I do: 1. New config: ILaunchConfigurationType type = manager.getLaunchConfigurationType( IExternalToolConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE); workingCopy = type.newInstance(null, name);
2. .......... set other options. 3. In my case there is no need to log the output to the console: (There is no need to add this stuff, both attributes are null per default.) workingCopy.setAttribute( IExternalToolConstants.ATTR_SHOW_CONSOLE, (String) null); workingCopy.setAttribute( IExternalToolConstants.ATTR_CAPTURE_OUTPUT, (String) null); 4. When I launch the config: configuration.launch(mode, monitor); The build is done correctly but the output goes to the console. But the defaults are no capture no console.
Consider for 2.1 (time permitting). Do in conjuction with bug 27805. Current workaround is to specify -quiet for the Ant build.
This can be done in the ant launch delegate simply by honoring the ATTR_CAPTURE_OUTPUT attribute. If the attribute is false (should be true by default), then do not assign a build logger to the AntRunner. The "show console" attribute is now a duplicate, and should be deprecated or removed. The preference is now controlled by the debug preference "Debug -> Console -> Show when program writes to standard out/error".
For the case of a program, a process is created, which currently does not support suppression of output. We could define a new process attribute in IProcess that indicates if output should be captured. The default setting is to capture output. The attribute can be passed into the process on creation, via the map in the factory method DebugPlugin.newProcess(ILaunch, Process, String, Map). Even when output is not to be captured, the process should still read output from the processs as it runs (as some processes will block if their output is not read). However the process should return "null" to #getStreamsProxy in this case.
I believe this will involve more work on the Ant side as well. The org.apache.ant will add a default build logger for use if we do not assign one. We need to make a "null" logger for the ant build (which we used to have but deleted...maybe can be resurrected).
I have resurrected the NullBuildLogger.
I can understand the desire to not have the console pop up when output appears (and we currently support this), but is there really a use case for not capturing the output at all?
Bug 27805 describes a case where this is useful. Since we can't selectively disable the "Show when..." options for the console, this is the only way to prevent the console from popping up for specific configs.
Implemented. The option to capture output can now be configured on all external tool launch configs. Please verify, DarinW.
Does not work for programs
D'oh. The buildlogger fix only applies to Ant tools types. The option shouldn't have appeared on all external tools, only Ant configs Fixed. Please verify.
I`ve tried it with the current nightly build. No output :-) Thanks.
Verified