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: 14665
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.


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: 14665
Registered: July 2009
Senior Member
Hi,

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


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: 14665
Registered: July 2009
Senior Member
Hi,

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


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: Thu Apr 18 21:20:04 GMT 2024

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

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

Back to the top