Project Notes


Project:SWL Brace Highlighting
Version:0.4
Author:Gillmer J. Derge, <me@gillmerderge.com>

Description

Whenever the carat is immediately preceded by a parenthesis (or brace or bracket), this tool places a highlight on the matching element. The highlighting can be controlled separately for each type of brace via the Editor properties tab under Editor Options....

The "Highlight text enclosed by ..." properties enable highlighting of the text that occurs between the elements.

"Expire highlights" automatically removes the highlights after a fixed delay period (currently 800ms). This makes the tool function more similarly to emacs.

The color of the highlight can be configured in the Color properties tab by changing the background color of the "Brace highlight" style. Note that only the background color setting of that style is actually used.

"'Fix' brace matching actions" alters the built-in JBuilder actions that move to the brace matching the one to the right of the caret. If the fix is enabled, which is the default, then the actions are modified to use the brace to the left of the caret.

The name of the tool refers to the Scheme Widget Library (SWL), a part of Chez Scheme. Although I'm sure SWL did not "invent" the concept of highlighting matching parentheses, that is where I first encountered and fell in love with this particular visual style of displaying the matches.

Copyright © 2000, Gillmer J. Derge. All rights reserved.

Installation

Installation is quite simple. Put the Jar file, SwlBrace.jar, into the lib/ext subdirectory of your JBuilder installation. On Windows, this will typically be C:\JBuilder4\lib\ext. JBuilder will need to be restarted before SWL Brace begins working.

Troubleshooting

If SWL Brace does not appear to be working, there are a few things you can check.

First, make sure it truly isn't working. Maybe you just have the Editor Options... set to values that turn off the highlighting. The easiest way to check this is to open the Editor Options... dialog either from the Tools menu or by right-clicking in a Java source code pane. On the Editor tab of that dialog, "SWL brace options" should be listed on the tree of Editor options. If it is listed, then it has installed properly. Make sure the settings show the values you want.

If it is not listed, then the initialization procedure did not work correctly. Run JBuilder with the -verbose command line argument. This will produce a large amount of output, so you may wish to redirect it to a file. The output should include something about initializing com.gillmerderge.jbuilder.ide.SwlBraceCaretListener and com.gillmerderge.jbuilder.ide.SwlBraceMatchAction. If it doesn't, then you need to return to the section on installation and try again: SWL Brace is not installed properly. On the other hand, if there is an error or exception listed, please let me know: you have discovered a bug.


Changes since Version 0.3...


Changes since Version 0.2...


Changes since Version 0.1...


Known bugs...


Things to do...

These items are not necessarily in any order. Do not assume that the first items are higher priority.