我试图通过这样的活动来隐藏UI中的元素
<plugin> <extension point="org.eclipse.ui.startup"> <startup class="StartUp"> </startup> </extension> <extension point="org.eclipse.ui.activities"> <activity id="com.lowcoupling.actitivities.unwantedActionSet1" name="Unwanted Search ActionSet"> </activity> <activityPatternBinding activityId="com.lowcoupling.actitivities.unwantedActionSet1" isEqualityPattern="true" pattern="org.eclipse.papyrus.infra.discovery.ui.menu.toolbars.discoveryCommand"> </activityPatternBinding> </extension> </plugin>
但是当我将此插件作为另一个EClipse应用程序运行时,该按钮仍然存在。我究竟做错了什么?
的pattern值activityPatternBinding采用以下格式:
pattern
activityPatternBinding
contributing plug-in id / local id
因此,您必须确定哪个插件有助于菜单项。查看Eclipse Papyrus,下载该插件似乎是org.eclipse.papyrus.infra.discovery.ui.menu这样,该模式可能是:
org.eclipse.papyrus.infra.discovery.ui.menu
pattern="org.eclipse.papyrus.infra.discovery.ui.menu/org.eclipse.papyrus.infra.discovery.ui.menu.toolbars.discoveryCommand">
(假设isEqualityPattern =“ true”,则所有.字符都需要转义正则表达式版本)
.