Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Sharing a menu item
Sharing a menu item [message #292717] Tue, 11 October 2005 11:57 Go to next message
Eclipse UserFriend
Originally posted by: eric.widhalm.usda.gov

How can I share the "Print" button on the File menu? I have a handful of
tools which each need to print in their own way, and I'd like them to hook
into the "Print" menu item according to which Part is active.

I've declared the various items in their plugin.xml files as
"retarget=true" and "allowLabelUpdate=true", and I've successfully placed
them where I want in the menu. But I get a separate print item in the
menu for every plugin!

Help?
-Eric
Re: Sharing a menu item [message #292727 is a reply to message #292717] Tue, 11 October 2005 14:40 Go to previous message
Eclipse UserFriend
Originally posted by: douglas.pollock.magma.ca

Eric wrote:

> How can I share the "Print" button on the File menu? I have a handful of
> tools which each need to print in their own way, and I'd like them to hook
> into the "Print" menu item according to which Part is active.
>
> I've declared the various items in their plugin.xml files as
> "retarget=true" and "allowLabelUpdate=true", and I've successfully placed
> them where I want in the menu. But I get a separate print item in the
> menu for every plugin!

One plug-in creates the item (the one plug-in on which everyone else
depends), and then the rest just use I[Editor
View]Site.getActionBars().setGlobalActionHandler(String,IAct ion).



cheers,
d.
Previous Topic:MenuBarPath names?
Next Topic:FooPlugin.getDefault() returns null from code running inside the Foo plug-in
Goto Forum:
  


Current Time: Thu Jun 19 13:19:35 EDT 2025

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

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

Back to the top