Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How do I get references to other actions?
How do I get references to other actions? [message #274407] Thu, 21 October 2004 00:41 Go to next message
Eclipse UserFriend
Originally posted by: DaleWKing.InsightBB.com

In the plug-in I want to create I need the ability to trigger actions from
my plug-in instead of the menu or key binding. I understand that everything
is done in terms of actions and to cause that action to take place you
invoke run on the action. But how can I get a reference to the actions from
other plug-ins.

Consider a hypothetical example where when you perform some action in my
plug-in I want to open the Export Resources wizard. The
org.eclipse.ui.actions.ExportResourcesAction
class is the action that does this. But how do I in my plug-in get a
reference to the actual action to invoke run on?

I looked at IExtensionRegistry, but that didn't seem to lead me anywhere.

I know there is a simple answer, but I haven't stumbled across it and I'm
new to plug-in development.

--
Dale King
Re: How do I get references to other actions? [message #274410 is a reply to message #274407] Thu, 21 October 2004 01:27 Go to previous message
Eclipse UserFriend
Originally posted by: DaleWKing.InsightBB.no.spam.com

To follow up my own post, I think I found the answer. What I want instead of
the action is the ICommand which is a layer above that. Using the
ICommandManager I can look up any command that is registered.

I will see if that gets me what I need.

"Dale King" <DaleWKing@InsightBB.com> wrote in message
news:cl7eau$oc5$1@eclipse.org...
> In the plug-in I want to create I need the ability to trigger actions from
> my plug-in instead of the menu or key binding. I understand that
everything
> is done in terms of actions and to cause that action to take place you
> invoke run on the action. But how can I get a reference to the actions
from
> other plug-ins.
>
> Consider a hypothetical example where when you perform some action in my
> plug-in I want to open the Export Resources wizard. The
> org.eclipse.ui.actions.ExportResourcesAction
> class is the action that does this. But how do I in my plug-in get a
> reference to the actual action to invoke run on?
>
> I looked at IExtensionRegistry, but that didn't seem to lead me anywhere.
>
> I know there is a simple answer, but I haven't stumbled across it and I'm
> new to plug-in development.
>
> --
> Dale King
>
>
Previous Topic:obtaining a absolute filename for a file in plugin directory
Next Topic:CVS Date Tags
Goto Forum:
  


Current Time: Thu Jul 17 19:56:01 EDT 2025

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

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

Back to the top