Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 201475 Details for
Bug 346010
[model] strange initialization dependency in OptionTests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed fix
Bug_346010_fix.patch (text/plain), 3.44 KB, created by
Stephan Herrmann
on 2011-08-14 11:41:38 EDT
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Stephan Herrmann
Created:
2011-08-14 11:41:38 EDT
Size:
3.44 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/JavaModelManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java,v >retrieving revision 1.468 >diff -u -r1.468 JavaModelManager.java >--- model/org/eclipse/jdt/internal/core/JavaModelManager.java 28 Jul 2011 17:07:05 -0000 1.468 >+++ model/org/eclipse/jdt/internal/core/JavaModelManager.java 14 Aug 2011 15:27:04 -0000 >@@ -4788,10 +4788,11 @@ > * @param optionValue The value of the option. If <code>null</code>, then > * the option will be removed from the preferences instead. > * @param eclipsePreferences The eclipse preferences to be updated >+ * @param otherOptions more options being stored, used to avoid conflict between deprecated option and its compatible > * @return <code>true</code> if the preferences have been changed, > * <code>false</code> otherwise. > */ >- public boolean storePreference(String optionName, String optionValue, IEclipsePreferences eclipsePreferences) { >+ public boolean storePreference(String optionName, String optionValue, IEclipsePreferences eclipsePreferences, Map otherOptions) { > int optionLevel = this.getOptionLevel(optionName); > if (optionLevel == UNKNOWN_OPTION) return false; // unrecognized option > >@@ -4809,6 +4810,8 @@ > eclipsePreferences.remove(optionName); // get rid off old preference > String[] compatibleOptions = (String[]) this.deprecatedOptions.get(optionName); > for (int co=0, length=compatibleOptions.length; co < length; co++) { >+ if (otherOptions != null && otherOptions.containsKey(compatibleOptions[co])) >+ continue; // don't overwrite explicit value of otherOptions at compatibleOptions[co] > if (optionValue == null) { > eclipsePreferences.remove(compatibleOptions[co]); > } else { >@@ -4862,7 +4865,7 @@ > if (defaultValue != null && defaultValue.equals(value)) { > value = null; > } >- storePreference(key, value, instancePreferences); >+ storePreference(key, value, instancePreferences, newOptions); > } > try { > // persist options >Index: model/org/eclipse/jdt/internal/core/JavaProject.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java,v >retrieving revision 1.447 >diff -u -r1.447 JavaProject.java >--- model/org/eclipse/jdt/internal/core/JavaProject.java 10 May 2011 19:29:43 -0000 1.447 >+++ model/org/eclipse/jdt/internal/core/JavaProject.java 14 Aug 2011 15:27:07 -0000 >@@ -2928,7 +2928,7 @@ > public void setOption(String optionName, String optionValue) { > // Store option value > IEclipsePreferences projectPreferences = getEclipsePreferences(); >- boolean modified = JavaModelManager.getJavaModelManager().storePreference(optionName, optionValue, projectPreferences); >+ boolean modified = JavaModelManager.getJavaModelManager().storePreference(optionName, optionValue, projectPreferences, null); > > // Write changes > if (modified) { >@@ -2957,7 +2957,7 @@ > Map.Entry entry = (Map.Entry) entries.next(); > String key = (String) entry.getKey(); > String value = (String) entry.getValue(); >- javaModelManager.storePreference(key, value, projectPreferences); >+ javaModelManager.storePreference(key, value, projectPreferences, newOptions); > } > > // reset to default all options not in new map
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 346010
:
195797
|
201475
|
201476
|
202014