Skip to content

Eclipse Plugin Installation

StevenArzt edited this page Dec 23, 2014 · 8 revisions

The Soot Eclipse Plugin

Overview

The Soot - Eclipse Plugin integrates Soot, a Java optimization framework, with the Eclipse IDE for Java, allowing the user to:

  • optimize class files automatically and use more advanced optimization Options
  • import class files and decompile them using the Dava Decompiler
  • use a Jimple editor with syntax highlighting^
  • view attribute information at source and IR Levels
  • develop analyses with an interactive control flow graph

This plugin works with the Eclipse official release 3.3 (tested on 3.3.2) and should run in any of the later releases.

Installing the Plugin

There are several ways to install the Soot plugin for Eclipse.

Simple Installation

The easiest way to install the Soot-Eclipse plugin is to download the Eclipse Plugin Quickstart zip from the Soot download page, and expand it inside the root directory of your Eclipse installation. This package contains compiled versions of everything you need to run Soot in Eclipse: the plugin itself, Soot, Jasmin and Polyglot; these are all placed in subdirectories of your Eclipse "plugins" and "features" directories.

Download

Eclipse Update Site

There is also an Eclipse Update Site that you can add to your Eclipse installation and use to obtain the plugin.

Custom Installation

For various reasons (such as building Soot from source), you may not want to install everything in your Eclipse plugins directory. If you are installing the Soot-Eclipse plugin by hand, you must ensure the following:

  • The plugin must be compiled. In the main soot directory there is a file called ant.settings.template. Make a copy of this file, named ant.settings, and edit it to reflect the locations of your directories. This is the same settings file for all of Soot so you may have already modified it. Then you can run "ant eclipse-plugin" to compile the plugin.

  • The following files and directories from soot/eclipse/ca.mcgill.sable.soot must be copied or symlinked to a directory named ca.mcgill.sable.soot in your Eclipse plugins directory: soot-plugin.jar, plugin.xml, plugin.properties, icons. It is OK to just copy or symlink the whole ca.mcgill.sable.soot directory into the Eclipse plugins directory.

  • The plugin.xml file is Eclipse's way of specifying, among other things, where to find class files (much the same information as is given in the CLASSPATH when running Java from the command line).

  • The Soot plugin must be able to find the classes of Soot and of Jasmin and of Polyglot (this is new - a version of Polyglot can be downloaded from the Soot downloads page in a jar format). Their locations are specified inside the plugins.xml by <library> tags inside the <runtime> tag. The plugin.xml contains some sample paths that you can edit. As on the CLASSPATH, either jars or directories containing classes are allowed. Pathnames can be absolute, or relative to the plugins/ca.mcgill.sable.soot directory. Eclipse seems to have a bug (or feature) which causes it to ignore .. (parent directory) in the path.

  • The online help for the plugin is located in the directory soot/eclipse/ca.mcgill.sable.soot in the Soot distribution. In order to install it in Eclipse (recommended), the doc directory and the three files toc.xml, toc_Concepts.xml and toc_Reference.xml must be copied or symlinked into the ca.mcgill.sable.soot directory in your Eclispe plugins directory.

Clone this wiki locally