Community
Participate
Working Groups
In the 2.0 GM6 release of Eclipse, the External Tools API only includes 2 runner types, AntRunner and ProgramRunner. Since AntRunner is specific to Ant, all other External Tools use the ProgramRunner. In those cases where the user would like run a Java program, it would be useful if the user could take advantage of various Java related features exposed by Eclipse. Many of the features are specific to the JDT, so it's likely that the JDT would have to be a prerequisite. The simplest improvement would be to offer an additional variable that resolves to the current java runtime e.g. ${java_vm}. Of course, to resolve this variable, some functionality from StandardVMRunner would have to be exposed, specifically: StandardVMRunner.constructProgramString(LaunchConfiguration config). This nicely brings in the subject of LaunchConfigurations. The workbench has a LaunchConfiguration infrastructure for running (and debugging) Java applications and you'd need one to call constructProgramString. If you're running an External Tool that happens to be a Java executable, it makes sense that you take advantage of the Java Launching environment. And for this I would propose a JavaRunner which does just that. I would be happy to contribute either a ${java_vm} variable or a JavaRunner class to Eclipse.
We are looking at integrating with the Debug view and Console view (they're not actually JDT-specific) for both Ant and regular external tools. We're also looking at opening up the external tools support to allow new flavours of external tools to be added. As you point out, allowing new variables to be added would be a useful extension point.
I'm in the middle of putting together an API/extension points for the external tools. The goal is to make Ant a user of this API instead of being hard-coded into external tool. The plan is to allow other "types" of external tools (i.e. providing a "runner" implementation). I also have plans to include an extension point for variables but it's still vague in my mind still. We are reworking the aweful UI also ;-) Once these changes are released in a 2.1 integration build, I will let you know. If you are willing to contribute the JavaRunner/variable(s) that would be great as there are many items on my list right now. Please annotate the PR if you are interested.
I'd be happy to contribute the variable/runner extension.
Great, I will let you know when the "beta" API becomes available for you to try it out.
External tools has evolved to use launch configurations. To define your own type of external tool, you define a launch configuration with a category attribute of "org.eclipse.ui.externaltools". However, I would suggest using the existing "java application" launch configuration to run java programs - it should meet your needs.
marking as verified.
Actually, I should mark as "wont fix" - since we are not explicitly providing a Java Runner, as requested.
marking as "wont fix". However, the API exists (but will not be finalized until 2.1) such that a client could contribute their own type of external tool.