Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-mtj-dev] Bug 285699 - [fiximprove]: The type Preferences is deprecated

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?

 

IEclipsePreferences Default scope should apply to defaults. Are Instance scopes most appropriate for project settings and Configuration scopes most appropriate for MTJ preferences settings?

 

In our existing code, are we using the deprecated Preferences for all MTJ workspace-level preferences and IEclipsePreferences for project-level preferences? Is it a simple case of replacing the use of Preferences with Configuration scope IEclipsePreferences?

 

 

 

 

Regards,

Jon

 

---

Senior Software Developer, Eclipse Tools

Research In Motion

905-629-4746 x15333 / Mobile: 519 500-23167

jdearden@xxxxxxx

 

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

Back to the top