Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Usage of abstract classes in link mapping
Usage of abstract classes in link mapping [message #517035] Thu, 25 February 2010 20:04 Go to next message
Eclipse UserFriend
Originally posted by: alexander.lueders.gmx.de

Hi everybody,

searching this newsgroup didn't help me finding a solution to my
problem. Here is a short explanation:

I have a basic metamodel with abstract classes, e.g. a Communication
class. Additionally there is a Role which may be some kind of person
(like a customer, assistant, ..). Communication is a link between roles
(e.g. mail, call, ..). However, other metamodels provide different
concrete instances of Communication.

Is there a way to build a gmf editor based on that abstract metamodel?
Assume the following scenario:

Assistant A --- Communication ----> Customer B

As Communication is abstract, you cannot set it as Element in the link
mapping of the gmfgraph file. It would be nice to have abstract classes
as link and set the concrete implementation (e.g. mail or telephone
call) at runtime while editing the diagram.

Is this possible at all?

Any help is greatly appreciated
Thanks in advance
Alex
Re: Usage of abstract classes in link mapping [message #517150 is a reply to message #517035] Fri, 26 February 2010 11:41 Go to previous message
Ali Koudri is currently offline Ali KoudriFriend
Messages: 118
Registered: July 2009
Senior Member
Hi,

This is a tricky stuff since mappings requires concrete metaclasses.
I think there are several ways to do that. First of all, you could
create a mapping for each implementation. The second solution is not an
easy task since it requires a deep knowledge of GMF, and probably lot of
changes in the generated code. Indeed, I think you will have to create
your own mapping metamodel in order to allow mappings targeting abstract
metaclasses. You will also have to provide your own genmodel based on
your mapping metamodel and then generate code for GMF framework. And
finally, you could also not use models and code all by hand (as in GEF)
and I whish you good luck.

Cheers.

Le 25/02/2010 21:04, Alexander Lueders a écrit :
> Hi everybody,
>
> searching this newsgroup didn't help me finding a solution to my
> problem. Here is a short explanation:
>
> I have a basic metamodel with abstract classes, e.g. a Communication
> class. Additionally there is a Role which may be some kind of person
> (like a customer, assistant, ..). Communication is a link between roles
> (e.g. mail, call, ..). However, other metamodels provide different
> concrete instances of Communication.
>
> Is there a way to build a gmf editor based on that abstract metamodel?
> Assume the following scenario:
>
> Assistant A --- Communication ----> Customer B
>
> As Communication is abstract, you cannot set it as Element in the link
> mapping of the gmfgraph file. It would be nice to have abstract classes
> as link and set the concrete implementation (e.g. mail or telephone
> call) at runtime while editing the diagram.
>
> Is this possible at all?
>
> Any help is greatly appreciated
> Thanks in advance
> Alex
Previous Topic:the .gmfgraph of the ecore diagram
Next Topic:Diagram refresh Problem after reorder elements
Goto Forum:
  


Current Time: Wed Sep 30 23:27:26 GMT 2020

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

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

Back to the top