Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » What the thread "owns: ClusteringBuilderState" do?
What the thread "owns: ClusteringBuilderState" do? [message #1777216] Mon, 27 November 2017 08:16 Go to next message
serio adamo is currently offline serio adamoFriend
Messages: 24
Registered: September 2017
Junior Member
Recently, I want to investigate the mechanism of cross-reference resolution in xtext.

In emf, the default mechanism of cross-reference resolution is lazy. But when you validate your model instance, it will resolve automatically in validation.

In xtext, it is similar:
EcoreUtil2.resolveLazyCrossReferences(resource, monitor) is called in validation thread (owns: LazyLinkingResource) which is the same thread of my custom validator. That is OK.
index.php/fa/31402/0/


But I found there is another thread (owns: ClusteringBuilderState) also call EcoreUtil2.resolveLazyCrossReferences(resource, monitor).
index.php/fa/31403/0/

What the thread "ClusteringBuilderState" do in xtext?
Is there any documentation that explains the significance of these threads.

Very thanks.
Re: What the thread "owns: ClusteringBuilderState" do? [message #1777218 is a reply to message #1777216] Mon, 27 November 2017 08:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11605
Registered: July 2009
Senior Member
one is the xtext build the other one is the open editor

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: What the thread "owns: ClusteringBuilderState" do? [message #1777223 is a reply to message #1777218] Mon, 27 November 2017 08:53 Go to previous messageGo to next message
serio adamo is currently offline serio adamoFriend
Messages: 24
Registered: September 2017
Junior Member
Christian Dietrich wrote on Mon, 27 November 2017 08:24
one is the xtext build the other one is the open editor


This means that :
The thread (owns: LazyLinkingResource) is for the editor of one dsl file which does validation, error report and quick fix. These jobs are done when user edit text in no saving file.

The thread (owns: ClusteringBuilderState) is for a compiler which does generate code, so it needs validation again. These jobs are done when user click Project - Build or save file when Project - Build Automatically turn on.

Am I right?

I have another question:
Who dispatches these thread? Could you tell me the file in xtext source code? Thanks.
Please forgive me, I lack the eclipse plug-in development knowledge.
Sorry to bother you again.
Re: What the thread "owns: ClusteringBuilderState" do? [message #1777224 is a reply to message #1777223] Mon, 27 November 2017 09:03 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11605
Registered: July 2009
Senior Member
thats correct.

i am not sure what you mean by dispatch.

one ist the eclipse builder infrastructure
the other is a eclipse job.


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: What the thread "owns: ClusteringBuilderState" do? [message #1777225 is a reply to message #1777224] Mon, 27 November 2017 09:09 Go to previous messageGo to next message
serio adamo is currently offline serio adamoFriend
Messages: 24
Registered: September 2017
Junior Member
Christian Dietrich wrote on Mon, 27 November 2017 09:03
thats correct.

i am not sure what you mean by dispatch.

one ist the eclipse builder infrastructure
the other is a eclipse job.


dispatch thread means:
for example:
Thread t1 = new Thread(my_runnable);
(It may be actually that these threads are created as declarative rather than imperative)

[Updated on: Mon, 27 November 2017 09:11]

Report message to a moderator

Re: What the thread "owns: ClusteringBuilderState" do? [message #1777227 is a reply to message #1777225] Mon, 27 November 2017 09:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11605
Registered: July 2009
Senior Member
nobody at xtext does that. all uses eclipse infrastructure.

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: What the thread "owns: ClusteringBuilderState" do? [message #1777228 is a reply to message #1777227] Mon, 27 November 2017 09:23 Go to previous message
serio adamo is currently offline serio adamoFriend
Messages: 24
Registered: September 2017
Junior Member
Christian Dietrich wrote on Mon, 27 November 2017 09:17
nobody at xtext does that. all uses eclipse infrastructure.


OK...
I admit that I lack eclipse development experience. Maybe before use xtext, I should learn how to develop eclipse plugin and how to use eclipse infrastructure to develop a small compiler IDE like small CDT first.
Thanks again.

[Updated on: Mon, 27 November 2017 09:24]

Report message to a moderator

Previous Topic:Confusion about two ways to get resourceDescription
Next Topic:Tycho/Maven error when updating Xtext version
Goto Forum:
  


Current Time: Sat Jan 20 22:22:59 GMT 2018

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

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