Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Changing Figures at runtime
Changing Figures at runtime [message #202996] Fri, 22 August 2008 07:04 Go to next message
Eclipse UserFriend
Originally posted by: itleita.gmx.at

Hi folks,

I've got a little problem when trying to change my connection decorations
at runtime.. I want to imitate an UML2 associtation between 2 entities.
which can have:
- one arrow at the target (when "targetNavigable" is "true")
- onw arrow at the source (when "sourceNavigable" is "true")
- or both (when both is "true")

is anyone out there who can give me at least a little hint? ;-)

furthermore.. maybe there are more examples about creating an "UML"
look-a-like editor?

thanks,
Alois Leitner
Re: Changing Figures at runtime [message #203079 is a reply to message #202996] Fri, 22 August 2008 11:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: itleita.gmx.at

damn.. i really don't know how to do this..
although i think it is very simple, isn't it?

i don't even know how the changes from the graphical figure get to the
model..
...

do anyone know what i'm trying to explain?
i want to do something like the following:

when a property changed in the properties sheet:
<code>

if(!XXXImpl.isSourceNavigable) {
XXXFigure.setSourceDecoration(null);
} else XXXFigure.setSourceDecoration(...);

if(!XXXIml.isTargetNavigable) {
XXXFigure.setSourceDecoration(null);
} else XXXFigure.setSourceDecoration(...);

</code>
Re: Changing Figures at runtime [message #203095 is a reply to message #203079] Fri, 22 August 2008 12:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zippo29.hotmail.fr

Hi!

Is your connection mapped to a semantic element : Relationship metaclass
for example?

Because in this case you just have make you figure sensible to changes in
properties in the editpart there is a tutorial for that.
I posted a solution that works for me here:
http://www.eclipse.org/newsportal/article.php?id=14771&g roup=eclipse.modeling.gmf#14771


HTH
Regards
Re: Changing Figures at runtime [message #203962 is a reply to message #202996] Mon, 01 September 2008 08:14 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hello Alois,

Have you heard about UML2 Tools (http://wiki.eclipse.org/MDT-UML2Tools) -
open-source editor for UML models generated by GMF?

We (UML2Tools developers) faced the same problem implementing association.
To solve the problem we added custom decoration (AssociationDecoration class)
to source and target of an association link. The decoration is painted in
accordance with properties of the association ends. In order to handle changes
of Association#isNavigable() property additional model listener was added
to AssociationEditPart.

UML2Tools is free and open-source, so you can easily use its hints in your
own diagram editor. Besides, the good news is that we are implementing functionality
to make UML2 Tools artifacts easier to reuse. the feature should be ready
soon.

Best wishes,
Tanya.
PS I copied the question to UML2 Tools newsgroup.

> Hi folks,
>
> I've got a little problem when trying to change my connection
> decorations
> at runtime.. I want to imitate an UML2 associtation between 2
> entities.
> which can have:
> - one arrow at the target (when "targetNavigable" is "true")
> - onw arrow at the source (when "sourceNavigable" is "true")
> - or both (when both is "true")
> is anyone out there who can give me at least a little hint? ;-)
>
> furthermore.. maybe there are more examples about creating an "UML"
> look-a-like editor?
>
> thanks,
> Alois Leitner
Previous Topic:About the layout of Compartment
Next Topic:problems with model xml output
Goto Forum:
  


Current Time: Fri Apr 19 06:32:40 GMT 2024

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

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

Back to the top