visibleWhen on toolbar [message #760224] |
Thu, 01 December 2011 11:07  |
Eclipse User |
|
|
|
Hy,
I want to show a toolbar only if a special editor is opened.
I tryed this in my plugin.xml
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
<toolbar
id="toolbar.id"
label="Label">
<command
commandId="command1.id"
icon="icons/refit.gif"
label="Refit"
style="push">
</command>
<visibleWhen
checkEnabled="false">
<with
variable="activeEditorId">
<equals
value="Editor1.id">
</equals>
</with>
</visibleWhen>
</toolbar>
But this doesn't work.
If I add the visbleWhen tag to the command it works perfectly.
But for witch reason is it allowed to add the visbleWhen tag to a toolbar?
(I'm too lazy to add visbleWhen tag to all commands in this toolbar)
Thanks
code
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.24779 seconds