Bug 21914 - [ExternalTools] Java Runner
Summary: [ExternalTools] Java Runner
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui
Depends on:
Blocks:
 
Reported: 2002-07-25 13:36 EDT by Jamie McCrindle CLA
Modified: 2002-11-15 12:21 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jamie McCrindle CLA 2002-07-25 13:36:57 EDT
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.
Comment 1 Nick Edgar CLA 2002-07-25 15:31:01 EDT
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.

Comment 2 Simon Arsenault CLA 2002-07-25 15:52:38 EDT
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.
Comment 3 Jamie McCrindle CLA 2002-07-26 06:06:39 EDT
I'd be happy to contribute the variable/runner extension.
Comment 4 Simon Arsenault CLA 2002-07-26 08:25:16 EDT
Great, I will let you know when the "beta" API becomes available for you to try 
it out.
Comment 5 Darin Wright CLA 2002-11-15 12:19:24 EST
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.
Comment 6 Darin Wright CLA 2002-11-15 12:19:36 EST
marking as verified.
Comment 7 Darin Wright CLA 2002-11-15 12:20:17 EST
Actually, I should mark as "wont fix" - since we are not explicitly providing a 
Java Runner, as requested.
Comment 8 Darin Wright CLA 2002-11-15 12:21:13 EST
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.