Skip to main content



      Home
Home » Newcomers » Newcomers » Getting the Workbenchpart for an icon on the toolbar
Getting the Workbenchpart for an icon on the toolbar [message #502138] Sun, 06 December 2009 09:46 Go to next message
Eclipse UserFriend
I have defined an action, along with the menu and icon. That all works well.
However, depending on the state of the app, I want to be able to change the
icon. It seems like what I need to do is get the Workbenchpart that is the
icon and then call setTitleImage. But it isn't obvious to me where or how I
get the workbenchpart. Where do I listen for the createPartContol for the
icon and/or the menu. Any advice would be appreciated.

TIA, Ric
Re: Getting the Workbenchpart for an icon on the toolbar [message #502156 is a reply to message #502138] Sun, 06 December 2009 12:49 Go to previous message
Eclipse UserFriend
Ah so. One can do this quite simply from the run() method in
WorkbenchDelegate using the IAction object passed in. Makes sense when one
thinks about the "Action" has an object with properties and not as
event/verb.

Ric


On 12/6/09 6:46 AM, in article C74103B0.40365%riwright@adobe.com, "Ric
Wright" <riwright@adobe.com> wrote:

> I have defined an action, along with the menu and icon. That all works well.
> However, depending on the state of the app, I want to be able to change the
> icon. It seems like what I need to do is get the Workbenchpart that is the
> icon and then call setTitleImage. But it isn't obvious to me where or how I
> get the workbenchpart. Where do I listen for the createPartContol for the
> icon and/or the menu. Any advice would be appreciated.
>
> TIA, Ric
>
Previous Topic:Developing plugin with feature adding code snippet in class on button click
Next Topic:closing input in eclipse console (linux)
Goto Forum:
  


Current Time: Fri Nov 07 01:46:51 EST 2025

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

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

Back to the top