[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-text-dev] Line Highlighting
|
We do use our own preference store (only for keyword colors), so I will try
the method you have described. However, it seems confusing for the user to
have the workbench editor preferences not work on the page you provide and
be repeated on our page. Is there a way to provide multiple preference
stores? Or can I augment your text editor store?
Thanks,
Mary Kroening
Amzi! inc.
At 10:31 AM 3/21/2003 +0100, you wrote:
Mary,
If your editor does not rely on its own preference store, it can get the
line highlighting, the overview ruler, and the squigglies in the text by
inheriting the preference store of TextEditor. TextEditor sets its
preference store in initializeEditor. When overriding this method, call
super and remove any call to setPreferenceStore from your code. Following
this path, the appearance of your editor is determined by the preference
settings of Workbench>Editors>Text Editor.
If you rely on your own preference store you have to implement preference
pages that control the setting for the keys predefined in
TextEditorPreferenceConstants and in the extensions defined for the
markerAnnotationSpecification extension point of
org.eclipse.ui.workbench.texteditor plug-in. If you don't want to be
depending on the extension point you have to override those methods of
TextEditor that use MarkerAnnotationPreferences for initialization purposes.
Kai
At 01:10 PM 3/20/2003 -0500, you wrote:
According to the 2.1 docs the default Text Editor does line highlighting.
Indeed if I open with the editor named "Text Editor" I get line
highlighting. My own editor extends class TextEditor, but line highlighting
does not work. Looking at the source code, TextEditor seems to setup
SourceViewerDecoratorSupport.
How do I enable cursor line highlighting in my editor? Do I have to
implement a LineBackgroundListener and Painter as the CDT CEditor does? Or
is there a simpler approach?
A nit on the documentation, if I open a file with the editor named "Default
Editor" it does not do line highlighting, but the What's New in
2.1/Workbench help file says this is available in the "default text editor".
Thanks,
Mary Kroening
Amzi! inc.
_______________________________________________
platform-text-dev mailing list
platform-text-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-text-dev