Hi folks,
I have been looking into
the use of the deprecated Preferences for Bug 285699
- [fiximprove]:
The type Preferences is deprecated. The goal of
the fix is to replace the use of Preferences with IEclipsePreferences. I could use a few
pointers from those more familiar with the code. Below is simplified
summary of
where preferences are being used followed by a few questions.
MTJ
Core
The deprecated Preferences are
obtained from MTJCore via getPluginPreferences(). Preferences are used
by:
- MTJCore
- AntennaBuildExport
- OTAServer
- EmulatorRunner
- MidletSuiteFactory
- MTJCorePreferenceInitializer
- PreferenceAccessor
PreferenceAccessor is a
helper wrapper around preferences. In PreferenceAccessor,
the proper IEclipsePreferences appear to
be used only for project preferences while Preferences are used
elsewhere. PreferenceAccessor
is called by:
- PackageBuilder
- PreprocessorBuilder
- StandardPreverifier
- ObfuscatorTool
- MidletSuiteProject
MTJ UI
Preferences are used
by:
- AntennaBuildExportAction
- NewMidletProjectWizardPageJavaSettings
- SymbolDefinitionsImportWizardPage
- DeviceManagementPreferencePage
- J2MEOTAPreferencePage
- J2MEPreferencePage
- NewJ2MEProjectPreferencePage
- ObfuscationPreferencePage
- PackagingPreferencePage
- PreprocessPreferencePage
- PreverificationPreferencePage
- SymbolDefinitionsImportWizard
- MTJUIPreferenceInitializer
Preferences from JavaCore are used
by:
- SourceViewerInformationControl
Questions:
In MTJUIPreferenceInitializer, there is a
method initializeDefaultPreferences() with the
comment “Synchronize the
preferences
between the core and UI plug-ins”. It appears that this
method
will cause MTJCorePreferenceInitializer.initializeDefaultPreferences(prefs) to be
called twice. What is the purpose of this synchronization?