Menu visibility control [message #641545] |
Thu, 25 November 2010 20:26  |
Eclipse User |
|
|
|
Hi
I have Check Box table and toolbar item, i want toolbar item to be enabled only when if user has checked more than once any row ...if he not checked any row toolbar item has to be disabled..
please can one provide "org.eclipse.core.expressions.definitions" fot this implementation or any other way to implements this
Thanks
ashok
[Updated on: Thu, 25 November 2010 20:27] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Menu visibility control [message #644060 is a reply to message #644002] |
Thu, 09 December 2010 05:06   |
Eclipse User |
|
|
|
On 12/9/2010 02:41, ashok_kumar_rr@yahoo.com wrote:
> Is it possible to send information at the runtime...
> I dont want to pass value in plugin.xml file
There would be several options to realize that, but it is clear that
those would not provide the context information via the Object[] args or
via the Object expectedValue parameter since these are deduced from the
extension points which are by definition static information. Of-course
this static information can be easily transformed in dynamic
information, if you consider a given static parameter as the key or
argument of some service or map, that allows to dispatch the argument
into runtime behaviour (e.g. an interface method call).
Some more explicit examples:
- Use your own Java properties (global state, ugly, but possible)
- Retrieve the information from services that exist or that you have
defined. You can always ask the Workbench itself for a service
- Use the adaptable mechanism: Either the tested object implements
IAdaptable or you directly query the adapter manager (IAdapterManager
from Platform.getAdapterManager()) and ask for a "service" that has been
associated to your type. You can use the
org.eclipse.core.runtime.adapters ext. pt to register your own adapter
factories.
Thus, there are numerous solutions. Since we don't know, what exactly
you want, we can only guess here. I strongly recommend to provide useful
information, because otherwise you cannot expect much helpful replies.
HTH & Greetings from Bremen,
- Daniel Krügler
|
|
|
|
Powered by
FUDForum. Page generated in 0.27976 seconds