Bug 171601

Summary: Remove internal references to Java preferences
Product: [Eclipse Project] PDE Reporter: Wassim Melhem <wassim.melhem>
Component: UIAssignee: Brian Bauman <baumanbr>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: baumanbr, daniel_megert
Version: 3.3Keywords: bugday
Target Milestone: 3.4 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 215265    
Bug Blocks:    

Description Wassim Melhem CLA 2007-01-24 15:49:56 EST
To be a good platform citizen, PDE currently reuses the JDT color preferences for their plain properties editor to color the build.properties file.

This is fine, but we currently access the jdt preferences via JavaPlugin.getDefault().getCombinedPreferenceStore(...) which is internal.

After consulting with our friend DJ, the preferred way to access other plug-in's preferences is via

Platform.getPreferencesService().getString("org.eclipse.jdt.ui", KEY, null, null)
Comment 1 Brian Bauman CLA 2007-06-15 13:08:33 EDT
We should try to play nice in 3.4
Comment 2 Wassim Melhem CLA 2007-10-12 01:22:44 EDT
Brian, suggestions in comment 0 are not enough.

our editors need to attach a listener to the JDT/UI preference store so that when the user changes preferences in the properties editor prefs, our build.properties page updates.

I believe JDT needs to provide access to their preference store.

Perhpas a static API method on JavaUI or something, since it is not recommended to give clients access to the activator (JavaPlugin)
Comment 3 Dani Megert CLA 2008-01-15 03:10:21 EST
For workspace JDT preferences use:
  org.eclipse.jdt.ui.PreferenceConstants.getPreferenceStore()
If the JDT preferences can also be set on a project use
  org.eclipse.jdt.ui.PreferenceConstants.getPreference(String, IJavaProject)

HTH
Dani
Comment 4 Dani Megert CLA 2008-01-15 03:11:47 EST
Sorry, I didn't mean to close this bug. I wanted to close bug 215265.
Comment 5 Brian Bauman CLA 2008-01-15 11:51:34 EST
Just want to get this one off the books.  

Updated:
ColorManager
SourceViewerConfigurationFactory