Bug 171601 - Remove internal references to Java preferences
Summary: Remove internal references to Java preferences
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M5   Edit
Assignee: Brian Bauman CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on: 215265
Blocks:
  Show dependency tree
 
Reported: 2007-01-24 15:49 EST by Wassim Melhem CLA
Modified: 2008-01-15 11:51 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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