Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 17:57 Go to next message
sowmya Mising name is currently offline sowmya Mising nameFriend
Messages: 51
Registered: July 2009
Member
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 18:02 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

did you try to return an UnexecutableCommand instead of null?

regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: Fixed source and target for connection [message #639268 is a reply to message #639248] Mon, 15 November 2010 19:33 Go to previous messageGo to next message
sowmya Mising name is currently offline sowmya Mising nameFriend
Messages: 51
Registered: July 2009
Member
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] Tue, 16 November 2010 01:21 Go to previous message
Asiri Rathnayake is currently offline Asiri RathnayakeFriend
Messages: 80
Registered: September 2010
Location: Colombo, Sri Lanka.
Member
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: Fri Apr 19 05:11:26 GMT 2024

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

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

Back to the top