Importscrubber jEdit Plugin
This is an jEdit plugin to clean the import specifications in Java source code.
It is simply a wrapper for Tom Copeland's ImportScrubber utility. For more
information on the utility see http://importscrubber.sourceforge.net/.
The ImportScrubber utility cleans and sorts your Java import statements. To
quote Tom, "No more unnecessary imports, no more import-on-demand.
And they're sorted, too!". Explicate imports make reading code that uses an
unfamiliar API a lot nicer, but explicate imports were a pain to maintain--until
ImportScrubber.
Features
- An jEdit action, Importscrubber, to scrub the imports of the
current buffer
- Default source code and generated class file root directories configurable
via a plugin options dialog
- Session aware. That is you can have session specific configurations for
source code and generated class file root directories. When you change
sessions, you can change source code and generated class file roots.
System Requirements
- Tested with jEdit 3.2.2
- Tested on Windows 2000
- Depends on the Session plugin
- Includes BCEL.jar (??? download from around 1-Sept-2001) and importscrubber.jar
(V1.3.4)
Installation
Download from jEdit's Plugin Central (??? to be done) or from http://www.geocities.com/cswilly/importscrubberplugin/releases/importscrubber-r002.zip.
If the latter, then your must copy the jars in the zip file to your jEdit jars
directory.
Configuration
You must set two directories.
- Sources Root
this is the root where your source code resides
- Classes Root
this is the root where the the class files are generated
You configure these directories by selecting the Utilities/Global Options
menu item. Then open the Plugin Options and select Importscrubber
options.
Note that you can set a default configuration for these directories. These
will be used unless you override them by setting a Session specific
configuration. In this case, we are using the Session plugin as a poor-man's
project manager.
Usage
- Open the Java file you want to Import Scrub
- Choose the menu item Plugins/Importscrub
Building
I do the build using
Ant. Look in the
build.cmd file for the version of Ant used. If the environmental ANT_HOME
is defined, then it is used to find
Ant.
You need to define two properties for the build:
JEDIT_INSTALL_DIR
Directory where jEdit is installed
JEDIT_USER_DIR
User settings directory where you have downloaded Session.jar
and importscrubber.jar
To define these, copy the file build.properties.template to build.properties
and edit JEDIT_INSTALL_DIR and JEDIT_USER_DIR to point
someplace reasonable on your system.
To see the build targets,
type build -projecthelp. The most important target is
make.jar which creates the importscrubberPlugin.jar.jar.
Current Bugs
Current Todo List
- Currently the file being scrubbed is always changed. It would be nice if
the plugin would only change the file in the buffer and not on the disk.
Change Log
Release 002 (Sept 29, 2001)
- Added Session awareness for configuration
Release 001 (Sep 26, 2001)