Handler Enablement [message #488476] |
Mon, 28 September 2009 20:27 |
Eclipse User |
|
|
|
Originally posted by: runzhou.li.gmail.com
Hi,
I've contributed a toolbar button to a specific perspective and the command
of this button is handled by a handler extension point defined in
plugin.xml.
What this button does is to open up a web page using an IWebBrowser.
Now I'm trying to implement an enablement mechanism so the button is grayed
out when this web page is opened.
How should I do this properly?
Thank you in advance.
--
Runzhou Li
|
|
|
|
Re: Handler Enablement [message #488635 is a reply to message #488534] |
Tue, 29 September 2009 14:31 |
Eclipse User |
|
|
|
Originally posted by: runzhou.li.gmail.com
Thank you Prakash.
Actually I just found a solution, which is that by restrict the select in
the handler class.
:)
"Prakash G.R." <grprakash@gmail.com> 写入消息
news:h9sdq5$ah7$1@build.eclipse.org...
> Runzhou Li wrote:
>> I've contributed a toolbar button to a specific perspective and the
>> command of this button is handled by a handler extension point defined
>> in plugin.xml.
>>
>> What this button does is to open up a web page using an IWebBrowser.
>>
>> Now I'm trying to implement an enablement mechanism so the button is
>> grayed out when this web page is opened.
>
> You can either create a property tester or a source provider and
> maintain that state. Use that information in the enableWhen in your
> handler
>
> - Prakash
>
> Platform UI Team, IBM
> http://blog.eclipse-tips.com
|
|
|
Powered by
FUDForum. Page generated in 0.02500 seconds