Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » GEF and e4: Edit commands don't work in GEF when starting as e4-aware product
GEF and e4: Edit commands don't work in GEF when starting as e4-aware product [message #982007] Mon, 12 November 2012 21:53 Go to next message
Michael Zugelder is currently offline Michael Zugelder
Messages: 2
Registered: November 2012
Junior Member
Hi everyone,

we're building a E4-based RCP application that is using GEF and a custom Navigator. To get GEF's EditorPart working, we're running the plugins as 3.X application with an e4-aware product as described in Dirk Fahland's tutorial[1]. Unfortunately, he isn't showing how to include the eclipse MainMenu, so we've just defined them in the Application.e4xmi.

I have attached a minimal example plugin project that should run as 3.X application (run a product: org.eclipse.platform.ide) and e4-aware product (run an application: geftest.application). Create and open a .gef file after starting to test it. There should be a green square, which can be selected and removed. Undo and redo should work.

The problem is that the copy/paste/delete/undo/redo integration of GEF doesn't seem to work when starting as e4-aware product. The menu entries just stay gray (or throw NotHandledExceptions). It works fine when running the plugin as 3.X application. Note that the menu entries work in the Project Explorer regardless how the plugin is run.

Is there a better way of defining the edit Commands so that it works with GEF? Or is the whole e4-aware product approach a bad idea? Or is this just a GEF bug?

Thanks

[1] dirksmetric.wordpress.com/2012/08/01/tutorial-eclipse-rcp-e4-with-3-x-views-like-project-explorer-properties-etc/ (can't link before making 5 posts)
  • Attachment: geftest.zip
    (Size: 12.02KB, Downloaded 134 times)
Re: GEF and e4: Edit commands don't work in GEF when starting as e4-aware product [message #1033723 is a reply to message #982007] Thu, 04 April 2013 15:07 Go to previous messageGo to next message
Michael Zugelder is currently offline Michael Zugelder
Messages: 2
Registered: November 2012
Junior Member
We have since "solved" this problem by defining a few global Handlers in the e4xmi and then delegating from there to the built-in org.eclipse.ui.actions.SelectionListenerAction classes (when the navigator is active) or to the org.eclipse.gef.ui.actions.{...} classes (when GEF is active).
Re: GEF and e4: Edit commands don't work in GEF when starting as e4-aware product [message #1058144 is a reply to message #1033723] Sun, 12 May 2013 14:17 Go to previous message
Stefan Hennig is currently offline Stefan Hennig
Messages: 4
Registered: January 2013
Junior Member
Hi! I'm currently faced with the same problem. Might you please share a code snippet showing how you've delegated the UI command from the globally defined handler to the built-in classes? Thanks in advance!
Previous Topic:How can a member variable be initialized and updated with the @Preference annotation?
Next Topic:Minimize/Maximize Partstack
Goto Forum:
  


Current Time: Thu Oct 02 14:33:52 GMT 2014

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

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