Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324246

Summary: Cannot pass the project classpath to external programs defined as builders
Product: [Eclipse Project] JDT Reporter: Alasdair Nottingham <alasdair>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: darin.eclipse, markus.kell.r, Michael_Rennie
Version: 3.7   
Target Milestone: 3.7 M2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch
none
patch with updated tests
none
patch for description none

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.