Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Annotations on Diagrams
Annotations on Diagrams [message #196082] Tue, 08 July 2008 13:54 Go to next message
Toyin is currently offline ToyinFriend
Messages: 35
Registered: July 2009
Member
Hi,
Can anybody describe how to add annotations to objects in GMF. I tried
adding annotations to the objects in the metamodel but its not working. I
want a situation where I can annotate my diagrams after running the
application.
Thanks

Toyin
Re: Annotations on Diagrams [message #196090 is a reply to message #196082] Tue, 08 July 2008 14:05 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Toyin,

Looks like you have to define corresponding containment reference to Annotation
class in your meta-model + define mapping to these annotations - corresponding
nodes will be visible on diagram.

-----------------
Alex Shatalin
Re: Annotations on Diagrams [message #196326 is a reply to message #196090] Wed, 09 July 2008 13:39 Go to previous messageGo to next message
Toyin is currently offline ToyinFriend
Messages: 35
Registered: July 2009
Member
Hi Alex,
Thanks for your response. I didnt understand, could you explain further.
How do I go about that or is there a way I could include eannotations
programmatically? I think it would be easier if you could explain your
suggestions further.
Thanks

Toyin Fakorede
Re: Annotations on Diagrams [message #196333 is a reply to message #196326] Wed, 09 July 2008 15:23 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Toyin,

I meant: you have a domain model with EClass<DomainElement> and you can create
another EClass<Annotation> with EAttribute<annotationContents:EString> +
containment EReference<annotations> from <DomainElement> to <Annotation>.
Then you can create a mapping for <Annotation> and as a result you'll be
able to create DomainElements on diagram + annotations attached to it with
corresponding contents..

-----------------
Alex Shatalin
Re: Annotations on Diagrams [message #197012 is a reply to message #196333] Tue, 15 July 2008 02:56 Go to previous messageGo to next message
Toyin is currently offline ToyinFriend
Messages: 35
Registered: July 2009
Member
Hi Alex,
Thanks for your explanation. I tried it as described but the
EClass<annotation> came out as a shape (rectangle) in the diagram after
running the application. Please, do you have any sample meta-model with
Eannotations that could be of help. Pls send the url.

Thanks
Toyin
Re: Annotations on Diagrams [message #197221 is a reply to message #197012] Wed, 16 July 2008 09:14 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Toyin,

> Thanks for your explanation. I tried it as described but the
> EClass<annotation> came out as a shape (rectangle) in the diagram
How would you like to visualize it? Property?

-----------------
Alex Shatalin
Previous Topic:Indefinite Child Referentiation
Next Topic:Maintaining constant gap between compartment and component figure?
Goto Forum:
  


Current Time: Wed Apr 24 20:36:41 GMT 2024

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

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

Back to the top