Reputation: 1007
I have an editor that extends TextEditor. This defaults to having access to Text Editor preferences which is set via "Editor > Text Editor" in the Preference dialog. But this also means call to that getPreferenceStore() will return the TextEditor preference store.
I don't mind this, except I would also like to have a second preference store with preferences specific to my editor.
How would I go about doing this without the 2 preferences conflicting each other?
Would I need to declare the second preference store locally to my Plugin/Activator class and override the getPreferenceStore() method locally? If so, would EditorsPlugin.getDefault().getPreferenceStore() and MyEditorPlugin.getDefault().getPreferenceStore() return appropriate preferences?
Thanks!
Upvotes: 0
Views: 195
Reputation: 1309
I don't thinks there is any problem. You have your editor extend TextEditor,you use your MyEditorPlugin.getDefault().getPreferenceStore(), the two perfreence store are totally separated. You can create your own PropertyChangeListener to listen property change. In all, you can do everything you like because the two perference store are totally separated. You can you can handle your own perference using the standard listener mechanism.
Upvotes: 1