Skip to main content



      Home
Home » Modeling » Graphiti » DiagramEditor default behaviour
DiagramEditor default behaviour [message #795271] Fri, 10 February 2012 04:17 Go to next message
Eclipse UserFriend
Hi,

I'm developing a tool for analysing CIM (Common Information Model) models. To allow the user to analyse the model in a class diagram I want to use Graphiti to create such a diagram editor.

Analysing means that there should be no chance to change the analysed model. So diagram elements should be not deletable.

I've already tried to disable the DeleteFeature by returning null in my FeatureProvider. This hides the Delete entry from context menu but there is still a Delete entry in Eclipse Edit menu. When I click this entry something happens in background (diagram editor is marked as dirty and there is a new entry in undo-list) but the diagram elements remain as expected.

How can I remove the delete entry in Eclipse Edit menu and how can I set the keyboard shortcut of "Remove" to DEL?

Thank you very much for your help in advance!

Best regards,
Stefan Wülfrath
Re: DiagramEditor default behaviour [message #795372 is a reply to message #795271] Fri, 10 February 2012 06:47 Go to previous messageGo to next message
Eclipse UserFriend
Have you tried to return a Delete Feature that returns false on canDelete?

Michael
Re: DiagramEditor default behaviour [message #795417 is a reply to message #795372] Fri, 10 February 2012 08:07 Go to previous message
Eclipse UserFriend
Hi,

thank you for your quick reply!

I've tried it and it works as I would expect:

Deletion is disabled for all elements but there is a disabled "Delete" button at every diagram element. Do you know how I could hide this button?

And how can I change the default action of DEL keyboard shortcut?

Stefan
Previous Topic:Import or re-use Diagram?
Next Topic:outline view for diagram in Graphiti 0.9
Goto Forum:
  


Current Time: Wed Jul 16 08:13:52 EDT 2025

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

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

Back to the top