0
点赞
收藏
分享

微信扫一扫

Eclipse插件开发根据需要显示按钮或菜单


  • 介绍

有时候我们需要根据特定的情况来决定是否要实现菜单或者按钮,换句话说只有满足特定要求的情况下再显示或者变成可用的。

  • 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


举报

相关推荐

0 条评论