Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Editor related issues in xtext(Editor related issues in xtext)
icon5.gif  Editor related issues in xtext [message #1256255] Tue, 25 February 2014 08:46 Go to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi all,
I have some content in my editor something like:

Entity entity1 {
entityName Name1
...
...
}

Entity entity2 {
entityName Name2
...
...
}


For me some of the entities are used and some are unused.

MY FLOW OF EXECUTION: In the beginning I will have an empty xtext editor. On right click on the editor I have provided an option to import entities from some file which will look as mentioned above.

Now, on right click on editor I have provided one more option which will segregate used and unused entities which will look something like:

Segr seg1 {
used [...]
unused [...]
}

Segr seg2 {
used [...]
unused [...]
}


These used and unused parts are referencing to Entities.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Now two use cases:
1. I already have entities in my editor then I right click and select to import segregators.
For this case references are added properly and everything works fine for me.

2. Suppose my editor is empty i.e my resource doesn't have anything. I right click and select import segregators. So before segregators are imported, I must have some entities, so in the background I am adding some entities and then calling segregator functionality for these entities. I am making sure that I am adding entities to the resource and then for this resource I am calling segregator functionality. Even If my resource has entities (BUT STILL ENTITIES ARE NOT PRESENT IN EDITOR ), I AM UNABLE TO ADD REFERENCES.
ONLY I AM ABLE TO ADD REFERENCES IF DATA IS PRESENT IN THE EDITOR.
AM I MISSING OUT SOMETHING OR ITS THE PROPERTY OF THE EDITORS/RESOURCES ?


Thanks for your help Smile



Arshad

[Updated on: Tue, 25 February 2014 08:47]

Report message to a moderator

Re: Editor related issues in xtext [message #1256287 is a reply to message #1256255] Tue, 25 February 2014 09:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13637
Registered: July 2009
Senior Member
Hi

the interesting question is: what are you actually doing in your code. (Command/Handler)
depending on how/what you are doing everything should be possible.


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Editor related issues in xtext [message #1256288 is a reply to message #1256287] Tue, 25 February 2014 09:24 Go to previous messageGo to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi Christian,
I am using a Handler.


Regards,
Arshad


Arshad
Re: Editor related issues in xtext [message #1256339 is a reply to message #1256288] Tue, 25 February 2014 10:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13637
Registered: July 2009
Senior Member
Hi,

and what are you doing there. your problem must be in your code ...


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
icon14.gif  Re: Editor related issues in xtext [message #1256401 is a reply to message #1256339] Tue, 25 February 2014 11:44 Go to previous messageGo to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi Christian,
I solved it. Yes there was some problem in my code.
But one more thing.
Can I change the order of serialization of a resource?
Consider this example only.
Entities should be serialized first before segregators.

But for me segregators are getting serialized first which throws me NoEobjectDescription found exception !


Thanks in advance Smile


Arshad
Re: Editor related issues in xtext [message #1256442 is a reply to message #1256401] Tue, 25 February 2014 12:36 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13637
Registered: July 2009
Senior Member
Hi,

this depends on the grammar and how you fill the model i think


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Strange left recursive rules
Next Topic:Need help getting started on a grammar
Goto Forum:
  


Current Time: Sun Oct 25 00:18:15 GMT 2020

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

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

Back to the top