                    JindentAddin for JBuilder Foundation
                   by David P. White (dpwhite@halcyon.com)
                            version 0.76 2/4/2000

Introduction
------------
This software in provided as is and carries no warrantee of any kind. Should
you encounter problems please feel free to let me know. Thanks.

This .jar file contains source and executable java code supporting the
integration of Jindent into the JBuilder Foundation IDE environment. This is
performed using the Opentools API published with the initial release of JBF.
Should that API change in future releases, this code may not continue to work
as expected. However, because it only makes use of a small portion of the
Opentools API I would guess that it will remain usable for some time.

After setup and installation, you need to restart JBF. When you do, you should
now see the addin's banner displayed on the console. Once JBF has completed
loading, you will notice a new menu item on the standard tools menu. Unless a
file is currently active (displayed in an editor window) and that file is NOT
read-only, this Jindent menu item will be disabled. If you select a single
file in the JBF project view window and right-click, you will see the same
Jindent menu item on the popup context menu. If the selected file is
read-only, the menu item will be disabled.

Installation
------------
(1)  Place the .jar file into an acceptable location. I personally create an
extensions sub-directory under the Jbuilder root dir and I place the
.jar file there. JBF supports a directory called lib/ext into which you should
be able to simply place a .jar file which JBF will automatically load but this
is broken under Windows for some reason and only the first .jar file actually
gets loaded.

(2)  Get the Jindent distribution at http://www.c-lab.de/~jindent and
install it. Read the documentation on how to create your own style, if
desired.

(3)  You need to update the classpath used by JBuilder Foundation to point to
both the addin's .jar file and the Jindent.jar file. I recommend doing this by
updating the JBF startup script (which on my NT box is in the JBuilder\bin
directory). Near the end of this script, is a place to set an environment
variable called tempcp. I place my addin (and supporting) classpath stuff
here. So on my system the line is:

set tempcp=%JBUILDER_HOME%\extensions\JindentAddin.jar;E:\java\jindent\Jindent.jar

Of course, you can just add the two .jar files to your normal classpath
variable as well.

(4)  If you decide not to use Jindent's default style, you need to
create and place a file similar to the attached JindentAddin.properties
file. This file contains a single line which, if provided, must be the
qualified path to a conforming Jindent style properties file. See the
Jindent docs for details on the format of the style properties. The
addin will look for it's properties file in the location where JBF
stores it's properties files. On my system, this is:

C:\WINNT\Profiles\davidw\.jbuilder\JindentAddin.properties

On my system, the single line in the Jindent.properties file is:

FormatStyle=C:\\java\\jindent\\BaseCStyle.jin

(5)  Now you should start/re-start JBF. You should see a new menu item
under the tools menu if a source file is active. You should also see the
menu item on the project pane's context menu if a single source file is
selected.

Improvements in version 0.76
----------------------------
(1) Resolved a bug, reported by Jan Agermose <post@agermose.dk>, whereby
repeatedly invoking the Jindent addin would cause unexpected and repeated
indentation. Thanks to David MacMahon <davidm@smartsc.com>, the problem was
isolated as a bug in Jindent itself. David suggested a work-around which did
the trick and now all is well. The issue has been reported to the Jindent
team.

(2) Upon the suggestion of Raffael Heinzer <rheinzer@inprise.com>, I have
changed the addin so that it no longer operates on the disk file but, instead,
operates directly on the JBF editor's buffers. This results primarily in the
ability to undo the Jindent operation and it may offer slightly better
performance as files are no longer saved, processed, and re-loaded from disk.

(3) I have added this file and virtually all of the files needed to
build/deploy the addin to the .jar file. This should save multiple emails for
source and installation instructions.

Improvements in version 0.75
----------------------------
(1)  The addin's menu item now is placed on the standard JBF Tools Menu
rather than on it's own menu bar item. This save space on the menu bar
and deals with the old menu bar item showing up in different places on
the menu bar depending upon where the addin's classes were found on the
classpath.

(2)  You can now access the addin via the project pane's context menu.
If you right click on a single file in the project pane, you will see
the menu item.

(3)  Added menu item icons.

(4)  The Jindent style which will be used is displayed in the status bar
when the addin's menu item is being pointed at with the mouse.

(5)  Minor bug fixes.

(6)  Renamed the properties file to JindentAddin.properties to make it
more explicit.

(7)  Distribution is now in the form of a .jar file. This makes
installation easier and removes the need for the .opentools file.
