JIndex Plugin
By Dirk Möbius
dmoebius@gmx.net

Introduction
Usage
Frequently Asked Questions
Change Log
License Information

Introduction

When editing Java source files, the JIndex plugin enables jEdit to show the JavaDoc API html documentation for the currently selected word, with a single key press.

Before the first use, you have to create an keyword index on the Java libraries that you frequently use. Most often, this will be classes.zip or rt.jar (depending on your JDK version), but it can be any other ZIP or JAR file as well, and as many as you wish.


Usage

Requirements

You need at least:

Creating an index

On the first use of JIndex, it will automatically present you a configuration dialog. Use this dialog to create a list of JAR and ZIP files. These files will be scanned for all members in all classes, creating a fast index. Use the dialog to associate the JAR/ZIP files with the location of API documentation. The location of the API doc may be a folder or any valid URL.

(more explanations here)

Using an index

There are three ways of using JIndex: (TODO: more documentation)


Frequently Asked Questions

I doubleclicked on an entry, but nothing happens?

You need to install the InfoViewer plugin to actually view any API doc.

Why is it so slow on first use?

If you use JIndex for the first time in the current jEdit session, JIndex has to load the index file. If you created an index for the JDK 1.2 API, it is at least 3 MB large, which takes some time for loading.

Second, if you use the internal browser (jEdit HelpViewer) for API browsing, this takes some time, too. The internal browser is slower than an external one. You might want to change this in the JIndex options.

Third, JIndex uses serialization to save and load the index. Serialization is poorly implemented in Linux IBM JDK 1.1.8. It's much better in Windows JDK 1.3.

Luckily, the index loads in a new thread, so you can continue to work with jEdit during load.

I noticed some entries in the index for the JDK API, there are no HTML files for it in the Sun API documentation.

Actually, there are a lot of these entries: all com.sun.* and sun.* entries have no documentation. Sun chooses to hide their "intellectual properties" from us, although they made a lot of classes and methods there public. JIndex simply indexes all public access classes and methods, whether there is documentation for it or not. JIndex does this using Java reflection.

Another way to exclude undocumented entries would be to parse the documentation files, but this is much harder than reflection.

You might as well want to ask Sun, why such interesting packages as com.sun.tools.javac are hidden from us...

How can I open the HTML files in an already running instance of Netscape?

You can configure this via the InfoViewer plugin. See the plugin options for InfoViewer and the InfoViewer documentation.

When I create an index, I get some "java.lang.VerifyError"s and "java.lang.NoClassDefFoundError"s in the Activity Log.

These errors occur occasionally, when the ZIP/JAR file, for which you wish to create an index, was created with a different JVM as jEdit runs currently under. For example, jEdit runs under JDK 1.2, and you want to create an index for jdk1.1.8/lib/classes.zip. Or vice versa (which doesn't really make any sense).

Try to run jEdit under the same JVM as the ZIP/JAR files were created for.

You can safely ignore these errors, since JIndex will leave out only the entries, which give errors, and create valid index entries for the rest.

What if I relocate one of the libraries or the documentation folder, after I created an index? Do I have to recreate the index?

No, you don't.
You can safely relocate both the libraries and the documentation folders. If you moved a documentation folder to another location, simply change the corresponding entry in the JIndex options.
 


All contents copyright (c) 2000 Dirk Möbius <dmoebius@gmx.net>