Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problems creating a link from shortcut.
Problems creating a link from shortcut. [message #209916] Wed, 29 October 2008 21:00 Go to next message
Vadim is currently offline VadimFriend
Messages: 2
Registered: July 2009
Junior Member
Hello,
I have problems with the following scenario:
Create an "element" and "compound element" in the root diagram, double
click on "compound element" and open sub diagram. Create shortcut of the
"element"
in sub diagram. When selecting the link creation tool from palette and
pointing with mouse arrow to created shortcut it looks like the creation
of the link from this shortcut is not allowed. On the other hand it is
possible to create link to this shortcut and if the shortcuts of the
elements are created in different sub diagrams it is possible to create
links from and to their shortcuts.
Am I doing something wrong?
Thanks in advance for your help.
Re: Problems creating a link from shortcut. [message #209940 is a reply to message #209916] Thu, 30 October 2008 10:36 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Vadim,

Do you have different diagram editor plugin generated for diagram visualizig
content of "compound element" or you are using the same diagram editor as
for the "main" diagram containing "element" and "compound element"?

Currently in GMF it is possible to create links only between "normal" diagram
elements. You can create links to/from the shortcuts only if these shortcuts
are visualizing elements from the "same type" of diagram (a copy of shortcutted
element can be created directly on this diagram).

-----------------
Alex Shatalin
Re: Problems creating a link from shortcut. [message #209956 is a reply to message #209940] Thu, 30 October 2008 11:39 Go to previous messageGo to next message
Vadim is currently offline VadimFriend
Messages: 2
Registered: July 2009
Junior Member
Hello Alex,
Thanks for your quick response.
I have two different plugins, one for the "main" diagram and the other one
for the "compound element" diagram, but I have the same ecore file for
both. The interesting thing that I can create link to such a shortcut(Why
it is possible?).Is there any workaround of this problem? Can you
recommend me where should I start to debug? I'm diving dipper and dipper
to the core code of gmf,emf and gef.

Thanks again.
Re: Problems creating a link from shortcut. [message #209964 is a reply to message #209956] Thu, 30 October 2008 12:32 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Vadim,

> both. The interesting thing that I can create link to such a shortcut(Why
> it is possible?).
This sounds strange.. do you have any diagram elements on the subdiagram
having same metaclass as a meetaclass fo shortcutted element?

>Is there any workaround of this problem? Can you
> recommend me where should I start to debug? I'm diving dipper and
I think you have to place a breakpoints into *ItemSemanticEditPolicy.getStartCreateRelationshipCommand()/ .getCompleteCreateRelationshipCommand()
associated with link source/target EditParts. These EditPolicies are responsible
for actual link creation.

As a workaround you can:
- create additional node mapping representing top-level diagram node (Element)
in a sub-diagram .gmfmap model + specify no creation tool for this mapping
- ensure that "create shortcut" action will use this "fake" node to visualize
shortcut on creating shortcut to the element from main fiagram
- define valid link on a subdiagram connecting ** with Elements.
- regenerate subdiagram code.

-----------------
Alex Shatalin
Previous Topic:editpart screwed help
Next Topic:Custom figures with external labels and compartment
Goto Forum:
  


Current Time: Sun Jun 30 13:04:15 GMT 2024

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

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

Back to the top