Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Display value of EReference with Feature Label Mapping
Display value of EReference with Feature Label Mapping [message #225989] Tue, 14 April 2009 17:06 Go to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
I've got a node referencing another node, but instead of drawing the link,
I would like to just display the ID of the selected node using "Feature
Label Mapping". The Features-attribute does only seem to support
EAttributes of the ecore-model though, no EReferences.

Is there an other way to display the value of the reference?

Thanks in advance, Peter
Re: Display value of EReference with Feature Label Mapping [message #226107 is a reply to message #225989] Wed, 15 April 2009 08:32 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Peter,

You can:
1. create derived attribute and implement getter to get value from the referenced
object then use feature label mapping
2. or implement your own custom parser accessing this value from the root
object passed to it
3. or modify generated code and make it using feature from the referenced
object..

-----------------
Alex Shatalin
Re: Display value of EReference with Feature Label Mapping [message #226176 is a reply to message #226107] Wed, 15 April 2009 11:33 Go to previous messageGo to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
Thank you, Alex!

I would prefer not to change any generated code, but I'm afraid I do not
have enough GMF-experience to follow any of your suggestions right now ;)

Could you please give some more advise on how to do this?

Thanks, Peter


Alex Shatalin wrote:
> You can:
> 1. create derived attribute and implement getter to get value from the
referenced
> object then use feature label mapping
> 2. or implement your own custom parser accessing this value from the root
> object passed to it
> 3. or modify generated code and make it using feature from the referenced
> object..
Re: Display value of EReference with Feature Label Mapping [message #226195 is a reply to message #226176] Wed, 15 April 2009 12:32 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Peter,

Try checking out GMF templates and review it. In general this is quite easy
- you can use xpand aspects or just owerride whole particular xpand definition
with custom one. As a result you can generate slightly different code then
in original GMF templates. Concerning xpand documentation - just google it
there are some references about this language original syntax on OAW site.

-----------------
Alex Shatalin
Re: Display value of EReference with Feature Label Mapping [message #226229 is a reply to message #226195] Wed, 15 April 2009 14:53 Go to previous messageGo to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
Hi Alex,

Any GMF templates you could suggest in particular?
I believe that this is quite easy, but it's not for me at the moment ;-)

Thanks, Peter
Re: Display value of EReference with Feature Label Mapping [message #226244 is a reply to message #226229] Wed, 15 April 2009 15:08 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Peter,

> Any GMF templates you could suggest in particular? I believe that this
> is quite easy, but it's not for me at the moment ;-)
It depends on the code you are going to change.. You can get all the templates
first and then try to locate a place responsible for generation of desired
peace of code by searching for the corresponding text strings in all the
templates (like: methof name..)

-----------------
Alex Shatalin
Previous Topic:How to get the active editor?
Next Topic:how to export gmf editor to plugin
Goto Forum:
  


Current Time: Thu Apr 25 20:55:01 GMT 2024

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

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

Back to the top