- 介绍
有时候我们需要根据特定的情况来决定是否要实现菜单或者按钮,换句话说只有满足特定要求的情况下再显示或者变成可用的。
- visibleWhen
这个可以用在command、menu子节点下:
- activeWhen
[codesyntax lang="xml"]
<activeWhen> <with variable="activePart"> <instanceof value="org.eclipse.ui.internal.views.markers.ExtendedMarkersView"/> <test args="any" property="org.eclipse.ui.ide.contentGenerator"> </test> </with> </activeWhen>
[/codesyntax]
- visibility
- selection