Source View

The source view is the most sophisticated part of JSwat. It uses a Java language parser to colorize the lexical elements of the file, identify the locations and names of the defined classes, and determine the locations of all of the methods. It uses a popup menu to manage breakpoints and scroll to method definitions.

The Gutter

The gutter is the place where the line numbers are shown, on the left side of the source view. The background color is used to indicate the location of breakpoints. The default light gray indicates that line does not have a breakpoint. The other colors are defined as follows:

Red
Expired; hit count reached 'expire count'.
Gray
Disabled by user.
Blue
Unresolved; waiting for class to load.
Yellow
Skipping hits until 'skip count' is reached.
Green
Ready to be hit.

Current Location

The current location is like the current thread (see Threads, Call Stack). It is set whenever a breakpoint is hit and indicates the line about to be executed in the debuggee. The line is indicated in the source view using a blue highlight across that line. Changing the current thread or stack frame will move the highlight to the corresponding line of the appropriate source view.

Searching

You can search for words and phrases in the source view by using the "Search Source" menu item in the "View" menu (or the toolbar button with the binoculars). In the Find dialog, simply enter the word or phrase you are looking for, then click Ok. To ignore letter casing, select the checkbox provided.

Options

There are a number of options affecting the view, which include the following. They are specified in the "View" category of the user preferences dialog.

Colorize
This enables or disables the use of a Java lexical analyzer to determine the locations of all of the tokens in the source file. This information, when enabled, is used to colorize the source code. You may want to disable this if you usually view files that are not Java source code.
Parse as Java
This enables or disables the use of a Java language parser to determine the locations of all of the classes and methods in the source file. This information, when enabled, is used to set breakpoints and scroll to method definitions. You may want to disable this if you usually view files that are not Java source code.
Maximize
When enabled, the source view windows will be maximized when they are first opened.