Skip to main content



      Home
Home » Newcomers » Newcomers » apply default syntax colouring for TextViewer
apply default syntax colouring for TextViewer [message #262930] Tue, 12 August 2008 04:10 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
>
>
Previous Topic:Need help changing general font color in eclipse
Next Topic:Eclipse IDE for Java EE on Windows 64 bit
Goto Forum:
  


Current Time: Thu May 29 11:59:15 EDT 2025

Powered by FUDForum. Page generated in 0.28859 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top