Re: enable/disable toolbar button by "selection" [message #484052] |
Fri, 04 September 2009 05:45 |
Neha Messages: 52 Registered: July 2009 |
Member |
|
|
Hi ,
just remove the default handler class from the command created
and specify the class in your handler created.
"Alexander Filitz" <alexanderfilitz@hotmail.com> wrote in message
news:c736fef7424981b3e17dc1d25f4098ec$1@www.eclipse.org...
> hello
>
> I got a View with a TableViewer which is using Databinding to show some
> call information. After reading some tutorials about ui.commands i created
> a menu and toolbar for my commands. Now i want to enable some commands
> when a column of the TableViewer is selected, but my extensions are not
> working.
>
> This is what i've used:
>
> ui.handlers:
> (handler)->(enabledWhen)->oneSelection(reference)
> expressions.definitions:
> oneSelection(definition)->selection(with)->1(count)
>
> AND
>
> TableViewer viewer = new TableViewer(parent, SWT.MULTI |
> SWT.FULL_SELECTION);
> ..
> ..
> getSite().setSelectionProvider(viewer);
>
> the funny thing is, when i use the same reference in the ui.menus
> extension (visibleWhen) its working fine. when i select a column the
> button(command) get visible!
>
> maybe someone got an idea what i've made wrong?
> thanks
>
> Alex
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04640 seconds