Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Fixed source and target for connection
Fixed source and target for connection [message #639243] Mon, 15 November 2010 12:57 Go to next message
Eclipse UserFriend
Hi
I have a connetion between source and target. Is there any way to prevent the changin of the source or target of connection once it is connected between two elements. I have gone through
GraphicalNodeEditPolicy , ConnectionEndPointsPolicy and ConnectionEditPolicy for this. I am confused which is the one i need to use

My investigation :In GraphicalNodeEditPolicy i have found that the methods responsible for handling reconnection are :


getReconnectSourceCommand(ReconnectRequest r)
getReconnectTargetCommand(ReconnectRequest r)


i have tried to override these methods and set the command an request to null so that reonnect action is not done. But it does not solve the problem and the connection can be moved. Can anybody provide some help here.
Re: Fixed source and target for connection [message #639248 is a reply to message #639243] Mon, 15 November 2010 13:02 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

did you try to return an UnexecutableCommand instead of null?

regards,
Re: Fixed source and target for connection [message #639268 is a reply to message #639248] Mon, 15 November 2010 14:33 Go to previous messageGo to next message
Eclipse UserFriend
Not sure how to create an unexecutable command Sad
The input I get in this method is request. Do i need to set any properties for the request.?
Re: Fixed source and target for connection [message #639312 is a reply to message #639268] Mon, 15 November 2010 20:21 Go to previous message
Eclipse UserFriend
Hi,

sowmya wrote on Mon, 15 November 2010 14:33
Not sure how to create an unexecutable command Sad

It goes something like:

return UnexecutableCommand.INSTANCE

- Asiri
Previous Topic:Remove item in Context menu when creating new Node?
Next Topic:How can I get the position from a model.
Goto Forum:
  


Current Time: Sun Jul 06 18:35:35 EDT 2025

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

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

Back to the top