简体   繁体   English

编写Eclipse插件以将现有文档导入JavaDoc注释

[英]Writing an Eclipse plug-in to import existing documentation into JavaDoc comments

I would like to write an Eclipse plug-in that is able to import existing documentation into JavaDoc comments of existing Java code. 我想编写一个Eclipse插件,该插件能够将现有文档导入现有Java代码的JavaDoc注释中。

Background: I've generated Java code to communicate with an third party (native) program. 背景:我已经生成了Java代码以与第三方(本机)程序进行通信。 Now I would like to import the documentation of the third party program into my generated code. 现在,我想将第三方程序的文档导入到我生成的代码中。

What I've already done: I have developed an Eclipse "QuickAssist" by implementing "IJavaCompletionProposalComputer" that does the trick already for a single Java method or static field. 我已经完成的工作:通过实现“ IJavaCompletionProposalComputer”,我已经开发了Eclipse“ QuickAssist”,它已经为单个Java方法或静态字段完成了技巧。

Now I would like to write a plug-in that triggers my implementation for every method or field within some selected source code. 现在,我想编写一个插件,该插件可触发某些选定源代码中每个方法或字段的实现。

I'm not so familiar with the Eclipse SDK. 我对Eclipse SDK不太熟悉。 Can someone give me a hint where to start or which interface(s) I need to implement to archive this? 有人可以提示我从哪里开始,或者我需要实现哪些接口来存档?

Thanks in advance. 提前致谢。

There is a site focused on this subject: Eclipse Plugin Site . 有一个专注于这个主题的站点: Eclipse Plugin Site

There you can find a brief tutorial on how to create a new plugin project, and how to test it. 在这里,您可以找到有关如何创建新插件项目以及如何对其进行测试的简短教程。

There's also documentation on SWT, and on the different kinds of components wich can be included on your plugin (Perspectives, Views, Editors, Properties, Actions, Builders, etc), and how to implement them. 还有关于SWT的文档,以及可以包含在插件中的各种组件(透视图,视图,编辑器,属性,动作,生成器等)以及如何实现它们的文档。

Good luck. 祝好运。

You could traverse the Java Object Model, and during the traversal you could apply your code. 您可以遍历Java对象模型,并且在遍历期间可以应用代码。 See the tutorial of vogella.de for the basics - I think, you could adapt it to use your code. 有关基础知识,请参见vogella.de教程-我认为,您可以对其进行调整以使用您的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM