Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » To delete an object in gef using the delete key(I have an graphical editor with MultiPageEditpart. How can i delete the an graphical object in the GEF using the delete key?)
To delete an object in gef using the delete key [message #827019] Thu, 22 March 2012 19:50 Go to next message
archana G is currently offline archana GFriend
Messages: 2
Registered: March 2012
Junior Member
I have an graphical editor with MultiPageEditpart. How can i delete the an graphical object in the GEF using the delete key?

Any help will be needfull..

Thanks In Advance
Archanag
Re: To delete an object in gef using the delete key [message #832516 is a reply to message #827019] Fri, 30 March 2012 08:32 Go to previous messageGo to next message
Marcel Boerner is currently offline Marcel BoernerFriend
Messages: 1
Registered: March 2012
Junior Member
The easiest way is to use org.eclipse.ui.bindings extension point. Just add it to the manifest.xml of your editor plugin. There you can add a key which is the shortcut and a command which should be used when this shortcut is pressed. Your command then needs to delete your modelartefact.
Re: To delete an object in gef using the delete key [message #847618 is a reply to message #827019] Tue, 17 April 2012 13:39 Go to previous message
pawcik Missing name is currently offline pawcik Missing nameFriend
Messages: 2
Registered: April 2012
Junior Member
For standard GEF Editor the easiest way is to use a GEF ActionBarContributor. But for MultiPageEditor it is not able to provide support for tracking changes. You have tu support this somehow.

In my case I propagate selection in GEF editor like this:
getSite().setSelectionProvider(this.getGraphicalViewer());

and MultiPageEditor has to provide a org.eclipse.ui.part.MultiPageEditorActionBarContributor

check also this www.eclipsezone.com/eclipse/forums/t46499.html.

good luck
Previous Topic:GridLayout and Panel with strange behaviour
Next Topic:[SOLVED] Problem to show a XML hierarchy of objects using GEF
Goto Forum:
  


Current Time: Tue Mar 19 08:27:11 GMT 2024

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

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

Back to the top