Community
Participate
Working Groups
Follow-up of bug 152562. JavaProject.setOption(Object,Object) method should remove key only if given value is equals to default one. JavaCore.getOption(optionName) is not the default value but the inherited one.
With this bug suggestion, for default= "1.1", workspace="1.2", project="1.3" after 'project.setOption(SETTING1, "1.1")', 'project.getOption(SETTING1)' would result in "1.2" I think the user expects to read the value he just wrote...
You're right, I missed this point! In fact JavaCore options still behave like org.eclipse.core.runtime.Preferences and not as org.eclipse.core.runtime.preferences.IEclipsePreferences... As our options rely on IEclipsePreferences since 3.0 it should be good to make them behaving the same. So, that means that: 1) setOption should never remove any key, just set given value to given key (this bug) 2) user should have we should have an API to remove an option (bug 15252) Does it make more sense?
I have some problems with bug references... :-( Previous comment should obviously read bug 152562...
That makes sense! But as said, I'm not so much for a new API but just using 'null' in setOptions.
Unfortunately work on performances didn't let me enough time to finalize a fix for this bug. Not sure if I can put it in 3.3 or if I'd have to defer it to next version...
Released for 3.4M2 in HEAD stream.
Test case is OptionTests#testBug152578. Verified for 3.4 M2 using build I20070917-0010.