JIG Browser Documentation


Introduction

The JIG Browser can be used to manage JavaTM source code during the software development process. The JIG Browser provides a fine level of control and manipulation of Java source code elements and their relationships. Through the use of source code browsers providing different perspectives on the code, from the system, class and hierarchical level down to internal references and methods, the developer gains maximum access in complex problem domains.

The JIG Debugger implements a GUI interface over the jdb debugger provided in the Java JDK. The JIG Debugger is integrated with the JIG Browser. See the document, JIG Debugger for more information on Debugger operation.


Installation and Setup

Please review the README file for complete platform-specific installation and setup information.

The JIG Browser and Debugger assume the prior installation of the Java JDK. Especially before any compile, debug or run operations are attempted. JIG is delivered with JRE 1.1.6. Please read the JRE documentation (c:\JIG\Jre\1.1) for more information.

For best results, the source code provided in the Java JDK should be installed, and your work should be located in packages under the \jdkx.x.x\src directory, for example, c:\jdk1.1.6\src\Work. This will provide optimal source and hierarchical browsing from JIG.

The PATH environment variable should include any Java compilers that might be used in JIG. The PATH should also include the JDK bin directory to allow JIG to access the JDK javac, jdb, javadoc, appletViewer and java binary files.

For Windows users, once you have downloaded the Jig.zip archive, open the zip file and click on the "Install" button. This will run the Jig setup program, extract and load the files from the archive, and create a Start Programs folder for "S Cubed" containing JIG, JIG Documentation and this README.txt. Follow the instructions through the setup process.

Once you start the JIG program, look at the Help About dialog box. The various Java system properties are listed there along with JIG copyright, license and ordering information.

Development Environment Functional Description

The ability to browse objects requires navigation in many directions across class hierarchies, interfaces, method callers and called methods. In JIG, class files are broken into methods and class definitions, and each of these is displayed individually in the Browser text editor. The Browser has three selection list boxes and one text editing screen. The left list box displays the packages available for browsing, the middle list box displays the classes within the selected package and the right list box displays the methods within the selected class. With a class selected and no method selected, the class definition, without methods, is displayed in the Browser text editor. Once a method is selected, just the code for that method is displayed in the Browser text editor.

The source code editor contained in the Browser has full source code editing including cut, copy, paste and undo available from a popup menu on the right mouse button. Editing occurs at the level of granularity of the method or the class definition. Multiple Browsers viewing and manipulating the components of a single class are kept synchronized so every Browser is up to date as changes occur, specifically, saved source code from one Browser is updated in all Browsers for that class. Methods and class definitions are checked for matching curly braces before being saved. There is a menu View Match operation for the user to check matched braces and parentheses at various levels of nesting. The Edit Format operation will reformat the class definition or method in the Browser text editor according to the Format spacing parameter specified in the View Options window. Find and replace operations are also available. To aid in tracking down errors reported from the compiler or executing application there is a View Line Numbers selection that places the Browser editor in read-only mode so that a search for the offending line number can be made.

Compiling, running or debugging the application happens right in the Browser environment. Applications are run with a standard output and standard error log window. There is a GUI-based, full function symbolic debugger that is implemented on top of the JDK jdb debugger. The JIG Debugger displays current active local variables and breakpoints, the execution point in the source code, and all output from the debugger and running application. All of the functions of the jdb debugger are available in the JIG Debugger. The Browser File Evaluate operation offers the ability to perform quick evaluations of code fragments in a debugger environment. The user highlights a code fragment in the Browser editor or the Work Space, chooses the Evaluate operation and the code fragment is immediately wrapped in the "main" method of a special class file and compiled. If the compile succeeds, the Debugger is opened and the user can execute the fragment or step through it as necessary.

The user has a number of options available from the View Options window. The user can manage the compiler flags, debug flags, java interpreter flags, imports for use with the File Evaluation operation, an optional CLASSPATH, a compile destination directory, the HTML Browser to use, the path to the root packages directory and the code format spaces parameter for the number of spaces for each nesting level.

Ease of navigation across methods, classes and packages is JIG's best feature. The Browse operations have the ability to open new Browsers based on highlighted references in the Browser editor, Work Space or Transcript, callers of specified methods, called methods, class hierarchies, class interfaces, extenders of a class, implementors of an interface, single classes, complete package subsystems and stack traces. If your packages are organized in file system directories under the \jdk1.x\src directory, alongside the JDK provided source files, class hierarchy and interface Browsers will traverse all the packages under the "src" directory, including the Java source files to provide navigation up the entire hierarchy. For instance, if your class extends Frame, opening a hierarchy Browser on your class will include your class and the classes Frame, Window, Container and Component in the Browser selections.

In JIG, it is easy to create new classes and methods. When creating a new class, by entering the new class name in a dialog window and clicking OK, a class definition template with that name is generated, including a class constructor, in the Browser editor. The user can then modify the class definition and select File Save to have it and its constructor show up on the Browser list for class and method. Creating a method similarly generates a method template in the Browser editor, which, when modified and saved, appears in the method list for the class in which it was created. Selected methods and classes can also be removed or renamed.

Menu Selections

FILE

Save

The Save operation writes the contents of the Browser editor to the Java source file for the class being edited. An hourglass cursor is visible until the save operation is complete.

Save All

The Save All operation checks the editor of every Browser currently open. If a modification occurred in any Browser editor, that Browser saves its editor's contents to the Java source file for the class being edited. An hourglass cursor is visible until the save operation is complete. This operation is especially useful when a number of Browsers are open with changes occurring in many of them.

Save & Run

The Save & Run operation combines the frequently used Save and Run operations in a single step. The save occurs first writing the contents of the Browser editor to the Java source file for the class being edited. An hourglass cursor is visible until the save operation is complete. An implicit compile operation follows immediately because the source file is more recent than its resulting class file. The compile operation runs the Java compiler for the currently selected class. For more information on the Compile operation see Compile below. The class is then run using the specified Java interpreter. The class must have a main method for this operation to succeed. For more information on the Run operation see Run.

Save & Compile

The Save & Compile operation combines the frequently used Save and Compile operations in a single step. The save occurs first writing the contents of the Browser editor to the Java source file for the class being edited. An hourglass cursor is visible until the save operation is complete. The compile operation follows immediately. The compile operation runs the Java compiler for the currently selected class. For more information on the Compile operation see Compile below.

Compile

The compile operation runs the Java compiler for the currently selected class or for the specified Java files highlighted in the Browser editor, related Work Space or Transcript. The classpath is taken from the path of the Browser's currently selected package plus either the View Options Optional Classpath, if provided, or the Java System "java.class.path" property for the Browser. The "-d" directory for placement of compiled class files is taken from the destination directory parameter or the Browser's currently selected package. The compile flags are taken from View Options Compiler options. The compile flags are added to the command line just before the target file(s).

A compiler output window or Transcript is opened containing the compiler command and parameters. On subsequent lines any information, warnings or errors from the compile are shown. Finally, the number of warnings and errors, if any, are displayed with a "Compile complete" message.

If compiling specified Java files highlighted in the Browser editor or a related Work Space, the complete path, filename and ".java" extension specification of the files is required. More than one Java file can be compiled with the operation by using wildcards in the filename. A package should be selected in the Browser to provide the "-d" directory specification to the compile operation or the destination directory will be used. This capability provides an easy way to recompile many files at once using different compile flags, for instance, when recompiling for optimization.

Run

The Run operation runs the Java interpreter supplying the class of interest. The class of interest is determined, in order of priority, by: 1) the highlighted text in the Browser editor, 2) the highlighted text in the open Work Space associated with the Browser, 3) the highlighted text in the Transcript if used, or 4) the currently selected class in the Browser.

If the currently selected class in the Browser (number 4 above) is used an implicit compile operation follows immediately if the source file is more recent than its resulting class file. The compile operation runs the Java compiler for the currently selected class. For more information on the Compile operation see Compile .

A Java output window or Transcript is opened containing the Java command and parameters. Any standard output or standard error information from the process is displayed in the Java output window. When the process has completed the "Java complete" message appears in the output window or Transcript. The Java output window and Transcript are "read only," and do not accept standard input from the user. The class must have a main method for this operation to succeed.

Debug

The Debug operation runs the Debugger controlling a Java jdb debugger session, supplying the class of interest. The class must have a main method for this operation to succeed. The class of interest is determined, in order of priority, by: 1) the highlighted text in the Browser editor, 2) the highlighted text in the open Work Space associated with the Browser, 3) the highlighted text in the Transcript, or 4) the currently selected class in the Browser.

An interactive window is opened featuring a full function Debugger user interface. Standard output or standard error information from the process, informational or error messages from the Debugger, or response to user commands are displayed in the Debugger output window. Execution is ready to continue from the first executable line of the main method. The user can step through lines of source or continue until the next break point.

When the process has completed the Debugger does not exit, it must be explicitly terminated by the user with the "quit" button. See the document, Jig Debugger for more information on Debugger operation.

Evaluate

The Evaluate operation runs the Debugger controlling a Java jdb debugger session, supplying a generated class as a wrapper for a fragment of code that is taken, in order of priority, from: 1) the highlighted text in the Browser editor, or 2) the highlighted text in the open Work Space associated with the Browser. The code fragment will be placed inside of a "main" method, a "return" statement will terminate the main method and provide an automatic break point for running the class in the Debugger. The code fragment should not contain class or method definitions, or import statements. An interactive window is opened featuring a full function Debugger user interface. Any standard output or standard error information from the process, informational or error messages from the Debugger or response to user commands is displayed in the Debugger output window. See the document, Jig Debugger for more information on Debugger operation.

When the process has completed the Debugger does not exit, it must be explicitly terminated by the user with the "quit" button. Subsequent Evaluate operations from the same Browser for the same or a modified or different highlighted code fragment will generate a new class as a wrapper for the code fragment, compile it and automatically run it in the Debugger. The generated class creates a file in the current working directory. The class name has the format zDbgEval#, where # is a number. The Browser attempts to clean up preexisting files of this format found in the current working directory at the time the Evaluate operation is invoked.

The import statements included in the generated class are taken from the Browser View Options window, in the field "Imports." This list can be modified by the user in the Options window.

Here is an example of a code fragment suitable for running with the Evaluate operation,

// This code fragment will list all fonts selectable from the Java Toolkit
Toolkit tk = Toolkit.getDefaultToolkit();
String[] fonts = tk.getFontList();
for (int i=0;i<fonts.length;i++)
System.out.println ( fonts[i] );


Copy the code fragment into a Work Space. Choose Select All from the right mouse button of the popup menu in the Work Space. Choose Evaluate from the Browser File menu.

First a compile window or Transcript will appear to display any errors found in the compile. If there are no errors this compile window will automatically (the Transcript does not automatically close), the Debugger window will immediately open. The evaluation class is automatically loaded into the Debugger, breakpoints are set on the first line of the main method and on the final "return" statement of the main method. The Debugger is stopped at the first executable statement of your code fragment.

At this point you can step through the processing of the code fragment or use other Debugger functions. You can also click the "cont" button to continue processing, the code fragment will be processed, the Debugger will stop on the "return" statement, and you can review the results printed in the Debugger output screen.

Applet View

The Applet View operation invokes the appletViewer with a selected HTML file. Highlight the path and filename of the HTML file that invokes your Java applet and select File Applet View. The HTML filename can be highlighted in the Browser editor, the Work Space or the Transcript. If a name is not highlighted when selecting Applet View, then a file dialog will open. Choose an HTML file from the file list and click Open. The appletViewer will be started displaying any errors or output in the Transcript.

Applet View & Debug

The Applet View & Debug operation invokes the appletViewer and Debugger with a selected HTML file and applet class. Select the applet class to debug in the class list then highlight the path and filename of the HTML file that invokes your Java applet and select File Applet View. The HTML filename can be highlighted in the Browser editor, the Work Space or the Transcript. If a name is not highlighted when selecting Applet View, then a file dialog will open. Choose an HTML file from the file list and click Open. The Debugger and appletViewer will be started, the Debugger will be initialized to the init() method of the applet. See the Debugger documentation for further information.

HTML Browser

The HTML Browser operation invokes the specified HTML Browser with a selected HTML file. Highlight the path and filename of the HTML file that invokes your Java applet and select File HTML Browser. The HTML filename can be highlighted in the Browser editor, the Work Space or the Transcript. If a name is not highlighted when selecting HTML Browser, then a file dialog will open. Choose an HTML file from the file list and click Open, the HTML Browser will be started.

Document

The Document option invokes the java documentation utility, javadoc, on the selected package or class. Informational messages and errors from the Document operation are displayed in the Transcript.

Work Space

The Work Space provides a very simple window for temporary storage of text. The Work Space has a right mouse button popup menu with editing functions. The selected text in a Work Space can be used in the Compile, Run, Debug, Browse Class or Interface, Browse Extenders, Browse References, Browse Callers, and Browse Methods operations. The Work Space window is closed when the user clicks the close button. All text in the Work Space is lost upon closing. The Work Space is related to the Browser from which the Work Space was created and behaves like a modal window with respect to that Browser. The Work Space title contains a reference to the related Browser's title.

Exit

The user can exit the Jig development environment or an individual Browser that is not the initial system Browser by selecting Exit. The initial system Browser with the title "JIG Browser" is the first window to appear when JIG is started. By exiting the JIG Browser the Jig development environment is exited. If any other Browser windows or related windows are open they are closed before exiting. If modification to text in any Browser has occurred and not yet been saved, the user is prompted to discard the changes in that Browser. If the user chooses not to discard the changes the exit operation is not completed. If the user chooses to discard changes to text in that Browser, the Browser window is closed. If the user selects Exit for a Browser that is not the "JIG Browser," if there are no unsaved changes to that Browser's text, the Browser window is closed. If there are unsaved changes to text, the user is prompted to discard changes. If the user chooses to discard changes the Browser window is closed, if the user chooses not to discard changes, the window is not closed.



EDIT

Find Next

This operation will find within the current Browser editor the next occurrence of the highlighted text appearing in the Browser editor, in the Work Space or the as third or more words of the title of the References, Methods, Callers, Hierarchy, Interfaces, Extenders or Implementors Browser.

In the case of Browse References for a specific text string, say "int count," the title of the Browse References window would read "References to int count." The user selects the package, the class and method of interest. The user then selects Edit Find Next and the string "int count" is located within the Browser text and highlighted. If there are more instances of this string in the Browser text, by selecting Edit Find Next the Browser locates the next instance of the string and highlights it.

Find

Selecting the Find function opens a window into which the user types the exact string to be searched for in the current Browser editor text. If found, the string is highlighted. The user may then select Edit Find Next to search for the next occurrence of the string in the Browser editor text.

Replace

Once a string in a Browser editor has been highlighted either directly by the user or through a find function, or if no text is highlighted, given the title (third or more words) of the References, Methods, Callers, Hierarchy, Interfaces, Extenders or Implementors Browser, the user selects Replace. A window is opened for the user to type a replacement string for the Browser editor. After typing the replacement string the user hits the Enter key or clicks the Accept button to accept the string or clicks Cancel to stop the replacement operation. The string to be replaced in the Browser editor and all instances of this string occurring after the highlighted or first occurrence of the string are replaced with the replacement string.

Format

The user selects Format when the source code appearing in the Browser editor is not indented in a consistent way. The Browser reformats the source inserting incremental indentations related to the number of open and close curly braces found in the source. The number of spaces to be indented or the use of tabs for indentation instead of spaces can be controlled through the Browser Options window accessed from the View Options selection of the Browser.

Discard Edits

The Discard Edits operation will check if changes have been made in the Browser editor. If so, the user is prompted to make sure they want to discard any changes they have made in the editor. If they click Yes to discard, the contents of the Browser editor are returned to the previously saved state.

This operation is especially useful with the View Options Auto save feature enabled. When changes to the Browser editor are saved simply by selecting another package, class or method, it is convenient to have a means to get rid of unwanted changes.

VIEW

Match

The user highlights an open curly brace and then selects Match. The Browser will then highlight all of the text between the initially highlighted open curly brace and its respective close curly brace, including any nested code having curly braces. Highlighting an open parenthesis character will similarly find matching parentheses.

Line Numbers

The source code can be displayed with line numbers in a read-only mode by selecting Line Numbers. The Line Numbers selection remains checked while the read-only, line number display mode is active. Select Line Numbers, when checked, to display source code in read-write editing mode, the Line Numbers selection will become unchecked. While in Line Numbers mode, the method list is sorted in order of line numbers.

Options

Select Options to display the interactive JIG Browser Options window. Options are loaded from "jig.properties" upon JIG startup. They are stored in JIG and saved to jig.properties each time the View Options OK button is clicked. Click Cancel to leave the Options dialog without saving options. Click Help to view this "Options" information.

The values of these options should be modified following the recommendations for each option as specified here. When option modification is complete, click the "OK" button to save the new options to the "jig.properties" file and enable the new options for the current session.

HTML Browser

The absolute path and name of the HTML Browser to use with JIG. The default value for Windows 9x and NT systems is:

C:\Program Files\Plus!\Microsoft Internet\Iexplore.exe

When you click OK on JIG Browser Options, JIG will attempt to locate the HTML Browser and, if found, enable HTML Browser menu choices (selections: File HTML Browser and Help Documentation). Each time JIG is loaded it will attempt to locate the HTML Browser and, if found, enable the related HTML Browser menu options.

Imports

The Java import statements used during class generation with the File Evaluation operation. For example, if you are using the java.util.StringTokenizer class in your Evaluation code fragment, you must include "java.util.*" in order for the code to compile successfully. Add the package.* name without quotes to the "Imports:" field, leaving spaces between package references.

Optional CLASSPATH

Provide a specific CLASSPATH to be used during runs, debugs, documents and compiles. Environment variables cannot be used, all references must be explicit.

If no Optional CLASSPATH is specified, all runs, debugs, documents and compiles will use the current Java System value for classpath (Java.classpath) for the current JIG Browser session. This value can be viewed in the Help About System Properties window.

To set the JIG Browser session classpath, include the CLASSPATH environment variable on the JIG startup command line, e.g. (in Windows),

C:\JIG\Jre\1.1\bin\jrew.exe -cp .;lib\jig.jar;%CLASSPATH% BrowserView

Destination directory

This is the location for the compiler to place compiled ".class" files. The contents of this field are passed with a "-d" option to the compiler. If this field is blank, the destination defaults to the current package directory.

Applet Viewer options

These are the options supplied to the applet viewer program when it is invoked with the File Applet Viewer operation. See the Tool documentation for the applet viewer version you are using for specific options. (See also, "Other options," appletViewer, below.)

Compile options

These are the options supplied to the compiler program when it is invoked with the File Compile operation. See the Tool documentation for the compiler version you are using for specific options. (See also, "Other options," compiler, below.)

Debug options

These are the options supplied to the debugger program when it is invoked with the File Debug operation. See the Tool documentation for the debugger version you are using for specific options. (See also, "Other options," debugger, below.)

Java options

These are the options supplied to the Java interpreter program when it is invoked with the File Run operation. See the Tool documentation for the Java interpreter version you are using for specific options. (See also, "Other options," Java interpreter, below.)

Document options

These are the options supplied to the documentation utility program when it is invoked with the File Document operation. See the Tool documentation for the Java documentation utility version you are using for specific options. (See also, "Other options," documenter, below.)

Transcript

This checkbox selects whether a single Transcript or individual process windows will be used for each run, compile and document operation. If checked, the Transcript is used.

Auto Save

This checkbox selects whether the JIG Browser will automatically save the contents of the Browser editor whenever another package, class or method is selected. Auto Save does not work when the user selects menu options that might change the Browser editor contents, for example, Source New Method. If checked, Auto Save is used.

Suggest Updates

This checkbox turns on reference browser update suggestions. A reference browser is one of the Callers, Methods, References or Stack Trace Browsers. A reference browser is created as a snapshot of information existing at a point in time. This information is static but the contents of your source files change as you continue development. The reference browser can detect certain kinds of changes occurring in other Browsers and can suggest on the title bar of the browser that you perform an update on the Browser. An example of the suggestion looks like this, "References to Integer, … update?". To update the Browser, in the Browser menu select, again, the type of Browser this is, no highlighting of text is necessary. In the example, you would select Browse References without any highlighted text.

Format spacing

The number of spaces or tab to use in an indentation by the Edit Format operation.

Other options

Select the option you want to modify in the choice box then click "Modify." If you want to review the option value only or have made a change to the option value that you want to discard click "Cancel." To save the new option value click "OK." Option values do not take effect until the JIG Browser Options "OK" button is clicked. "Other options" include:

appletViewer, the applet viewer to run with the File Applet Viewer command ("appletViewer" by default). This option is useful if you work in different versions of Java, supply the absolute path and filename for the version of the binary to run.

compiler, the compiler to run with the File Compile command ("javac" by default). This option is useful if you work in different versions of Java, supply the absolute path and filename for the version of the binary to run.

countryCode, "US" by default. Given that a locale file exists for the country code value, supply the country code, click "OK" to write the jig.properties file then exit JIG and restart JIG for the new locale file to take effect.

debugger, the debugger to run with the File Debugger command ("jdb" by default). This option is useful if you work in different versions of Java, supply the absolute path and filename for the version of the binary to run.

documenter, the documentation utility to run with the File Document command ("javadoc" by default). This option is useful if you work in different versions of Java, supply the absolute path and filename for the version of the binary to run.

grep, the name of the grep program to use for the Browser matching operations, i.e., References, Callers, Methods, etc. This can be just the grep program name as in "grep32" if the program is on the users execution path, or an absolute path and filename.

interpreter, the Java interpreter to run with the File Run command ("java" by default). This option is useful if you work in different versions of Java, supply the absolute path and filename for the version of the binary to run.

languageCode, "en" by default. Given that a locale file exists for the language code value, supply the language code, click "OK" to write the jig.properties file then exit JIG and restart JIG for the new locale file to take effect.

system[0 - 9], these are special options that change the behavior of JIG to offset problems encountered on specific platforms. Do not set these options unless instructed to do so in the JIG README file or Release Notes for your platform.

Package Root Directory

This is the root directory of the Java packages for Browser navigation. The user chooses an alternate root directory path by selecting the alternate directory in the choice box. When in a system browser, if you change the View Options User Directory to a different package root directory, then click OK on the View Options Dialog, that system browser will be updated with the packages from that new root directory. The new User Directory will be saved to the jig.properties file and any future system Browsers will use that new root location. If in any other kind of browser (References, Class, Hierarchy, etc.) when changing the View Options User Directory, and clicking OK, no update on the current browser is performed, but the new User Directory will be saved to the jig.properties file and any future system Browsers will use that new root location.

Alternate root directory paths can be provided by clicking the "Add" button, entering the new root path in the field provided, then clicking "OK." If the path is not valid the new root path will not be added to the list. The current JIG System Browser will be updated to use the new root directory when you click "OK" on the JIG Browser Options window.

Alternate root directory paths that are no longer needed can be deleted by selecting the root directory in the choice box and clicking "Delete."

Transcript

The Transcript can be opened by selecting this option. The Transcript can be closed without losing any of its contents by clicking the Close & Preserve button on the Transcript. If the Transcript is closed with the close button all Transcript contents are lost.

BROWSE

Many of the Browse operations make use of the operating system "grep" command to perform regular expression matching on Java source files. Make sure you have a grep utility available before attempting to use any of the specialized Browsers. If your grep utility is named something other than "grep," you can change the name of the grep command in the View Options window, "grep" selection.

System

A new System Browser is opened. In a system where Java source directories are not all located under one root, the user can change the "Package Root Directory" field in View Options to point to a different set of Java packages, click the OK button to save the changes, the System Browser will immediately make use of the new Package Root Directory to access the new root directory and packages.

References

The user begins by highlighting some text within the Browser editor or a related Work Space. Browse References opens a new Browser containing the class and method selections within the currently selected package that make reference to the text highlighted in the current Browser editor, Work Space or Transcript.

Once the Browse References window is open, a convenient way to further search for the reference text within a method or class definition is to use the Edit Find Next operation. If no text is highlighted in the References Browser, Find Next will use the reference text from the title of the References Browser window.

If within a References Browser and if there is no text selected in this Browser, by again selecting Browse References, this Browser will be updated. This provides a convenient means of updating the Browser when the "snapshot" information contained in the Browser becomes out of date.

Callers

The user begins by highlighting a method name, not including parentheses or method arguments, within the Browser editor or a related Work Space. Browse Callers opens a new Browser containing the class and method selections within the currently selected package that include callers of the method name highlighted in the current Browser editor, Work Space or Transcript.

Once the Browse Callers window is open, a convenient way to further search for the caller reference within a method definition is to use the Edit Find Next operation. If no text is highlighted in the Callers Browser, Find Next will use the caller reference from the title of the Callers Browser window.

If within a Callers Browser and if there is no text selected in this Browser, by again selecting Browse Callers, this Browser will be updated. This provides a convenient means of updating the Browser when the "snapshot" information contained in the Browser becomes out of date.

Methods

The user begins by highlighting a method name, not including parentheses or method arguments, within the Browser editor or a related Work Space. Browse Methods opens a new Browser containing the class and method selections within the currently selected package that include method definitions for the name highlighted in the current Browser editor, Work Space or Transcript.

Once the Browse Receivers window is open, a convenient way to further search for the called method reference within a method definition is to use the Edit Find Next operation. If no text is highlighted in the Methods Browser, Find Next will use the method reference from the title of the Methods Browser window.

If within a Methods Browser and if there is no text selected in this Browser, by again selecting Browse Methods, this Browser will be updated. This provides a convenient means of updating the Browser when the "snapshot" information contained in the Browser becomes out of date.

Hierarchy

The user begins by selecting a class within the Browser. Browse Hierarchy opens a new Browser containing the class and its methods. The parent classes of the selected class, not including Object, and the parents' methods are also included in the Browser.

The Browse Hierarchy operation depends on a package-directory configuration that places all packages, and their classes, containing parent classes of interest for navigation through the Hierarchy Browser under the same Package Root Directory as specified in the View Options "Package Root Directory" field. For instance, a configuration like the following,

c:\jdk1.1.6 contains subdirectories:
src
java
sun
sunw
Work

where the "Package Root Directory" is set to "c:\jdk1.1.6" would allow a user developing in the directory called Work, a class called "FileViewer" that extends Frame, to obtain a Hierarchy Browser with only the classes FileViewer, Frame, Window, Container and Component accessible from the Hierarchy Browser.

Interfaces

The user begins by selecting a class within the Browser. Browse Interfaces opens a new Browser containing the class and its methods. If the class implements an interface, that interface is also included in the Browser.

The Browse Interfaces operation depends on a package-directory configuration that places all packages containing interfaces of interest for navigation through the Hierarchy Browser under the same Package Root Directory as specified in the View Options "Package Root Directory" field. For instance, a configuration like the following,

c:\jdk1.1.6 contains subdirectories:
src
java
sun
sunw
Work

where the "Package Root Directory" is set to "c:\jdk1.1.6," would allow a user developing in the directory called Work, a class called "EndsWithFilter" that implements FileNameFilter, to obtain an Interfaces Browser with only the class EndsWithFilter and the FilenameFilter interface accessible from the Interfaces Browser.


Class or Interface

The user begins by selecting a class within the Browser. Browse Class opens a new Browser containing only the selected class or interface and its methods.


Extenders

The user begins by selecting a class within the Browser. Browse Extenders opens a new Browser containing the class and its methods. The extenders of the selected class (classes subclassed from the selected class) and the extenders' methods are also included in the Browser.

The Browse Extenders operation searches only within the currently selected package for extenders of the selected class.

Implementors

The user begins by selecting an interface within the Browser. Browse Implementors opens a new Browser containing the interface. The implementors of the selected interface and the implementors' methods are also included in the Browser.

The Browse Implementors operation searches only within the currently selected package for implementors of the selected class.

Stack Trace

The user begins by selecting a stack trace usually from the Transcript (but a trace pasted into the Browser editor or Work Space will work just as well). The stack trace must contain line number information. Here is a sample of a stack trace:

java.lang.ArithmeticException: / by zero
at BuildAccessorWindow.buildSetter(BuildAccessorWindow.java:86)
at BuildAccessorWindow.action(BuildAccessorWindow.java:126)
at java.awt.Component.handleEvent(Component.java:2490)
at BuildAccessorWindow.handleEvent(BuildAccessorWindow.java:30)
at java.awt.Window.postEvent(Window.java:500)
at java.awt.Component.postEvent(Component.java:1996)
at java.awt.Component.postEvent(Component.java:1996)
at java.awt.Component.dispatchEventImpl(Component.java:1793)
at java.awt.Component.dispatchEvent(Component.java:1708)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:81)

The Browser parses the stack trace information looking for the leading word "at," the package, class and line number information. Browse Stack Trace opens a new Browser containing all of the classes and methods identified in the stack trace.

The Browse Stack Trace operation depends on a package-directory configuration that places all packages, and their classes, containing classes of interest for navigation through the Hierarchy Browser under the same Package Root Directory as specified in the View Options "Package Root Directory" field. For instance, a configuration like the following,

c:\jdk1.1.6 contains subdirectories:
src
java
sun
sunw
Work

where the "Package Root Directory" is set to "c:\jdk1.1.6," would allow a user developing in the directory called Work, to examine the classes of a stack trace across all packages under c:\jdk1.1.6.



SOURCE

New Method

Select New Method to create a new method within the currently selected class. The user is prompted for the name of the method to create. After clicking the OK button, a method template with the user-supplied name is displayed in the Browser editor. The user can enter method return type information with the method name. If no type information is entered the method defaults to 'void.'

New Class

Select New Class to create a new class within the currently selected package. The user is prompted for the name of the class to create. After clicking the OK button, a class template with the user-supplied name is displayed in the Browser editor.

New Interface

Select New Interface to create a new interface within the currently selected package. The user is prompted for the name of the interface to create. After clicking the OK button, an interface template with the user-supplied name is displayed in the Browser editor.

Rename Method

Select Rename Method to change the name of the currently selected method. The user is prompted for the new name of the method. After clicking the OK button, the method name is changed in the editor, the new method is written to the class file and the method name in the method list is changed.

Rename Class or Interface

Select Rename Class or Interface to change the name of the currently selected class or interface. The user is prompted for the new name of the class or interface. After clicking the OK button, the class or interface name is changed in the editor, the new class or interface definition is written to the class or interface file, the filename may be changed to reflect the new name and the class or interface name in the class list is changed.

Delete Method

The user is prompted if they are sure they want to delete the currently selected method. If OK is clicked the method is removed from the current class.

Delete Class or Interface

The user is prompted if they are sure they want to delete the currently selected class or interface. If OK is clicked the class or interface file is deleted or the class (if an inner class) is removed from the current class file.


HELP

Documentation

Select Documentation to launch your HTML browser with a local copy of your JIG Documentation. Along with information about using JIG you will find links to web sites of interest including the S Cubed website for finding out the latest JIG-related information and ordering JIG.

About

Select About to view the About box for JIG. The About box contains JIG program version, registration and system information, as well as, license, copyright and ordering information. The current Java system memory is displayed under System properties. Clicking the "Close" button runs the Java garbage collector and closes the About window.



EDITOR POPUP MENU

Clicking the right mouse button while the cursor is over the Browser editor or another text display, such as the Work Space, opens the editor popup menu. The following functions are available from the popup menu.

Undo

The previous editing operation, if any, in that text display is reversed.

Cut

The highlighted text is removed from the text display to the clipboard for pasting elsewhere.

Copy

The highlighted text is copied from the text display to the clipboard for pasting elsewhere.

Paste

The textual content of the clipboard is inserted into the text display at the current cursor position.

Delete

The highlighted text is removed from the text display.


Select All

All of the text within the text display is highlighted.


Other Information References

Environment Variable CLASSPATH

The Java Language Compiler javac

The Java Interpreter java

The Tools Reference page

Refer to the Java documentation for jdb - The Java Debugger.

Visit the S Cubed website.

Note: Before you use JIG, please read the Copyright and License Information.


JIG is a product of S Cubed.

The JDK is a product of Sun Microsystems, Inc. JavaSoft is the operating company of Sun that develops the JDK.

Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
Visual J++ is a product of Microsoft, Inc.

Copyright © 1998 S Cubed