Getting started with Spoon standalone

The simpliest way to get started with Spoon is to use the Eclipse plugin as detailed next. However, you can use Spoon in many environments: command-line, Java, ANT, Maven. See the FAQ for further details on how to use Spoon.

Getting started with SpoonJDT (Eclipse Plugin for Spoon)

Here, we give a very quick guide on how to get started with SpoonJDT. To get more details, you can skip this and go directly to the Tutorial.

The Eclipse plugin for Spoon is a simple container that allows you to deploy Spoonlets. Spoonlets are sets of Spoon processors that are packaged in a jar file to be deployed and integrated into Eclipse. The deployment descriptor is the spoon.xml file, which contains the exported and configurable processors.

Plugin Installation

Spoon plugin has been tested for Eclipse version 3.3 and greater. If not installed on your computer yet, download here

Once Eclipse >=3.3 is running, the SpoonJDT plugin can be installed from the Eclipse Update Manager with the Update Site http://spoon.gforge.inria.fr/eclipse/

Alternatively, the plugin can be downloaded from here, and manually installed in the Eclipse plugins directory.

Deploying a Spoonlet (VSuite) in the Spoon Eclipse Plugin

SpoonJDT by itself is an empty container and you need to deploy Spoonlets to enable actual program processing. Some Spoon sub-projects such as AVal, SpoonAOP, and VSuite provide jars that can be used as Spoonlets. VSuite is a good place to start with since it provides some spoonlets that implement some typical program validations (no transformations) and report warnings when finding problems in your Java code. The following steps describe how to use VSuite in a target Eclipse Java project.

  1. Install SpoonJDT as explained in the previous section.
  2. Get some of the VSuite latest jars and store them in the target Java project (only local jars are supported at the moment).
  3. Add the local jar(s) to the target project's build path. [screenshot]
  4. Click right on the target Java project (make sure you are in Java perspective). Go to Properties -> Java compiler -> Spoon. Enable Spoon processing and add the VSuite local jar(s). Several Spoon processors are available, each one performing a specific processing: you can enable/disable them and (sometimes) apply some configuration. [screenshot]
  5. Press the "Apply" or "OK" button. Processors are then automatically applied to the target Java project (messages are reported when needed). [screenshot]

For more details

See the Tutorial.