Bug 131707 - Cannot add classpath variables when starting with -pluginCustomization option
Summary: Cannot add classpath variables when starting with -pluginCustomization option
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.2   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-14 10:03 EST by Maarten Coene CLA
Modified: 2006-04-13 13:26 EDT (History)
0 users

See Also:


Attachments
Proposed patch and regression test (7.11 KB, patch)
2006-04-05 09:40 EDT, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maarten Coene CLA 2006-03-14 10:03:23 EST
Hi,

I have a properties file with custom Eclipse settings. If I define a classpath variable in this file, it is not picked up by eclipse.

Steps to reproduce:
1. Create a new file: mysettings.ini
2. Add the following property: org.eclipse.jdt.core/org.eclipse.jdt.core.classpathVariable.JAVA_REPOSITORY=C\:/working/repository
3. Start eclipse: 'eclipse.exe -pluginCustomization mysettings.ini'
4. Go to 'Window > Preferences > Java > Build Path > Classpath Variables'.

As you can see, the 'JAVA_REPOSITORY' variable is not listed there.

If I import this file with 'File > Import > Preferences', it works. However, I want to avoid this manual step.

regards,
Maarten
Comment 1 Jerome Lanneluc CLA 2006-03-17 04:28:26 EST
((IScopeContext) new InstanceScope()).getNode(JavaCore.PLUGIN_ID) doesn't contain the key "org.eclipse.jdt.core.classpathVariable.JAVA_REPOSITORY".

Moving to Platform Runtime.
Comment 2 DJ Houghton CLA 2006-03-17 06:25:01 EST
The plug-in customization mechanism is for customizing default properties, not instance (workspace) properties.

Your key/value pair should appear here:
   new DefaultScope().getNode(JavaCore.PLUGIN_ID)

Here is a small doc that I wrote up on plug-in customization:

http://www.eclipse.org/eclipse/platform-core/documents/user_settings/plugin_customization.html
Comment 3 Maarten Coene CLA 2006-03-17 07:23:51 EST
So there is no way to to add default classpath variables in Eclipse, which are available to all workspaces? 
If this is the case, could you add such functionality?

thanks,
Maarten
Comment 4 DJ Houghton CLA 2006-03-17 07:33:05 EST
When I add the value to the plugin customization file, it appears in the JDT default preferences. I do not know how the Jave -> Build Path -> Classpath Variables page/values are calculted though. Jerome?
Comment 5 Jerome Lanneluc CLA 2006-03-17 09:37:17 EST
Indeed we look at instance preferences only. I'll see what can be done here.
Comment 6 Jerome Lanneluc CLA 2006-04-05 09:40:34 EDT
Created attachment 37730 [details]
Proposed patch and regression test
Comment 7 Philipe Mulet CLA 2006-04-05 09:42:51 EDT
+1 for 3.2RC1
Comment 8 Jerome Lanneluc CLA 2006-04-05 10:09:44 EDT
Released patch and regression test
Comment 9 Frederic Fusier CLA 2006-04-13 13:26:12 EDT
Verified for 3.2 RC1 using build I20060413-0010.