Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 17:28 Go to next message
Ryan is currently offline RyanFriend
Messages: 74
Registered: July 2009
Location: Indiana
Member
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 17:59 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 15:29 Go to previous message
Ryan is currently offline RyanFriend
Messages: 74
Registered: July 2009
Location: Indiana
Member
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: Mon Sep 23 04:45:44 GMT 2024

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

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

Back to the top