| Getting the Workbenchpart for an icon on the toolbar [message #502138] |
Sun, 06 December 2009 09:46  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.31572 seconds