Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to include the enherited class attributes in the content assistant
How to include the enherited class attributes in the content assistant [message #1734295] Mon, 06 June 2016 20:58 Go to next message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Hi,

I'm wondering what is the best of doing the following.

Let's say we have the following grammar:

Entity:
attributes=[Attribute]* ('superClass'=[Entity]) ? ;

and based on the above rule we have the following:
index.php/fa/26087/0/

So, 'Lane' should also inherit 'shape' from 'MapObject'. In this case, when I use content assistant, I get MapObject.Shape , However, I need to get sth like Lane.Shape.

I mean the children classes should also have the parents' attributes when using content assistant.

How do you advise to approach this problem ?

Thanks,
Bests,
Parsa
Re: How to include the enherited class attributes in the content assistant [message #1734304 is a reply to message #1734295] Tue, 07 June 2016 03:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Adapt scoping and collect all items

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to include the enherited class attributes in the content assistant [message #1734305 is a reply to message #1734304] Tue, 07 June 2016 03:18 Go to previous messageGo to next message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Hi Christian ,

Scoping is what I also thought about , but my concern is that if I add "Lane.Shape" in the content assistant, will it not throw error since Lane does not really have shape ?

Thanks,
Parsa
Re: How to include the enherited class attributes in the content assistant [message #1734306 is a reply to message #1734305] Tue, 07 June 2016 03:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
I don't get that point. Scoping DEFINES what is valid and content assist uses scoping

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to include the enherited class attributes in the content assistant [message #1734308 is a reply to message #1734306] Tue, 07 June 2016 03:24 Go to previous message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Ooo ! I see ... Thanks a lot !

Parsa
Previous Topic:Autocomplete (suggest) java type
Next Topic:SimpleProjectWizardFragment
Goto Forum:
  


Current Time: Thu Apr 25 15:30:25 GMT 2024

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

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

Back to the top