Free tutorials for Java, Eclipse and Web programming



Eclipse Plugin Development - Tutorial (Eclipse 3.5)

Lars Vogel

Version 1.2

13.07.2009

Revision History
Revision 0.1- 0.401.04.2008Lars Vogel
Created
Revision 0.514.04.2009Lars Vogel
Reworked examples from actions to commands
Revision 0.615.04.2009Lars Vogel
Replaced menu contribution description with link to Eclipse commands tutorial
Revision 0.718.04.2009Lars Vogel
Command contribution to the package explorer
Revision 0.819.04.2009Lars Vogel
Export of plugin updated to Eclipse 3.4 (dropin folder and link to P2 update site article).
Revision 0.920.04.2009Lars Vogel
Creating markers
Revision 1.031.05.2009Lars Vogel
Update to Eclipse 3.5
Revision 1.112.07.2009Lars Vogel
Added export plugin into running target
Revision 1.213.07.2009Lars Vogel
Corrected typoes

Eclipse Plugins

This article describes the basic steps on how to create a Eclipse plugin and how to deploy it. It demonstrates also how to extend the package explorer, how to save additional information on existing resources, how to use JDT (Java Development Tools) and how to create markers in Eclipse.

This article assumes that you are already familiar with using the Eclipse IDE for standard Java development.

This article was developed with Eclipse 3.5 (Eclipse Galileo) and Java 1.6.


Table of Contents

1. Eclipse Plugins
2. Hello World Plugin
3. Menu / toolbar contribution via a plugin
4. Contribute to the Eclipse package explorer
4.1. Create Project
4.2. Create Extensions
4.3. Create the code
4.4. Restrict the extension - Visible When
5. Resources and Marker
5.1. Overview
5.2. Create markers
6. Deploying a plugin
7. Thank you
8. Questions and Discussion
9. Links and Literature
9.1. Source Code
9.2. Other Resources

1. Eclipse Plugins

Eclipse is a powerful, extensible IDE for building general purpose applications. Eclipse has an extensible architecture allowing to extent the Eclipse IDE via Plugins.

Eclipse is build upon the OSGI framework (Equinox). This framework allow a flexible architecture in which so-called bundles can be dynamically loaded. Eclipse calls these Plugins. Via these Plugins / bundles you can extend the Eclipse IDE.

See Introduction to OSGi for details.