Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Preview in "Syntax Coloring" preference page
Preview in "Syntax Coloring" preference page [message #1720388] Mon, 18 January 2016 10:37 Go to next message
Jiang Li is currently offline Jiang LiFriend
Messages: 27
Registered: November 2014
Junior Member
Hi everybody,

i want to insert a preview area for the highlighting in xtext standard preference page "Syntax Coloring". Is there already implementation by xtext?

Thanks in advance

Re: Preview in "Syntax Coloring" preference page [message #1720975 is a reply to message #1720388] Fri, 22 January 2016 09:34 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

No, you have to customize the preference page yourself.

Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: Preview in "Syntax Coloring" preference page [message #1720992 is a reply to message #1720975] Fri, 22 January 2016 11:09 Go to previous messageGo to next message
Jiang Li is currently offline Jiang LiFriend
Messages: 27
Registered: November 2014
Junior Member
Karsten Thoms wrote on Fri, 22 January 2016 09:34
No, you have to customize the preference page yourself.


Thanks for your answer Razz

I have already customized this preference page with embedded editor. But there is a refreshing problem about the hightlighting of the embedded editor. It was refreshed only by clicking the "Apply" button.
I hope to refresh the embedded editor after clicking the buttons of the FieldEditors, e.g. Color, Font buttons.

I think that embedded editor refreshs it highlightings by listening to the changes of preference store which is shared with all editors. How can I customize embedded editor with a seperate preference store? Is the class "HighlightingHelper.java" right way?
Re: Preview in "Syntax Coloring" preference page [message #1720996 is a reply to message #1720992] Fri, 22 January 2016 11:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
EmbeddedEditorFactory has an HighlightingHelper has a TextAttributeProvider/PreferenceStoreAccessor injected

org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingHelper.install(XtextSourceViewerConfiguration, XtextSourceViewer)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Preview in "Syntax Coloring" preference page [message #1721152 is a reply to message #1720996] Mon, 25 January 2016 09:22 Go to previous message
Jiang Li is currently offline Jiang LiFriend
Messages: 27
Registered: November 2014
Junior Member
Christian Dietrich wrote on Fri, 22 January 2016 11:25
EmbeddedEditorFactory has an HighlightingHelper has a TextAttributeProvider/PreferenceStoreAccessor injected

org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingHelper.install(XtextSourceViewerConfiguration, XtextSourceViewer)


Thanks Christian, i will try it.
Previous Topic:Mixing simple and qualified names in cross references
Next Topic:error while installing software
Goto Forum:
  


Current Time: Thu Apr 25 21:28:58 GMT 2024

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

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

Back to the top