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

Bug 96265

Summary: [Preferences] No warnings when importing an illegal Eclipse preference
Product: [Eclipse Project] Platform Reporter: Agent Smith <haefeleuser>
Component: UIAssignee: Duong Nguyen <duongn>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: Darin_Swanson, Tod_Creasey
Version: 3.1Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Agent Smith CLA 2005-05-23 02:14:39 EDT
I migrated to Eclipse 3.0.2 from Eclipse 3.0.1.

Then I imported our Eclipse preferences which were exported in Eclipse 3.0.1.

Everything worked fine until I started one of our Ant scripts. They compile 
classes with the 
property "build.compiler=org.eclipse.jdt.core.JDTCompilerAdapter".

I got this error when I run the Ant script: "Compiler 
Adapter 'org.eclipse.jdt.core.JDTCompilerAdapter' can't be found"

Finally I found the reason for it in a line of our Eclipse preference file:

/instance/org.eclipse.ant.core/additional_entries=C\:\\j2sdk1.4.2_04
\\lib\\tools.jar,C\:/eclipse/plugins/org.eclipse.jdt.core_3.0.1/jdtCompilerAdapt
er.jar,C\:/eclipse/plugins/org.eclipse.jdt.core_3.0.1/jdtcore.jar,C\:/eclipse/pl
ugins/org.apache.ant_1.6.2/lib/commons-net-1.2.2.jar,

The directory "org.eclipse.jdt.core_3.0.1" does not exist in Eclipse 3.0.2. 
When I updated the line, the Ant script worked.

I want to suggest the following: When I import the Eclipse preferences, Eclipse 
should check if it is good or not. If it contains a path to a library which 
does not exist, I should see a dialog box with a warning message when importing 
the preference file.

You could also warn the user with a dialog box whenever he imports a Eclipse 
preference file which was exported with a older version of Eclipse.

Or maybe you have other ideas to improve the feedback for the Eclipse user, so 
that he does not run into strange errors.

Some people are reluctant to update their Eclipse version because of these 
problems and the time lost by it.
Comment 1 Darin Swanson CLA 2005-05-23 12:00:38 EDT
Thank you for the bug report.
This would be an interesting enhancement to investigate. Unlikely that it would 
pertain to the Ant integration only...you would want support for all 
preferences.

Deferred to post 3.1
Comment 2 Agent Smith CLA 2005-05-23 13:21:34 EDT
Yes, I think this suggestion or enhancement would not be limited to Ant.

It applies to any Eclipse plugin, even 3rd party.

Like a Weblogic plugin: If the path to certain .jar file is not valid, then warn
the user in a dialog box when he imports the illegal Eclipse preferences. Or
even warn him every time he accesses Eclipse > Preferences.

I think there is some kind of validation already implemented for the Eclipse
preferences, but certainly not for the case I mentioned.

It would be great if you can implement this validation for all plugins in a
generic way.

By the way, I also would like that not all preferences must be exported, but
that you can choose which preferences you want to export (a subset) and which
not (the majority in most cases). For teamwork this would be great! But I think
you already work on this (if not, please tell me so).
Comment 3 Darin Swanson CLA 2005-05-23 13:27:32 EDT
Reopen to reassign
Comment 4 Tod Creasey CLA 2007-04-20 16:13:37 EDT
We currently have no plans to work on this although we would be willing to review a patch