如何为 Eclipse 编写插件?

如何开始为 日食编写插件?

我一直在寻找文档,但不幸的是,文档很少,或者很差,那么有什么文章可以推荐呢?

73455 次浏览

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 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.

O'Reilly has two good Eclipse Plugin tutorials:

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

The best step-by-step that covers almost every aspect of plugin development is the book "Eclipse: Building Commercial Quality Plugins".

It's available at most book shops and electronically at safari: http://safari.oreilly.com/9780321574435

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.

I found a great Eclipse plugin tutorial named Extending Eclipse - Plug-in Development Tutorial.