Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Is it possible to use GMF on a abstract semantic model ?
Is it possible to use GMF on a abstract semantic model ? [message #205851] Wed, 17 September 2008 19:34 Go to next message
Eclipse UserFriend
Originally posted by: omoises.nospam-nordnet.fr

Hi,

I have 2 metamodels, one contains almost only abstract classes (abstract
metamodel), another one contains classes inheriting from classes of the
first metamodel (concrete metamodel).
The abstract metamodel contains only few classes, but the concrete one
will contain more than 100 classes. I will also have other concrete
metamodels (inheriting from the abstract one).

For that, I would like to create my editor using only the abstract
metamodel (and of course as many factories/adapters I will need ;-) to
create concrete models).

I have written a first GEF based POC and it seems to work, but after
writing somme commands, I realize that I am rewriting several parts of
GMF !!

Then my question is : is it possible to use GMF (and generators) based
on abstract metamodels ?

Thanks in advance,

Olivier Moises
Re: Is it possible to use GMF on a abstract semantic model ? [message #205915 is a reply to message #205851] Thu, 18 September 2008 09:42 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Olivier,

I think so.
The only problem to my understansing are palette tools creating some concrete
class instances. I think these tools have to be implemented manually.

You can try to describe your diagram structure using only abstract classes
(without any palette creation tools), generate diagram editor and try to
initialize diagram instance using existing model file (with some concrete
instances in it). If you can see this diagram editor working then you can
try to go on with the palette tools.

-----------------
Alex Shatalin
Re: Is it possible to use GMF on a abstract semantic model ? [message #206006 is a reply to message #205915] Thu, 18 September 2008 12:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: omoises-no-spam.no-spam-nordnet.fr

Alex,

First, thanks for your answer.

Generating a diagram code is not possible because then gmfgen editor
does not propose abstract classes as valid options for domain element
binding.

Then now, there is 2 solutions :

* bypassing the editor and writing the gmfgen model by hand, but I am
not sure that the generation phase will be successful

* creating a fake concrete metamodel and using it to generate the full
diagram. In this case, what about the re-generation cycles if needed
(the metamodels are not stable and will be modified several times in the
next days !!)

Thanks

Olivier


Alex Shatalin a écrit :
> Hello Olivier,
>
> I think so.
> The only problem to my understansing are palette tools creating some
> concrete class instances. I think these tools have to be implemented
> manually.
>
> You can try to describe your diagram structure using only abstract
> classes (without any palette creation tools), generate diagram editor
> and try to initialize diagram instance using existing model file (with
> some concrete instances in it). If you can see this diagram editor
> working then you can try to go on with the palette tools.
>
> -----------------
> Alex Shatalin
>
>
Re: Is it possible to use GMF on a abstract semantic model ? [message #206025 is a reply to message #206006] Thu, 18 September 2008 13:37 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Olivier,

Well, I suggest editing .gmfmap model using some other editors (text), but
you are right - there is a limitation that NodeMaping domain element should
be concrete class right now..
So, let's try using abstract class for NodeMapping first and then find a
solution for editor if the rest of GMf-generated code will work for you.

-----------------
Alex Shatalin
Previous Topic:Body of getViewChildren exceeds 64K
Next Topic:OCL to Java Constraint
Goto Forum:
  


Current Time: Wed Jan 20 19:30:28 GMT 2021

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

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

Back to the top