Community
Participate
Working Groups
When click File->Export/Import->General->Preference , some path information such as JAVA_HOME, ECLIPSE_HOME path and some configuaration that I don't want to import is imported. So, one of the two results is generated: 1, I give up using Import/Export preferences 2, Bad preferences is imported
1). The ability to export only certain preferences currently exists and its up to the plug-in developers to provide the filters. I would recommend opening bug reports for specific preference values that you don't want exported. 2). I don't see JAVA_HOME and ECLIPSE_HOME in my exported preferences. Can you paste the line in your export file with those values here so we can look at it? Thanks.
When I exported preferences from 3.1.1, and imported to 3.2m2, some thing related to some path value is wrong, I don't know why. I opened the exported config.epf, I saw the following: /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.classpathVariable.JUNIT_HOME=c\:/eclipse311/plugins/org.junit_3.8.1 you can see the path is c\:/eclipse311 My Eclipse 3.2M2 is installed in c:\eclipse322 I think many path related value is wrong. I attached the .epf, you can watch it yourself
Created attachment 33990 [details] Eclipse preference export file I installed Eclipse 3.1.1 in c:\eclipse311, and exported the preference to this file. I installed eclipse 3.2 M2 in c:\eclipse322, when I import the .epf into Eclipse 3.2 M2, some path-related issues happened
There are many path related value in the .epf file: /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.classpathVariable.JUNIT_HOME=c\:/eclipse311/plugins/org.junit_3.8.1 /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.classpathVariable.ECLIPSE_HOME=c\:/eclipse311 /instance/org.eclipse.pde.core/platform_path=c\:\\eclipse311
Moving to JDT/Core for comment. I think this is a case where a preference modify listener could be registered and strip out values which don't make sense importing from legacy files? (see PreferenceModifyListener)
There's already a preference listener on JavaModelManager. We can add a filter for some specific variables... However, there are still some remaining issue: 1) we cannot filter other plugins variables (pde platform_path in comment 4 for example) 2) I'm relunctant to hard code the list of variable names which must be filtered. I think this list should be made of variables which have an initializer... Jerome, do you agree with this point?
I agree that we should filter out the imported value of classpath variables that have an initializer. fx please enter a separate bug against PDE if you want them to filter out /instance/org.eclipse.pde.core/platform_path
Created attachment 34026 [details] Patch to fix this issue Jerome, may you review this fix? Thx
Released in HEAD.
Verified for 3.2 M5 using build I20060215-0010