Java 如何为 Eclipse 编写插件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/299283/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to write a plugin for Eclipse?
提问by Agusti-N
采纳答案by David Schlosnagle
There are some pretty good resources and tutorials on the main Eclipse and IBM's site. One of the best ways is to pick an open source plug-in that has some similar features to what you want to do and start to dissect it.
在主要的 Eclipse 和 IBM 站点上有一些非常好的资源和教程。最好的方法之一是选择一个与您想要做的事情具有一些相似功能的开源插件,然后开始剖析它。
回答by Adam Davis
Eclipse has a pretty good "Your First Plug-in" tutorial. If it is confusing, I'm sure they would greatly appreciate your feedback. Keep in mind that Eclipse is essentially Java, so if you don't have a good grasp of Java go for general Java tutorials first, and then come back to Eclipse development.
Eclipse 有一个很好的“你的第一个插件”教程。如果它令人困惑,我相信他们会非常感谢您的反馈。请记住,Eclipse 本质上是 Java,因此如果您没有很好地掌握 Java,请先阅读一般的 Java 教程,然后再回到 Eclipse 开发。
O'Reilly has two good Eclipse Plugin tutorials:
O'Reilly 有两个很好的 Eclipse 插件教程:
They not only go through the simple code examples, but give you screen shots of the process since a lot of work is done through wizard type interface windows.
他们不仅会介绍简单的代码示例,还会为您提供过程的屏幕截图,因为很多工作都是通过向导类型的界面窗口完成的。
If these aren't helpful, perhaps you could be more specific as to what is difficult to follow.
如果这些没有帮助,也许您可以更具体地说明难以遵循的内容。
-Adam
-亚当
回答by jdoklovic
The best step-by-step that covers almost every aspect of plugin development is the book "Eclipse: Building Commercial Quality Plugins".
涵盖插件开发几乎所有方面的最佳分步指南是“Eclipse:构建商业质量插件”一书。
It's available at most book shops and electronically at safari: http://safari.oreilly.com/9780321574435
它可以在大多数书店购买,也可以在 safari 以电子方式购买:http: //safari.oreilly.com/9780321574435
回答by fhe
I think a very good resource is also to look at the examples that are available via the new Plug-In Project wizard.
我认为一个很好的资源也是查看通过新插件项目向导提供的示例。
Depending on what you want to provide with your plug-in, you can choose from editor plug-ins, view plug-ins, plug-ins that provide a property page (just to name a few) and see how they're built and what extension points they implement.
根据您希望为插件提供的内容,您可以从编辑器插件、查看插件、提供属性页的插件(仅举几例)中进行选择,并查看它们的构建方式和他们实现了哪些扩展点。
回答by Junv
I found a great Eclipse plugin tutorial named Extending Eclipse - Plug-in Development Tutorial.
我找到了一个很棒的 Eclipse 插件教程,名为Extending Eclipse - Plug-in Development Tutorial。