Bug 125360 - IJavaProject#setOption() doesn't work if same option as default
Summary: IJavaProject#setOption() doesn't work if same option as default
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-26 12:48 EST by Jerome Lanneluc CLA
Modified: 2006-02-15 05:11 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2006-01-26 12:48:46 EST
I20060125

If the default value for JavaCore.COMPILER_SOURCE is JavaCore.VERSION_1_3, the following fails:

IJavaProject project = ...
project.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
project.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3);
String option = project.getOption(JavaCore.COMPILER_SOURCE, true);
assertEquals(JavaCore.VERSION_1_3, option);
Comment 1 Frederic Fusier CLA 2006-01-31 05:03:21 EST
Fixed and released in HEAD.

Problem came from JavaProject.setOption(String,String) which didn't remove option from project preference when value was equals to default one...

Test case added in OptionTests
Comment 2 David Audel CLA 2006-02-15 05:11:02 EST
Verified for 3.2 M5 using build I20060215-0010