Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Resource for Adding Connections
Resource for Adding Connections [message #61797] Thu, 12 October 2006 11:45 Go to next message
Eclipse UserFriend
Originally posted by: john.campaner.s1.com

Hi There,

When I add a connection between two objects on a diagram and the origin is a
shortcut, the EMF model object which represents the link is created in the
resource containing the orgin's EMF object (IE the resource in which the
origin object is controlled).

Instead, I wish to have the link object added to the EMF resource which is
currently being edited (ie the resource the diagram canvas is mapped to).

This is so that other models in where the same shortcut is used will be
unaffected (I don't want the other models to have visibility to the link
being added).

How does my GMF editor decide which EMF resource to create link objects in
in the case where shortcuts are used? What code would I need to override to
do this?

Thanks

John
Re: Resource for Adding Connections [message #62146 is a reply to message #61797] Fri, 13 October 2006 09:09 Go to previous message
Eclipse UserFriend
Hello John,

> How does my GMF editor decide which EMF resource to create link
> objects in in the case where shortcuts are used? What code would I
> need to override to do this?
It depends on the link type actually. If your link is connected with some
domain-model element then corresponding element has to be created and places
in your domain model in accordance with containment rules determined in mapping
model. You have to specify containmentFeature property for the link mapping
and this is a current way to point where to put newly created link object.
By default link will be created inside domain model element corresponding
to its source.
AFAIU, what you are talking about is pure-visual link – the link without
any underlying domain representation. Such kind of links is not supported
currently. If this is what you want please submit feature request into bugzilla.

-----------------
Alex Shatalin
Previous Topic:propagating changes into gmfmap and gmfgen
Next Topic:"load resource" from editor canvas fails
Goto Forum:
  


Current Time: Sun Jun 01 03:43:57 EDT 2025

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

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

Back to the top