修改eclipse新建文件向导?
我想修改 Eclipse 中已有的向导。我的计划是将现有的向导插件复制到新插件并在那里进行更改。但是如何在 Eclipse 中启用这个修改后的向导呢?
我知道如何创建本地 P2 更新站点,但如何确保原始向导被更新版本替换?
I would like to modify an already existing wizard in eclipse. My plan is to copy the existing wizard plugin to a new plugin an make the changes there. But how do I enable this modified wizard in eclipse?
I know how to create a local P2 update site but how do I make sure that the original wizard is replaced with the updated version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是一个简单的问题,因为 Eclipse 不支持更改现有向导(并且在全局上,Eclipse 是为添加功能而不是替换它们而构建的)。
您可以考虑的一些想法:您可以定义一个新的向导,它可以重用现有页面,并且只需添加一个新的向导即可完成您的任务,而原始向导将保留。
如何安装:如果您的新插件中有新向导,只需使用导出向导(右键单击/导出),然后从“可部署插件和片段”向导中选择“可部署插件和片段”向导插件开发类。在下一页上选择安装到主机功能,然后将安装插件。
如果您坚持要替换插件(这不是好方法),您可以复制整个现有插件,增加其版本号并进行更改,然后从更新站点安装此插件(或使用Eclipse 向导)。注意事项:如果原始插件已更新,您的插件也必须更新,并且如果两个插件具有相同的版本,则可以看到非常好的冲突,这是很难处理的。
This isn't an easy question, as Eclipse does not support changing existing wizards (and on global, Eclipse is built for adding features instead of replacing them).
Some ideas you could consider: you can define a new wizard, that can reuse existing pages, and simply add a new wizard, that does your trick, while the original one would stay.
How to install it: if you have a new wizard in a new plug-in, simply use the export wizard (Right click/Export), and there select the Deployable plug-ins and fragments wizard from the Plug-in development category. On the next page select the install into host feature, and the plug-in will be installed.
If you insist on replacing the plug-in (that is not the nice way), you could copy the entire existing plug-in, increase its version number and make your changes, then install this plug-in from an update site (or using the Eclipse wizard). Caveats: if the original plug-in is updated, yours have to be as well, and if both plug-ins have the same version, quite nice conflicts can be seen, that are quite hard to handle.