apply default syntax colouring for TextViewer [message #262930] |
Tue, 12 August 2008 04:10  |
Eclipse User |
|
|
|
Originally posted by: dnl.bhls.web.de
Hi,
I'm trying for days now to find out how to apply a "default syntax
colourer" to a TextEditor.
I have implemented my own TextEditor. Besides a bunch of components, it
shows also a TextViewer:
TextViewer txtViewer = new TextViewer(parent, SWT.NONE);
txtViewer.setInput(editorInput);
The editorInput is an own implementation of IStorageEditorInput and
delivers just a String --- very simple.
Furthermore, I have an associated file extension like ".java", ".xml", ...
How can I tell now the TextViewer to use an appropriate syntax colouring
for this file type?
Please help me, I am really despairing.
|
|
|
Re: apply default syntax colouring for TextViewer [message #263019 is a reply to message #262930] |
Tue, 12 August 2008 06:18  |
Eclipse User |
|
|
|
Daniel wrote:
> Hi,
> I'm trying for days now to find out how to apply a "default syntax
> colourer" to a TextEditor.
There's no such things. The colorings are editor specific.
Dani
>
> I have implemented my own TextEditor. Besides a bunch of components,
> it shows also a TextViewer:
>
>
> TextViewer txtViewer = new TextViewer(parent, SWT.NONE);
> txtViewer.setInput(editorInput);
>
>
> The editorInput is an own implementation of IStorageEditorInput and
> delivers just a String --- very simple.
> Furthermore, I have an associated file extension like ".java", ".xml",
> ...
> How can I tell now the TextViewer to use an appropriate syntax
> colouring for this file type?
>
> Please help me, I am really despairing.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.28859 seconds