Community
Participate
Working Groups
20021113 after i switched to project settings i cannot go back to workspace settings again
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.