Building an Eclipse Plugin: The Final 50 Feet

Long-time readers may know about CodeJohnny, a Code Generation app I built for Java in 2014. I designed it to run within any IDE or with additional features as an Eclipse Plugin. I didn't blog much about the process of building CodeJohnny other than to describe how to get started with Eclipse Plugins and to announce its release. I paid for that mistake when I went back to update and repackage the Plugin Project in Eclipse. Since the last time I did it over a year ago I had forgotten how to package the Plugin! Thus today's post, missing from the NixMash Eclipse Plugin Post Collection, Building an Eclipse Plugin: The Final 50 Feet.

Let's begin by jumping to the end result. We're going to package a JAR known to Eclipse as a Deployable Plugin. That JAR will then be installed simply by placing it in Eclipse's /dropins folder. Pretty cool. Here are the contents of the final JAR in /dropins. Notice codejohnnyplugin.jar in the root.

We're going to Export our Plugin Project, but export it as what? A JAR, Executable JAR, something else? Fortunately Eclipse does the heavy lifting for us once we know what to export it as.

First the export…

Now select “Deployable Plugins and Fragments.”

Tell Eclipse where you want it to save the JAR.

You're done! Now it's a simple matter of copying the JAR to your Eclipse /dropins folder and restarting Eclipse.

Posted November 02, 2015 12:03 PM EST

More Like This Post