Specifying the visibility when contributing to popupMenus [message #167856] |
Tue, 09 December 2003 03:27 |
Eclipse User |
|
|
|
Hi All
I want to contribute a new sub menu with an existing pop menu using
"org.eclipse.ui.popupMenus" extension point , and i want to add a sub menu
that appears only if there is a selection in the view (number of selected
objects >0), but the <visibility> item does not have an attribute that
specifiy the number of selected objects , so i restricted the selection to
be of class java.lang.Object like this
<extension
point="org.eclipse.ui.popupMenus">
<viewerContribution
targetID="com.abc.navigation.presentation.view.id"
id="com.abc.ui.popup.NavigationView">
<visibility>
<!-- to be invisible if no object is selected , it can be navigation node
instead of Object -->
<objectClass
name="java.lang.Object">
</objectClass>
</visibility>
<menu
label="static"
path="additions"
id="com.abc.statical.ui.NavigationView.staticSubMenu">
</menu>
</viewerContribution>
Is there a better way to specifiy that i want the submenu to appear if the
number of selection >0 ??????
Thanks , Joe
|
|
|
Powered by
FUDForum. Page generated in 0.23862 seconds