Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHandler Enablement
https://www.eclipse.org/forums/index.php/mv/msg/155036/488476/#msg_488476
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]]>2009-09-28T20:27:52-00:00Re: Handler Enablement
https://www.eclipse.org/forums/index.php/mv/msg/155036/488534/#msg_488534
> 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]]>Prakash G.R.2009-09-29T07:43:00-00:00Re: Handler Enablement
https://www.eclipse.org/forums/index.php/mv/msg/155036/488635/#msg_488635
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]]>2009-09-29T14:31:18-00:00