Eclipse 插件编辑器

发布于 2024-07-26 17:58:43 字数 257 浏览 2 评论 0原文

我想在 eclipse 中创建一个编辑器(作为 eclipse 插件),用于实现我创建的一些接口的 java 类。 编辑器将允许用户编辑一些将放入 java 类中的信息(使用表单)。 - 非常类似于 EJB 编辑器。 我想要实现这个接口的java文件来打开编辑器。

  1. 如何替换类中的值而不需要重新生成它(因为用户可能已经编辑了类中的一些源代码)?
  2. 如何链接编辑器来仅打开一些 java 文件?

谢谢。

I want to create an editor in eclipse (as eclipse plug-in), for a java class that implement some interfaces i created. The editor will let the user edit some information (using a form) that will be put into the java class. - very much like in EJB editor.
I want java files that implement this interface to open the editor.

  1. How can I replace the values in the class without the need to re-generate it (because the user might have edited some of the source code in the class)?
  2. How can I link the editor to open just some java files?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

狠疯拽 2024-08-02 17:58:43

使用 JDT 访问 java 类并使用 java 类的 AST 更改其部分内容。

也许这篇文章会帮你。

Use the JDT to get access to the java class and change parts of its contents using the AST of the java class.

Maybe this article will help you.

み格子的夏天 2024-08-02 17:58:43

1)我建议您详细阅读 Eclipse 文档,因为我认为这不会是微不足道的。
2) 我认为 Eclipse 有一些 mime 类型关联 API,所以您只需使用它即可。

1) I suggest that you read Eclipse documentation in details as I don't think that it will be trivial.
2) I suppose that Eclipse has some mime-type associations API, so you'd just use that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文