Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Register preferences action on cocoa
Register preferences action on cocoa [message #485835] Tue, 15 September 2009 09:35 Go to next message
Eclipse UserFriend
Originally posted by: victor.conesa.justinmind.com

Hi all,

I've recently moved from eclipse 3.4 to eclipse 3.5 and I ve found some
problems. I have a RCP application running on MacOS that was previously
running over Carbon and now is running over Cocoa. The first issue is how to
make the Preferences appear at the Main Menu of the application. The other
is how to register my own About action. I've search over the web some weeks
but I didn't found any clues. Could you please give me a hand on this?

Thanks in advance!
Re: Register preferences action on cocoa [message #485948 is a reply to message #485835] Tue, 15 September 2009 15:58 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

See how the openPreferencesAction is added to the Window menu in org.eclipse.ui.internal.ide.WorkbenchActionBuilder. That class will also provide an example of adding the about action to the Help menu.

org.eclipse.ui.internal.cocoa.CocoaUIEnhancer should hook up the Mac Preferences and About menu items.

PW


Re: Register preferences action on cocoa [message #486438 is a reply to message #485948] Thu, 17 September 2009 15:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: victor.conesa.justinmind.com

Hi all,

Thanks for the answer. I've taken a look at WorkbenchActionBuilder and I did
the same on my ActionBarAdvisor but it didn't worked. What I did was to
insert this lines on the "makeActions" method of the ActionBarAdvisor class
I'm using in my RCP application:

aboutAction = ActionFactory.ABOUT.create(window);
register(aboutAction);

and then I added to the "fillMenuBar" method of the same class this lines:

ActionContributionItem aboutItem = new ActionContributionItem(aboutAction);
aboutItem.setVisible(!Util.isMac());
helpMenu.add(aboutItem);

But the only thing that appears when I launch the product and select the
"[Product name] -> About [Product Name]" menu option is the strange about
dialog I attach with this email.

I'm quite frustrated with this...



"Paul Webster" <pwebster@ca.ibm.com> escribi
  • Attachment: Picture 1.png
    (Size: 11.32KB, Downloaded 210 times)
Re: Register preferences action on cocoa [message #487051 is a reply to message #486438] Mon, 21 September 2009 16:47 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I was not able to see the PNG (GIMP says it is corrupt). Could you try again?

PW


Re: Register preferences action on cocoa [message #487368 is a reply to message #485835] Tue, 22 September 2009 21:31 Go to previous messageGo to next message
Christian is currently offline ChristianFriend
Messages: 72
Registered: July 2009
Member
Víctor Conesa schrieb:
> Hi all,
>
> I've recently moved from eclipse 3.4 to eclipse 3.5 and I ve found some
> problems. I have a RCP application running on MacOS that was previously
> running over Carbon and now is running over Cocoa. The first issue is how to
> make the Preferences appear at the Main Menu of the application. The other
> is how to register my own About action. I've search over the web some weeks
> but I didn't found any clues. Could you please give me a hand on this?
>
> Thanks in advance!
>
>
the code responsible for making preference action in the app menu work
is in org.eclipse.ui.cocoa fragment... I think if you include that
fragment it does it will work automagically... though you can also look
in it what it does and reimplement it on oyur own...
Re: Register preferences action on cocoa [message #500448 is a reply to message #487051] Thu, 26 November 2009 08:49 Go to previous message
Eclipse UserFriend
Originally posted by: victor.conesa.justinmind.com

Solved. It works on the exported product but not inside Eclipse.
"Paul Webster" <pwebster@ca.ibm.com> escribi
Previous Topic:Using a form page as the GUI for a properties view tab?
Next Topic:Re: MacOS: SWT instead the application's name at menu
Goto Forum:
  


Current Time: Tue Mar 19 03:59:57 GMT 2024

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

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

Back to the top