86

How can I start writing a plugin for Eclipse?

I've looked for documentation, but unfortunately there is very little or it's poor, so what articles can recommended?

Ernst Robert
  • 2,037
  • 4
  • 25
  • 50
Agusti-N
  • 3,956
  • 10
  • 40
  • 47
  • 5
    Documentation on writing plugins is anything but poor. If you haven't found any, you just haven't looked. – JesperE Nov 19 '08 at 11:26
  • 10
    @Jesper: unfortunately the docs from eclipse is chaotic, not systematic, although vast. – Tomasz Gawel Dec 06 '13 at 10:20
  • For people coming to this later who just want some working code to play with - I've got some skeleton projects at http://joereddington.com/4149/2014/09/24/eclipse-plugins/ with links to the github repos and such... – Joe Sep 26 '14 at 10:28

5 Answers5

67

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
David Schlosnagle
  • 4,263
  • 2
  • 23
  • 16
23

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

Adam Davis
  • 91,931
  • 60
  • 264
  • 330
  • 2
    For what it's worth, the first link has been "retired" (to use their own words) - the new link - http://www.eclipse.org/articles/Article-PDE-does-plugins/PDE-intro.html - the accepted answer has this link – cgp Apr 08 '11 at 13:40
  • I wish the official tutorial were updated to reflect what everything is called now. It was five years old when this question was answered, and now it's a decade out of date. – Conrad.Dean May 11 '13 at 13:12
  • The O'Reilly links don't work anymore. – Anthony Aug 25 '19 at 10:36
  • Try https://web.archive.org/web/20180506194534/http://www.onjava.com/pub/a/onjava/2005/02/09/eclipse.html and https://web.archive.org/web/20180505090910/http://www.onjava.com/pub/a/onjava/2004/08/18/eclipseplugins.html - but keep in mind these resources are over a decade old, and may no longer be relevant. – Adam Davis Sep 06 '19 at 19:29
3

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

jdoklovic
  • 146
  • 3
  • 6
1

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

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Junv
  • 520
  • 1
  • 9
  • 16
0

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.

fhe
  • 6,099
  • 1
  • 41
  • 44