Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to hook the "About" menu on Mac
How to hook the "About" menu on Mac [message #918792] Fri, 21 September 2012 10:51 Go to next message
Thomas  Mäder is currently offline Thomas MäderFriend
Messages: 46
Registered: July 2009
Member
On the mac, the "About", "Quit", and "Preferences..." menu items are in the application menu. Does anyone know how I can hook up my own handlers to these menu items in a E4 application with no compatibility layer?
Re: How to hook the "About" menu on Mac [message #918807 is a reply to message #918792] Fri, 21 September 2012 11:11 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hi Thomas

In your main project, there is a *.e4xmi file (usually Application.e4xmi if you used the e4 Application Project wizard).
You can edit this file using the e4 Workbench Model Editor.
Find the Handler (Application > Handlers) which points to the Command (i.e. aboutCommand) you are looking for.
Change the Class URI an let it point to your own implementation (or use the link to open the default implementation and change it).

Greetings
Christoph
Re: How to hook the "About" menu on Mac [message #918867 is a reply to message #918807] Fri, 21 September 2012 12:26 Go to previous messageGo to next message
Thomas  Mäder is currently offline Thomas MäderFriend
Messages: 46
Registered: July 2009
Member
So ist there a bunch of "standard" handlers that get hooked up to the system menu? If so it's not working for the "quit" command. I know how register REGULAR menu items, I just don't know how to hook up the system menu on the Mac.
Re: How to hook the "About" menu on Mac [message #918874 is a reply to message #918867] Fri, 21 September 2012 12:33 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Sorry, I misunderstood your question. I don't know anything about how to change the system menu.
Re: How to hook the "About" menu on Mac [message #921469 is a reply to message #918874] Mon, 24 September 2012 06:16 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Look how the cocoa rendere addon is doing it.

Tom

Am 21.09.12 14:33, schrieb Christoph Keimel:
> Sorry, I misunderstood your question. I don't know anything about how to
> change the system menu.
Re: How to hook the "About" menu on Mac [message #921816 is a reply to message #921469] Mon, 24 September 2012 13:02 Go to previous message
Eclipse UserFriend
The Cocoa addon (org.eclipse.e4.ui.workbench.renderers.swt.cocoa) redirects About, Preferences, and Quit to the corresponding Eclipse 3.x command ids (respectively org.eclipse.ui.help.aboutAction, org.eclipse.ui.window.preferences, and org.eclipse.ui.file.exit). Declare a command for those ids in your .e4xmi and provide a handler.

Brian.
Previous Topic:Scrollbar color
Next Topic:TreeViewer context menu does not show up
Goto Forum:
  


Current Time: Thu Apr 25 02:31:41 GMT 2024

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

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

Back to the top