Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » DiagramEditor default behaviour
DiagramEditor default behaviour [message #795271] Fri, 10 February 2012 04:17 Go to next message
Stefan Wülfrath
Messages: 18
Registered: February 2012
Junior Member
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
Michael Wenz is currently offline Michael Wenz
Messages: 1574
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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
Stefan Wülfrath
Messages: 18
Registered: February 2012
Junior Member
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: Tue Jul 29 08:51:40 EDT 2014

Powered by FUDForum. Page generated in 0.01517 seconds