Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324246 - Cannot pass the project classpath to external programs defined as builders
Summary: Cannot pass the project classpath to external programs defined as builders
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.7 M2   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-01 16:50 EDT by Alasdair Nottingham CLA
Modified: 2011-05-26 14:49 EDT (History)
3 users (show)

See Also:


Attachments
patch (18.13 KB, patch)
2010-09-02 13:08 EDT, Darin Wright CLA
no flags Details | Diff
patch with updated tests (16.34 KB, patch)
2010-09-07 14:50 EDT, Darin Wright CLA
no flags Details | Diff
patch for description (1.04 KB, patch)
2010-09-08 06:42 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alasdair Nottingham CLA 2010-09-01 16:50:08 EDT
Build Identifier: 3.6.0 I20100608-0911

I defined an external program as a builder. The external builder called java and the OpenJPA JPA enhancer. The enhancer works from the JVM classpath. However their is no variable defined that would allow you to pass the project classpath into the java -cp argument. You have to enter it again.

It would be really good if there was a variable like ${project_classpath} perhaps that can take an argument, so you could do this ${project_classpath:${project_name}} and have it expand to the classpath

Reproducible: Always
Comment 1 Darin Wright CLA 2010-09-02 13:08:59 EDT
Created attachment 178068 [details]
patch

Adds a ${project_classpath:name} variable, resolver, and a UI for configuring/selecting a Java project. Added tests as well.
Comment 2 Darin Wright CLA 2010-09-02 13:09:52 EDT
Fixed.
Comment 3 Markus Keller CLA 2010-09-07 14:17:39 EDT
ProjectClasspathArugumentSelector and its message strings have a typo (Ar*u*gument).

Is there a special reason why ${project_classpath} without arguments is not supported? I would expect this variable to work like ${project_name}. This would avoid clumsy constructs like ${project_classpath:${project_name}}.
Comment 4 Darin Wright CLA 2010-09-07 14:50:15 EDT
(In reply to comment #3)
> ProjectClasspathArugumentSelector and its message strings have a typo
> (Ar*u*gument).
> Is there a special reason why ${project_classpath} without arguments is not
> supported? I would expect this variable to work like ${project_name}. This
> would avoid clumsy constructs like ${project_classpath:${project_name}}.

Thanks Markus - I fixed up the typo. Added support for selected project when no argument is specified.
Comment 5 Darin Wright CLA 2010-09-07 14:50:39 EDT
Created attachment 178352 [details]
patch with updated tests
Comment 6 Markus Keller CLA 2010-09-08 06:42:51 EDT
Created attachment 178381 [details]
patch for description

Final missing piece is the description of the variable.
Comment 7 Darin Wright CLA 2010-09-08 11:01:19 EDT
Thanks, Markus. Applied.