Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Property dependent View Creation
Property dependent View Creation [message #153484] Thu, 04 October 2007 10:07 Go to next message
Eclipse UserFriend
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi all,

first of all, with View I mean the 'View' metaclass of the notation modell.

So my problem is as following:
I can't change the MetaModel (MM). But 80% of the classes I have to use
in my Editor are of the same kind and must be differentiated by a
property. This is of course simplified but e.g. Metaclass
MyUniversalMClass has a name of type String. If the name starts with
ClassA_ it has the semantic of a ClassA, if it starts with ClassB of
ClassB and so on.

My idea: It should be possilbe to taint the GMF Editor while generating
Code with a non exisiting MM. Here ClassA and ClassB exist and are
subtypes of MyUniversalMClass.

Problems while realizing it:
Basically I have to write some rules which map the MyUniversalMClass
while loading to my 'subclasses' A and B. In 2 days, I couldn't find the
proper location where to insert these rules. Any ideas?

- -stefan


Current knowledge:
For creating these types it seems possible to handle this by appropriate
creation tools. While loading from a notation model seems also realistic
because the semantic hint is stored there, too. But I couldn't figure
out how loading of an element which was added by a tree-editor is handeled.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBPOxIYVWjMSpDwwRAipjAKC7P5o+dSkNUWIJZU++/Obu6cWkIACg jm3r
NWlxK41sz8jguZtJBLGmdGk=
=jjT5
-----END PGP SIGNATURE-----
Re: Property dependent View Creation [message #153507 is a reply to message #153484] Thu, 04 October 2007 10:55 Go to previous messageGo to next message
Eclipse UserFriend
Hello SKuhn,

Try using Constraints - see Ecore diagram example for the details.

-----------------
Alex Shatalin
Re: Property dependent View Creation [message #153518 is a reply to message #153507] Thu, 04 October 2007 11:07 Go to previous messageGo to next message
Eclipse UserFriend
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi alex,

how can constraints help me here?- the 'virtual' Metaclasses are
completely different. So it's not a validating issue, the EditParts and
the Figures of theses 'virtual' metaclasses are individual and should be
generated like that.

- -stefan

Alex Shatalin schrieb:
> Hello SKuhn,
>
> Try using Constraints - see Ecore diagram example for the details.
>
> -----------------
> Alex Shatalin
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBQG3IYVWjMSpDwwRAtpRAJwIuQeitmls2+pSgqFMUSzxTaG89wCg mUlW
luq9uR81jbBLbd9hfdls9cc=
=R0s9
-----END PGP SIGNATURE-----
Re: Property dependent View Creation [message #153529 is a reply to message #153518] Thu, 04 October 2007 11:19 Go to previous messageGo to next message
Eclipse UserFriend
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

to make it clearer: I want to base my editor on uml2 but I'm trying to
provide a DSL-view on the model. Therefore stereotypes are applied to
e.g. uml:Class. Now, my DSL has several semantic elements e.g. Button,
Textfield, Container etc. It sounds reasonable to extend the uml-MM with
these classes. e.g. Button-->uml:Class. So that GMF-templates can
generate everything as normal. Because of this would be a middleweight
extension, no other uml-tool could read this. Therefore I'd like not to
create the model-code for my custom classes, but adapt Button to
uml:Class + stereotype. My question is where's the proper place to write
my rules to map class+stereotype to subclass of uml:class named
sterotype in my gmf-editor.

- -stefan


SKuhn schrieb:
> hi alex,
>
> how can constraints help me here?- the 'virtual' Metaclasses are
> completely different. So it's not a validating issue, the EditParts and
> the Figures of theses 'virtual' metaclasses are individual and should be
> generated like that.
>
> -stefan
>
> Alex Shatalin schrieb:
>> Hello SKuhn,
>
>> Try using Constraints - see Ecore diagram example for the details.
>
>> -----------------
>> Alex Shatalin
>
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBQRnIYVWjMSpDwwRAjZtAJ9firWCZ0qNLyfsthuVgX0Nv7xqSACg 6qhY
3OFizm4gvRmxQuz28iqj40c=
=gBwp
-----END PGP SIGNATURE-----
Re: Property dependent View Creation [message #153542 is a reply to message #153529] Thu, 04 October 2007 14:23 Go to previous message
Eclipse UserFriend
Hello SKuhn,

In Ecore diagram editor example we have only one metaclass "EReference" mapped
to two different diagram links "association" and "aggregation". These two
links could be differentiated from each other by asking EReference.isContainment().
Looks prety similar to your task..

-----------------
Alex Shatalin
Previous Topic:Line above compartments
Next Topic:single model and shows model elements into 2 different diagram
Goto Forum:
  


Current Time: Fri May 30 20:23:23 EDT 2025

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

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

Back to the top