Intro to Eclipse Plugins

The Eclipse plugins are an integral part of WPILib. This document will discuss what they do, and a little bit about how they work. We will go into more detail on how to modify them or add your own later.

The four plugins are:

What they do

While each of the four Eclipse plugins does different, things, there are basically two types.

These are not official types of Eclipse plugins by any means, but it does help to understand them this way.

The project plugin is the core plugin. It can be found at eclipse-plugins/edu.core.wpilib.plugins.core/. this plugin is responsible for installing the tools directory, which is installed to wpilib/tools. It also contains basic code for unzipping files and keeping track of installed files. It is used by the other three plugins, the cpp plugin, the java plugin, and the simulation plugin. Each of the three plugins had its own zip file that it installs into the wpilib directory.

How they work

Installing

When a student ‘installs’ your plugin, they are simply registering it with Eclipse and recording the files you’ve packaged with it. There is no way to hook in to that process and execute code (as far as I know). Therefore, the way the plugins work is that you’re code is executed upon restarting Eclipse. There are if course many different places and ways to hook into Eclipse, but this is how the plugins currently work.

Updating

When your click “check for updates” in the Eclipse help menu it compares the version number provided in your Manifest file against the version number of the site.xml at the location specified. For students, this is the remote wpi server, but for your development it will probably be your local copy.

Developing Eclipse plugins

I will go more in depth in this in this tutorial, but this will allow you to work with the existing plugins. First, you’ll want to install your local plugins. to do this, simply go to Help > install new software > add > local and select the allwpilib/eclipse-plugins/edu.first.wpi.plugins.updatesite/. the site. xml file in this folder is what tells Eclipse about the plugins.