Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-text-dev] Preference reorganization

We have reorganized the preferences and the preference pages in text land quite a bit, which will be of interest to editor implementors, especially those that have been matching the text and java editor or even have been using their preferences.


Here we go:

A) Removed Preferences (in the text & java editors):
- Show overview ruler (overview ruler is always shown)


B) Shared Preferences
Some settings have been made shared, e.g. the settings are configured on the new 'All Text Editors' preference page and apply to all text based editors such as Java, Text, Properties files...:

- All previous text editor settings:
  - highlight current line (+color)
  - print margin (+ color + column)
  - show line numbers (+ color)
  - selection fore- and background colors
  - displayed tab width

- All accessibility settings (moved to their own page):
  - use custom caret (+ thick caret)
  - quick diff character mode

In a custom editor implementation you may or may not respect the shared preferences. If you do, you can remove all references on your preference pages and also from your code if:
-  you inherit from AbstractDecoratedTextEditor, and
- you use a CombinedPreferenceStore to read preferences from your own preference store, but also from the preference store of the org.eclipse.ui.editors preference store. See JavaPlugin.getCombinedPreferenceStore for an example.

If you want to keep rolling your own editor-specific preferences, that's fine as well - but you may have to hide some property change events from your editor's super class (JavaEditor does that for the 'displayed tab width' value).


C) Moved & Shared Preferences

Some settings previously only available in the Java editor have been pushed down to text land and made shared preferences.

- hyperlink navigation (+ colors + modifier)
This is a bigger issue as the hyperlink navigation framework has been pushed down to text.
   See the build notes.
- editor fore- and background colors - disable overwrite mode


D) Behavioral changes

- Show quickdiff and Enable Folding now are global settings, no longer "defaults for new editors". So changing the preference (which you can also do from the ruler context menu now) is immediately reflected in all open editors. This change is still being debated over.

- AbstractDecoratedTextEditor now includes a 'Toggle Quick Diff' action in its set of pre-installed actions. There is no need any longer for you to contribute such an action to get in enabled per default.


E) API extensions

AbstractDecoratedTextEditor shows a 'Preferences...' action in both its context and ruler context menus. Once the preference page supports filtering, only a subset of 'interesting' pages will be displayed in the such opened preference dialog. You can change the set of pages by extending or replacing AbstractDecoratedTextEditor.collectContextMenuPreferencePages.




Back to the top