Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problem creating links programatically using CreateRelationshipRequest
Problem creating links programatically using CreateRelationshipRequest [message #107992] Thu, 01 March 2007 01:46 Go to next message
Eclipse UserFriend
Originally posted by: ganesh.mohan.hp.com

Hello,

I have implemented a wizard which opens as soon as a user double clicks on
a building block say - "source-element" (using the OpenEditPolicy
installed on that element's editpart). The wizard provides a option for
the user to create new elements. depending upon the number of elements
entered by the user, those elements are created on the editor. I am using
the "CreateElementRequest" and executing a command by passing this request.

The problem i am facing now is, I want to create a link between the
"source element" and the new elements that are being created. I am not
able to get the reference of the new elements created to provide as a
"target" parameter to the CreateRelationshipRequest. I want these links to
be created along with the element creation. Is there any way i can achieve
this?? Can anyone please help me in resolving this issue.

Thanx,
Ganesh
Re: Problem creating links programatically using CreateRelationshipRequest [message #108544 is a reply to message #107992] Fri, 02 March 2007 09:50 Go to previous message
Eclipse UserFriend
Ganesh,

You can use a DeferredCreateConnectionViewAndElementCommand for this
purpose. Looks like there's an example of its use in
MindmapCreateSubtopicAction.

Regards,
Cherie

Ganesh Mohan wrote:
> Hello,
>
> I have implemented a wizard which opens as soon as a user double clicks
> on a building block say - "source-element" (using the OpenEditPolicy
> installed on that element's editpart). The wizard provides a option for
> the user to create new elements. depending upon the number of elements
> entered by the user, those elements are created on the editor. I am
> using the "CreateElementRequest" and executing a command by passing this
> request.
>
> The problem i am facing now is, I want to create a link between the
> "source element" and the new elements that are being created. I am not
> able to get the reference of the new elements created to provide as a
> "target" parameter to the CreateRelationshipRequest. I want these links
> to be created along with the element creation. Is there any way i can
> achieve this?? Can anyone please help me in resolving this issue.
>
> Thanx,
> Ganesh
>
Previous Topic:any users of GMF 2.0M5 on Linux/GTK?
Next Topic:X icon on link
Goto Forum:
  


Current Time: Tue Jul 22 13:08:16 EDT 2025

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

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

Back to the top