Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » same node definitions for subclass
same node definitions for subclass [message #234893] Tue, 30 June 2009 11:55 Go to next message
Eclipse UserFriend
Originally posted by: aurelien.pupier.esial.net

Hi,

I want to define an unique topnode in gmfmap for multiple class.

More precisely.
I have the inheritance:
A1 extends B
A2 extends B

I want to graphically represent A1 and A2 nearly the same and don't want to duplicate the top node.

What I don't want :
Mapping
+Top Node Reference <xxx:A1/nodeType>
+ [A great definition]
+Top Node Reference <xxx:A2/nodeType>
+ [The same great definition]


because code will be duplicate and as I want to do that for A1, A2, A3, ....

So I want to define a top node reference for the superclass :
Mapping
+Top Node Reference <xxx:B/nodeType>
+ [A great definition]

And To have with the palette to choose the type I want (A1, A2), How can I do that?


Is there a way to share definition node?

Thanks by advance for any hints.

If not understandable please tell me.
Re: same node definitions for subclass [message #234952 is a reply to message #234893] Wed, 01 July 2009 11:09 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Aurelien,

> Is there a way to share definition node?
No, it's not possible. You have to create two TopNodeReferences with corresponding
NodeMappings (the only difference will be DomainMetaElement: A1/A2)

-----------------
Alex Shatalin
Re: same node definitions for subclass [message #235061 is a reply to message #234952] Thu, 02 July 2009 08:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aurelien.pupier.esial.net

Alex Shatalin a écrit :
> Hello Aurelien,
>
>> Is there a way to share definition node?
> No, it's not possible. You have to create two TopNodeReferences with
> corresponding NodeMappings (the only difference will be
> DomainMetaElement: A1/A2)
>
> -----------------
> Alex Shatalin
>
>


Maybe I had to wait for that : https://bugs.eclipse.org/bugs/show_bug.cgi?id=192945
Re: same node definitions for subclass [message #235078 is a reply to message #235061] Thu, 02 July 2009 11:13 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Aurelien,

I doubt it is helpful - as I mentioned NodeMappings in your situation will
hold different DomainMetaElement references...
BTW, it's not so hard to copy-paste corresponding model elements in EMF tree
editor..

-----------------
Alex Shatalin
Re: same node definitions for subclass [message #235092 is a reply to message #235078] Thu, 02 July 2009 11:19 Go to previous message
Eclipse UserFriend
Originally posted by: aurelien.pupier.esial.net

Alex Shatalin a écrit :
> Hello Aurelien,
>
> I doubt it is helpful - as I mentioned NodeMappings in your situation
> will hold different DomainMetaElement references...
> BTW, it's not so hard to copy-paste corresponding model elements in EMF
> tree editor..
>
> -----------------
> Alex Shatalin
>
>

No it's not difficult but it will be more painful to maintain.
Previous Topic:how to show a menu when select attribute/class name
Next Topic:Aggregation of components
Goto Forum:
  


Current Time: Tue Apr 23 14:30:55 GMT 2024

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

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

Back to the top