Summary: | project compiler settings : cannot go back to worspace settings | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Adam Kiezun <akiezun> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | CC: | martinae |
Version: | 2.0 | ||
Target Milestone: | 2.1 M4 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Adam Kiezun
2002-11-14 05:46:32 EST
critical - i could not find a good workaround the problem is in IJavaProject.setOptions, it only iterates the element in the new map, but not all options: cleared options are not recognixed and not cleared in the underlying store. I fixed it for M3 by adding a setOptions(null) first. public void setOptions(Map newOptions) { Preferences preferences; if (newOptions == null){ setPreferences(preferences = new Preferences()); } else { preferences = getPreferences(); Iterator keys = newOptions.keySet().iterator(); while (keys.hasNext()){ String key = (String)keys.next(); if (!JavaModelManager.OptionNames.contains (key)) continue; // unrecognized option // no filtering for encoding (custom encoding for project is allowed) String value = (String)newOptions.get(key); preferences.setValue(key, value); } } // persist options savePreferences(preferences); } Fixed. The preference object is always reinitialized. Verified. |