Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Possible move coloring after opening?(Possible move coloring after opening)
Possible move coloring after opening? [message #1037221] Tue, 09 April 2013 05:55 Go to next message
Eclipse UserFriend
The syntax coloring in an xtext editor is done in opening; is it possible to make the color refresh after opening the editor? This will make the open faster, since we are developing a dsl no less complicated than java, with the coloring depending on cross references to make the color the same as the referenced element, then resolving cross references and loading more resources.

I tried putting the color refresh only in the partOpened method in a part listener, but in effect the editor won't show until the color refresh is finished in the listener, which then is the same as the default work flow.

A lot thanks if someone could help!!
Re: Possible move coloring after opening? [message #1037537 is a reply to message #1037221] Tue, 09 April 2013 13:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

the semantic highlighting is actually not done on opening but asychronosly afterwards.
the syntactic highlighting is done on opening.
Re: Possible move coloring after opening? [message #1037740 is a reply to message #1037537] Tue, 09 April 2013 20:38 Go to previous messageGo to next message
Eclipse UserFriend
Hi, thanks for replying
But in opening it does "installHighlightingHelper", which then calls "HighlightingReconciler" to do the semantic highlighting:

document.readOnly(new IUnitOfWork.Void<XtextResource>() {
public void process(XtextResource state) throws Exception{
modeChanged(state);
}
});
...........
}
Is it asynchronous? In effect, the editor doesn't show up until this is done...

Re: Possible move coloring after opening? [message #1037876 is a reply to message #1037740] Wed, 10 April 2013 01:42 Go to previous messageGo to next message
Eclipse UserFriend
Hmmm you are right. i was sure it was done async.
may Sebastian can answer this?
Re: Possible move coloring after opening? [message #1038531 is a reply to message #1037876] Wed, 10 April 2013 21:33 Go to previous message
Eclipse UserFriend
Hi,
What I tried later is running the refresh in reconciler.install in another thread. The effect is perfect: the editor shows up with only syntax highlight, then comes the semantic highlighting in a few seconds. Is there any risk of doing this?
Previous Topic:Need a hint for dynamic imports
Next Topic:mismatched input '<EOF>' expecting
Goto Forum:
  


Current Time: Thu Jul 03 07:07:41 EDT 2025

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

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

Back to the top