Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to change property of action defined in plugin.xml in other components?
How to change property of action defined in plugin.xml in other components? [message #483477] Tue, 01 September 2009 13:28 Go to next message
Eclipse UserFriend
I have several actions that are defined as an action in an actionset in
the plugin.xml file. An event elsewhere in the app can cause some
property to need to change on an action (ie. text, icon, checked state,
etc.). Is there a registry or listing that I can search to obtain the
action object reference based on the action ID? I've done some searching
around, but haven't found much that applies to my situation; perhaps I'm
not searching for the right thing.

Thanks,
Ryan
Re: How to change property of action defined in plugin.xml in other components? [message #483489 is a reply to message #483477] Tue, 01 September 2009 13:59 Go to previous messageGo to next message
Eclipse UserFriend
No, that's not available. The IAction (that is rendered in the menu or toolbar) is only given to its corresponding IActionDelegate either on selection change or execution.

PW
Re: How to change property of action defi ned in plugin.xml in other components? [message #484216 is a reply to message #483489] Fri, 04 September 2009 11:29 Go to previous message
Eclipse UserFriend
Well, I got it working.

I know it's not right, but it is a horrible hack for now.
Going in through here
PlatformUI.getWorkbench().getActiveWorkbenchWindow()).getCoo lBarManager2().getItems()
I was able to eventually drill down and get the reference to the IAction
that I needed. In the process, I had several restricted warnings. It's a
good thing this code is just a hack and will be replaced soon enough.
Previous Topic:Console view hang up
Next Topic:Need help Exporting Perspective (saving opening etc)
Goto Forum:
  


Current Time: Fri Jul 04 20:04:29 EDT 2025

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

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

Back to the top