【问题标题】:Can I use the Eclipse 4 model to build an RCP and a Plugin using the same codebase?我可以使用 Eclipse 4 模型使用相同的代码库构建 RCP 和插件吗?
【发布时间】:2014-02-05 17:22:09
【问题描述】:
“Eclipse 4 Plug-in Development by Example”一书提到 Eclipse 4 模型提供了一种对应用程序建模的方法。一个应用程序有一个顶级模型,购买也可能有由不同捆绑包贡献的额外模型片段。
是否可以使用应用程序模型一起开发 RCP 和插件(相同的代码库)?我只是不知道如何将插件项目包含到使用应用程序模型 (Application.e4xmi) 的 RCP 中
【问题讨论】:
标签:
eclipse
eclipse-plugin
eclipse-rcp
e4
【解决方案1】:
是的,您可以拥有插件。插件可以使用fragments为应用模型做贡献:
<extension
id="distribFragment"
point="org.eclipse.e4.workbench.model">
<fragment
uri="fragment.e4xmi">
</fragment>
</extension>
fragment.e4xmi 可以从现有的应用程序模型中导入,并且可以添加新的部件、命令、处理程序......