JavaScript syntax highlighting [message #222554] |
Thu, 02 October 2008 14:17  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03514 seconds