Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Reverse the link direction of a reference based link
Reverse the link direction of a reference based link [message #212404] Fri, 28 November 2008 11:35 Go to next message
Eclipse UserFriend
Hello,

i follow the approach described in the post: 'How to generate a link
with multiple sources and targets'. The 'from' and 'to' links are
reference-based LinkMappings.

I would like to know how i can reverse the link direction of the 'from'
link. In general we need a left to right direction for all links.



Joerg
Re: Reverse the link direction of a reference based link [message #212501 is a reply to message #212404] Mon, 01 December 2008 02:22 Go to previous messageGo to next message
Eclipse UserFriend
Problem solved. The solution was found in the GMF genmodel. Under 'Gen
Editor/Gen Diagram/Gen Link ???EditPart' exists two properties,
'Incomming Creation Allowed' and 'Outgoing Creation Allowed', who
control the behavior i want.


Joerg
Re: Reverse the link direction of a reference based link [message #212524 is a reply to message #212404] Mon, 01 December 2008 04:54 Go to previous messageGo to next message
Eclipse UserFriend
Hello joerg,

There are three properties of GenLink in .gmfgen model:
- incomingCreationAllowed
- outgoingCreationAllowed
- viewDirectionAlignedWithModel

Additional command "reverting" the link will be generated if you specify
incomingCreationAllowed = true, outgoingCreationAllowed = false, viewDirectionAlignedWithModel
= true.

So you can try this and use generated code as an example of changing the
visual link direction on a creation time.

-----------------
Alex Shatalin
Re: Reverse the link direction of a reference based link [message #212641 is a reply to message #212524] Wed, 03 December 2008 08:54 Go to previous messageGo to next message
Eclipse UserFriend
Hello Alex,

thanks for your reply. On creation time it works. But when i save, close
and re-open the editor the 'from link' shows from the 'link center' node
towards nowhere. This is caused, since the 'from link' EditPart was
added to the 'link center' EditPart as a 'source connection' instead of
a 'target connection'.

Can i change this behaviour? Maybe by change the ??diagramUpdater class
or exists better places for make any necessary adjustments.


Thanks
Joerg
Re: Reverse the link direction of a reference based link [message #212649 is a reply to message #212641] Wed, 03 December 2008 11:15 Go to previous messageGo to next message
Eclipse UserFriend
Hello joerg,

It looks like a probelem of diagram update logic working in viewDirectionAlignedWithModel
= false conditions... Yes, you can modify ??diagramUpdater to handle this
situation properly.
BTW, if you just need to create link from node1 to node2, but show it with
an arrow pointing to node1 then you can use source decoration instead of
target in .gfmgen model and visually link will point to node1 (staying alighed
with model link in notation model..)

-----------------
Alex Shatalin
Re: Reverse the link direction of a reference based link [message #212788 is a reply to message #212649] Thu, 04 December 2008 08:27 Go to previous messageGo to next message
Eclipse UserFriend
Hello Alex,

thanks for your reply. Modify the ??DiagramUpdater was the
straight tip. I got the desired behaviour.

Thanks
Joerg
Re: Reverse the link direction of a reference based link [message #212803 is a reply to message #212788] Thu, 04 December 2008 08:40 Go to previous messageGo to next message
Eclipse UserFriend
Hello joerg,

Can you please file a bugzilla issue describing this situation then?

-----------------
Alex Shatalin
Re: Reverse the link direction of a reference based link [message #212847 is a reply to message #212803] Fri, 05 December 2008 05:19 Go to previous message
Eclipse UserFriend
Hello Alex,

> Can you please file a bugzilla issue describing this situation then?

Sure.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=257688


Thanks for your help
Joerg
Previous Topic:Dynamic properties
Next Topic:[Announce] GMF 2.2.0 I200812041543 is available
Goto Forum:
  


Current Time: Wed May 07 12:52:38 EDT 2025

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

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

Back to the top