【发布时间】:2015-02-11 11:30:45
【问题描述】:
我正在开发为内部 DSL 提供 IDE 的 eclipse 应用程序。 DSL 基础设施由 xtext(2.7.3) 平台生成。我想隐藏一些对我的应用程序的最终用户无用的观点(Java、Debug、PDE 等)。我通过活动找到了一种方法。我创建了 plugin.xml 的以下片段
<extension
point="org.eclipse.ui.activities">
<activity id="hauweg" name="hauweg-den-xxxx">
<!-- this makes sure the matching stuff will never be enabled -->
<enabledWhen>
<with variable="true">
<equals value="false"/>
</with>
</enabledWhen>
</activity>
<!-- match all perspectives except org.eclipse.ui.resourcePerspective -->
<activityPatternBinding activityId="hauweg" pattern=".*DebugPerspective"/>
<activityPatternBinding activityId="hauweg" pattern=".*JavaPerspective"/>
<activityPatternBinding activityId="hauweg" pattern=".*JavaHierarchyPerspective"/>
<activityPatternBinding activityId="hauweg" pattern=".*JavaBrowsingPerspective"/>
<activityPatternBinding activityId="hauweg" pattern=".*PDEPerspective"/>
<activityPatternBinding activityId="hauweg" pattern=".*TeamSynchronizingPerspective"/>
</extension>
- xxx.xxx.xxx.ui插件这个插件大部分是xtext平台生成的
- xxx.xxx.xxx.product 插件,包含产品 eclipse 配置
我尝试将提到的片段放到两个 plugin.xml 中,但这对我没有帮助。 我还想了解以下项目:
- 我只能以编程方式进行吗?
- 我可以只通过声明方式吗?
- 我应该同时使用上述两种方式吗?
- 哪个插件应该包含这个声明?
我使用 Eclipse 4 (Luna)。
【问题讨论】:
标签: java eclipse eclipse-rcp dsl