Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » JavaScript syntax highlighting
JavaScript syntax highlighting [message #222554] Thu, 02 October 2008 14:17 Go to next message
Eclipse UserFriend
Originally posted by: eduardo.oliveira.eldorado.org.br

Hi all!

I'm trying to use the JSSourceViewerConfiguration class as a source viewer
configuration for a SourceViewer. But, the syntax highlight is not working.
I checked the JSEditor source code and tried to do some similar:

IPreferenceStore store = createCombinedPreferenceStore();
SourceViewerConfiguration conf = new JSSourceViewerConfiguration(store);
sourceViewer.configure(conf);

private IPreferenceStore createCombinedPreferenceStore()
{
IPreferenceStore jsEditorPrefs =
JSEditorPlugin.getDefault().getPreferenceStore();
IPreferenceStore sseEditorPrefs =
SSEUIPlugin.getDefault().getPreferenceStore();
IPreferenceStore baseEditorPrefs = EditorsUI.getPreferenceStore();
return new ChainedPreferenceStore(new IPreferenceStore[]
{
jsEditorPrefs, sseEditorPrefs, baseEditorPrefs
});
}

What is happening?

Thanks!
Re: JavaScript syntax highlighting [message #222596 is a reply to message #222554] Tue, 07 October 2008 20:38 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Eduardo Oliveira wrote:
> I'm trying to use the JSSourceViewerConfiguration class as a source viewer
> configuration for a SourceViewer. But, the syntax highlight is not working.
> I checked the JSEditor source code and tried to do some similar:
>
> What is happening?

The JSEditor class does further configuration on the source viewer,
in particular adding a JSLineStyleListener to the text widget.
You'll have to do the same.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:[ANN] WTP 3.0.2 is available!
Next Topic:How to turn off JavaScript validation in the JSP editor?
Goto Forum:
  


Current Time: Thu Apr 25 14:22:01 GMT 2024

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

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

Back to the top