Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Preventing Connection from being deleted
Preventing Connection from being deleted [message #1701804] Wed, 15 July 2015 18:53 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Is it possible to not be able to move or delete Connection and Anchors?
Re: Preventing Connection from being deleted [message #1701887 is a reply to message #1701804] Thu, 16 July 2015 13:00 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Alex,

yes, simply override getDeleteFeature and getMoveAnchorFeature in your
feature provider. Returning null or an instance that returns false on
canDelete/canMove will do the trick.

HTH,
Michael
Re: Preventing Connection from being deleted [message #1701897 is a reply to message #1701887] Thu, 16 July 2015 14:33 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Thanks Michael.

I tried your suggestions and they work. However, I still am able to select a connection and move its endpoints to another anchor. I override getMoveShapeFeature() that returns null, but it does not apply to Connections since they are not Shapes.

Alex
Re: Preventing Connection from being deleted [message #1702194 is a reply to message #1701897] Mon, 20 July 2015 14:35 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Alex,

moving an endpoint means reconnecting a connection. For this the reconnection feature is asked, default implementation is DefaultReconnectionFeature queried from IFeatureProvider.getReconnetionFeature.

HTH,
Michael
Previous Topic:Make connection point always static relative to anchor
Next Topic:Graphiti ToolTips
Goto Forum:
  


Current Time: Tue Mar 19 07:18:06 GMT 2024

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

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

Back to the top