Contribution to Eclipse toolbar is not hidden on switching the perspective [message #329843] |
Tue, 08 July 2008 10:24  |
Eclipse User |
|
|
|
Hi,
we've an issue with contributing a toolbar to the Eclipse main toolbar. We
do want to have the additional toolbar visible only within our own
perspectives, but not in the standard perspectives. However, the toolbar,
once contributed, is staying visible in all perspectives.
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions ">
<toolbar id="myToolbarId">
<command>
...
</command>
<visibleWhen>
... see below ...
</visibleWhen>
</toolbar>
</menuContribution>
We've played with two variants of the <visibleWhen> expression:
a) Testing for the active perspective id...
<visibleWhen>
<with variable="activeWorkbenchWindow.activePerspective">
<or>
<equals value="myPerspective1"/>
<equals value="myPerspective2"/>
<equals value="myPerspecitve3"/>
</or>
</with>
</visibleWhen>
b) Testing for an actionSet within the active contexts which is bound via
perspectiveExtentsions to the desired perspectives...
<visibleWhen>
<with variable="activeContexts">
<iterate operator="or">
<equals value="myActionSetId"/>
</iterate>
</with>
</visibleWhen>
None of those approaches are working. The toolbar is visible in all
perspectives. Any ideas or suggestions on how to solve this issue? We are
using the final Eclipse 3.4 build.
Thanks, Regards,
--
Uwe Stieber
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04577 seconds