Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Outline View In Xtext(Lot of performance issues in my outline view)
icon5.gif  Outline View In Xtext [message #1184294] Wed, 13 November 2013 10:59 Go to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 119
Registered: July 2013
Location: Bangalore
Senior Member
Hi all,
I will tell you my outline view structure first.

Root
  |
  |__ Sub_Root
            |
            |__ Element_1
                      |
                      |__ property_1
                      |
                      |__ property_2
                      |
                      |__ property_3
            |
            |__ Element_2
                      |
                      |__ property_1
                      |
                      |__ property_2
                      |
                      |__ property_3
            |
            |__ Element_n

So basically what I have done is, I am overriding _createChildren method for my Root and I am calling a sub function to create Sub_Root and from this function to Create Element and then Properties.

Problem is even if I press enter keyword in my editor , complete Outline is getting refreshed and hence a performance issue for me.
I understand that I need to override _createChildren for all the types instead of calling function from a function.

But Can someone give me an idea how can I maintain the SAME STRUCTURE MENTIONED ABOVE. And if someone has some reference code then please do share it.
Basically I need something like, If I am modifying something only that part or that object is recreated.

Thanks in advance Smile


Arshad

[Updated on: Wed, 13 November 2013 11:07]

Report message to a moderator

Re: Outline View In Xtext [message #1184496 is a reply to message #1184294] Wed, 13 November 2013 13:49 Go to previous messageGo to next message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 135
Registered: June 2013
Senior Member
perhaps you can give us your grammar as well, so we can see what you want to change in your outline.

There is an neatly commented and explained example in Lorenzo Bettinis book:
Implementing Domain-Specific Languages with Xtext and Xtend on page 109.

For me, it looked like one has only to define it for a specific Class:
all the other nodes will be done according to standards.
icon5.gif  Re: Outline View In Xtext [message #1194230 is a reply to message #1184496] Mon, 18 November 2013 11:57 Go to previous messageGo to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 119
Registered: July 2013
Location: Bangalore
Senior Member
Hello Uli,
Thanks a lot for replying back to my question.
I was just trying out with an organization structure.
Root Node is Organization, Organization can have Departments, Departments can have Employees, Employees can have attributes like name, address etc. This is my simple grammar and I want to follow the structure in my outline view as I have mentioned above. I am getting the right output but it is getting refreshed completely each time I type something even if a new line character.


Thanks in advance for your help Smile


Arshad
Re: Outline View In Xtext [message #1196164 is a reply to message #1194230] Tue, 19 November 2013 09:24 Go to previous messageGo to next message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 135
Registered: June 2013
Senior Member
AFAIK, if you have your classes and each mas a name=ID, the default outline routine will deliver the outline you mentioned already.
Re: Outline View In Xtext [message #1196357 is a reply to message #1196164] Tue, 19 November 2013 11:27 Go to previous message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 119
Registered: July 2013
Location: Bangalore
Senior Member
HI Uli,
Thanks for your reply.
Yes But many times I get "unnamed" node in the outline, so I wrote my own outline code.



Arshad
Previous Topic:End of line grammar difficulty [SOLVED]
Next Topic:[SOLVED] The feature 'eClassifier' of '...EGenericTypeImpl...' contains an unresolved proxy
Goto Forum:
  


Current Time: Tue Dec 23 03:53:40 GMT 2014

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

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