Control Panel

This is the top-level window that contains top-level menus, the message window, and if the virtual desktop is on, the browse/debug/find/workbench window and the virtual desktop. The empty space on the right of the menu bar and the desktop support file dropping (drag and drop).


 
 

File Menu

New File - opens an empty CSD window for the selected language. Recently opened and currently open file types will appear under the main menu; other file types will be under the "Other" submenu.

Open File - brings up an open file dialog.

Recent Files - allows recently closed files to be re-opened.

Search Multiple Files - brings up the multi-file search dialog.

Save All Files - saves files in all CSD windows.

Close All Files - closes all CSD Windows. The user will be warned and given a chance to cancel if modified files exist.

Sync Files - checks file modification times for all files in jGRASP with those on disk. For each file that has been modified outside of jGRASP, the user is given the option of reloading the file from disk. If the user chooses not to reload, the next check will report a modified file only if there is an additional modification. A save operation, however, will give an external modification warning even if there is not an additional modification, when the file has been modified outside of jGRASP.

Workspaces - allows switching the workspace and editing workspaces. A workspace includes the currently open projects and windows, as well as workspace-level settings. Workspaces in jGRASP are named rather than being stored in a user-specified file (as is done on other common IDEs).

New Workspace - brings up a new workspace dialog.

Edit Workspaces - brings up a workspaces dialog.

Save Current Workspace - saves all the current workspace settings: the desktop, projects, and workspace settings. This happens at exit or when changing workspaces anyway, so this is provided only for protection against a crash.

Exit jGRASP - quits the application. If a compile process is active and there are modified files, this will not be allowed, since the old files are backed up before compiling, and restored afterward - this is not a concern if the "Auto Save" setting is checked (this is the default), in which case all files are saved before compiling.


 
 

Project Menu

Note that any operation that closes a project will save it first. It is not possible to discard changes to a project (unless jGRASP crashes or is killed).

New Project - allows the user to create a new empty project.

Open Project - allows a saved project to be opened.

Recent Projects - allows the user to open recently closed projects.

Close All User Projects - closes all open projects except the default project.

Remove Selected Files From Project - remove any files selected in the project window. Also removes any project documentation corresponding to Java source files that are removed.

Jar/Zip Extractor - brings up a jar/zip extractor dialog.

Set Active Project - allows the active project to be changed to any open project.

Active Project - actions on the active project. These same actions can be performed on an arbitrary project by using the project context menu in the project window.

Close - closes the active project. The default project will then become active.

Save - save modifications to the active project immediately. This is never necessary, except to be safe against a crash.

Save As - allows the user to save the active project under a new name.

Add Files - opens a dialog that allows the user to add files to the active project. This dialog allows files to be added with absolute paths or paths relative to the project file location (if the project is named and the file(s) are on the same file system (drive) as the project file). The relative paths are also platform independent. Using relative paths allows you to move your project to another location or system.

Generate/Update UML Class Diagram - Brings up a UML window for the project and updates the UML diagram.

Generate Documentation - brings up a dialog that allows the user to generate project documentation for Java.

Show Documentation - displays the documentation for the active project, if any. Currently, only Java documentation is supported.

Create Jar File for Project - brings up a jar creation dialog for the active project.

Jar/Zip Extractor - brings up a jar/zip extractor dialog.

PATH / CLASSPATH - brings up a csd window settings dialog for the active project and selects the "PATH" tab, which allows changing the PATH and CLASSPATH when compiling and running.

CSD Window Settings - brings up a csd window settings dialog for the active project and selects the "CSD" tab, which has settings that change CSD generation and editing properties.

Compiler Settings - brings up a csd window settings dialog for the active project, and selects the "Compiler" tab, which allows changing and editing compiler environments.

Print Settings - brings up a print settings dialog for the active project.


 
 

Messages Menu

Messages menu commands apply to the currently selected message window (Compile Messages, jGRASP Messages, or Run I/O).

Save As Text File - allows the user to save the contents of the current message window as a text file, with a choice of line terminators (binary, DOS format, Mac. format).

Select All And Copy - selects and copies the entire contents of the current message window to the clipboard.

Clear - clears the current message window.

Print Contents

Native Print - allows the user to print current message window contents using the native system. This is typically much faster than JVM printing. For UNIX/Linux, the native print is just a PostScript print using the command set in the workspace print settings. The font setting is ignored in this case, and Courier font is used.

Print to File (PostScript) - prints current message window contents to a PostScript file. The font setting is ignored and a Courier font is used.

Print to File (RTF) - prints current message window contents to a Rich Text file. For now, no formatting is done. The only print settings that are used are font, font size, and color.

JVM Print - prints message window contents using Java. This tends to be very slow, and produces very large print files.

Print Settings for Messages - opens a print settings dialog for message window, or workspace or project level print settings, and selects the "Messages" tab.


 
 

Settings Menu

Desktop - settings that deal with the appearance and functionality of the desktop.

Virtual Desktop - turns the virtual desktop on and off. If it is off, all CSD windows, the UML window, and all CPG windows will be top-level windows. If it is on, these windows can be moved in and out of the virtual desktop individually ("Escape Desktop" or "Enter Desktop" is under the "File" menu on each of these windows). When the desktop is turned on, all CSD windows are moved onto the desktop, regardless of their states at the time it was turned off.

Full-Height Tab Pane - if checked, the tab pane on the left side of the Control Panel will extend to the bottom of the Control Panel when the virtual desktop is on. This gives more height to the debug window, etc, and less width to the messages. You can also use the leftmost icon on the control panel message bar to switch between these modes.

Show Message Bar - if unchecked, the message bar at the bottom of the control panel, which displays the current "run" or "compile" state, will be hidden.

Open Desktop Windows Maximized - if on, any window opened in the virtual desktop will be initially maximized. You can also use the rightmost icon on the control panel message bar to switch between toggle this feature.

Focus Follows Mouse - when on, you can set keyboard focus to CSD windows and most other text-entry windows in the virtual desktop by moving the mouse over them. Unfortunately, using the mouse in a CSD window on the virtual desktop will still raise it to the top, but you can type and use keyboard accelerators in a non-top-level window.

Auto Save - if on, modified files are saved before a compile operation. Otherwise, modified files are temporarily saved before a compile operation, while the on-disk versions are backed up before, and restored after, the operation.

Auto Sync - if on, check file modification times every time the control panel is activated. You would almost certainly not want this on if you are in a focus-follows-mouse environment (if you are using Windows, you are not in a focus-follows-mouse environment). See Sync Files.

Verbose Messages - if on, compile, run, and CSD generation functions will give detailed messages about their operation. You can also use the middle icon on the control panel message bar to switch between verbose and short message modes.

Colors - opens a CSD settings dialog for the workspace or project settings, and selects the "Colors" tab, which allows changing colors for each token type in the CSD and message windows, as well as the CSD window background color and CSD color.

Font - opens a CSD settings dialog for the workspace or project settings, and selects the "Font" tab, which allows changing the bold and italic state of the font for each token type in the CSD and message windows, as well the font, font encoding, CSD and message window font sizes, and global font scale.

CSD Window Settings

Workspace - opens a CSD settings dialog for the workspace settings, and selects the "CSD" tab, which has settings that change CSD generation and editing properties.

Project - opens a CSD settings dialog for the project settings, and selects the "CSD" tab, which has settings that change CSD generation and editing properties.

Auto Generate CSD - if on, a CSD is generated at load time, after a template is inserted, etc. This setting applies to all CSD windows.

CSD Context Hints - if on, show CSD context hints in CSD Windows.

CSD Window Popup Menu Enabled - when on, there will be a popup editing menu for CSD windows. The particular mouse event that triggers the popup is determined by the JVM and Look-And-Feel. On Windows, Solaris, and Linux JVMs, the event is generally any right mouse click. Turning this off allows you to use the CSD window right click function that selects tokens with one click, and levels of enclosing braces with more clicks (CTRL-left_click does the same thing).

Compiler Settings - opens a CSD settings dialog for the workspace or project settings, and selects the "Compiler" tab, which allows changing and editing compiler environments.

PATH / CLASSPATH - opens a CSD settings dialog for the workspace or project settings, and selects the "PATH" tab, which allows changing the PATH and CLASSPATH for compiling and running.

Print Settings - opens a print settings dialog for the workspace or project print settings.

Java Debug Settings - opens a dialog that allows changing the properties of the integrated Java debugger.

Administrator CSD Window Settings (Administrator Only) -  opens a CSD settings dialog for the administrator settings, and selects the "CSD" tab, which has settings that change CSD generation and editing properties.

Administrator Compiler Settings (Administrator Only) -  opens a CSD settings dialog for the administrator settings, and selects the "Compiler" tab, which allows changing and editing compiler environments.

Administrator Print Settings (Administrator Only) - opens a print settings dialog for the administrator print settings.

Look And Feel - allows the look and feel to be changed. After a change, the size and alignment of some interface elements may be slightly off due to Swing bugs.

Check for New Version - allows the user to select how often jGRASP will check to see if a new version is available for download. Checking is done only if internet access is available.


 
 

Window Menu

Refresh Window - causes the main window to be repainted.

Cascade - lays out the windows in the virtual desktop in a cascade.

Cascade and Resize - lays out the windows in the virtual desktop in a cascade and sets them to their default sizes.

Close All Windows - closes all open CSD windows, UML windows, and CPG windows.

The rest of the items represent currently open CSD windows, and allow the user to pop them up. An asterisk following a file name indicates that it is modified.


 
 

Tools Menu

Regular Expression Tester - pops up a testing tool for Perl5 regular expressions, which are used in compiler error formats.

System Info - Displays information about the operating system and Java version under which jGRASP is running.

Run Garbage Collector - frees unused memory (in jGRASP itself) immediately on most systems.

Refresh Viewers - reloads the Java integrated debugger and workbench object viewers. In a future version of jGRASP, an API will be provided so that users can easily develop their own object viewers. This function will cause those viewers to be reloaded after changes are made, so that viewers can be modified while a debug or workbench session is in progress.


 
 

UML Menu

Generate/Update UML Class Diagram - Brings up a UML window for the active project and updates the UML diagram.

Show UML Class Diagram - Pops up a UML window for the active project. The UML diagram is updated only if the window was not previously open.


 
 

Open File Dialog

A dialog for opening files.

Filters for the languages supported by jGRASP are provided, as well as the "all files" filter. Note that language filters classify files based on the extension only if they have not been opened in jGRASP before. Once a file is opened, jGRASP remembers that language. The default language for files with a ".h" extension can be set to C++ or C only (not both) by changing the extension settings for C or C++ (see settings).

You can also type a list of extensions into the "Filter Extensions" field to filter by extensions. These must be separated by whitespace, and can start with ".", "*.", or nothing. For example: "*.c *.cpp", ".c .cpp", and "c cpp" will all show only files that end in ".c" or ".cpp". This feature is provided for users running under JDK 1.3. Under 1.4, you can do the same thing by entering filter expressions in the "File Name" field, such as "*.c" or "*.c|*.cpp" .

The language may be forced at load time using the language pulldown menu. This only applies to files that have not been previously opened in jGRASP. Once a file is opened, its language is remembered.

The Text / Binary radio buttons allow the file to be opened in text mode (UNIX, DOS, and Mac. line terminators accepted) or binary mode (only newlines are line terminators).

To conveniently open multiple files, click on the "pin" icon.

To change to the current directory of the jGRASP "Browse" window, click on the folder icon with the "B" in it.


 
 

Browse Window

This window, which is located on the "Browse" tab, acts as a file browser.

A combo box shows the current directory and has a list of bookmarked directories. You can type a new directory in directly and hit "Enter" to change to that directory. The "Bookmark Current Directory" item will create a new bookmark for the current directory. "Edit Bookmarks" allows creating, removing, and sorting of bookmarks.

Filters for the languages supported by jGRASP are provided, as well as the "all files" filter. Note that language filters classify files based on the extension only if they have not been opened in jGRASP before. Once a file is opened, jGRASP remembers that language. The default language for files with a ".h" extension can be set to C++ or C only (not both) by changing the extension settings for C or C++ (see settings).

You can also type a list of extensions into the filter pulldown and hit "Enter" to filter by extensions. These must be separated by whitespace, and can start with ".", "*.", or nothing. For example: "*.c *.cpp", ".c .cpp", and "c cpp" will all show only files that end in ".c" or ".cpp".

Clicking on a file will open it (in text mode). HTML files will be opened in the jGRASP help browser, and jar files in the jar/zip extractor. To edit one of these files, you can drag it onto the virtual desktop or use the context menu to open it.

Clicking on a project will attempt to open it. If it does not appear to be a jGRASP project, it will be opened as a file.

A context menu allows selected files to be opened (in text or binary mode), selected files to be deleted, selected files to be added to the active project with either relative (to the project file location) or absolute paths, or the properties of selected files to be displayed.


 
 

Project Window

This window, which is located on the "Browse" tab, displays files in the currently open projects.

Clicking on a file will open it (in text mode).

If the project contains Java files, a "UML" icon allows the UML diagram to be created or updated and shown.

A file context menu allows selected files to be opened or removed from the project, and for relative paths to be made absolute or vice-versa.

A project context menu allows operations found in the active project menu to be performed on any project, and allows changing the active project.


 
 

Message Window

The message window contains tabbed pages for compiler messages, messages from jGRASP (CSD generation, non critical errors and warnings), and an i/o window for run functions.

Color settings for these pages use CSD color settings. Some of these are specific to the message pages. They can be set on the CSD window settings CSD page.

Clicking on an error in a message window will open the file referred to in the message (if not already open) and select the line referred to in the message. Clicking on a line from a Java stack dump in the Run I/O window will do the same. If line numbers are frozen in the CSD window, the frozen line number will be selected. Clickable lines are shown in a different color. The format for click-to-error in the compile message page is determined by the compiler settings. The paths that will be searched if the line contains a relative path name or Java class name are specified on the sources page of the CSD window settings (workspace and project only).

The compile and jGRASP message pages have a "Copy" button. This will copy the selected text, or all text if there is no selection, to the clipboard.

The compile page has a "Stop" button that will kill the compile process. If this button is enabled it means a compile process is active.

The run page provides i/o for the run function. An "End" button allows the running process to be killed. If this button is enabled it means a "run" process is active.

All three pages have a "Clear" button that clears previous output.


 
 

Projects

A jGRASP project consists of a file list, CSD and print settings (see settings), and UML diagram state. For now there are very few operations on projects; they mainly provide compiler environments through the CSD settings, and a set of files for UML generation.

The default project is always open. It can not be closed.

One project will be selected as active. When compiling or running, if a file belongs to more than one open project, the project settings for the active one (if one is active) will be used for the operation. You can change the active project using the project context menu in the project window. The active project is displayed at the top of the control panel.

Any operation that will close a project will first save it. There is no way to discard changes to a project, except by killing jGRASP.

The project window displays the current projects and the files they contain.

The project menu allows projects to be opened, saved, and the active project to be modified.


 
 

Multi-file Search Dialog

This dialog allows multiple files to be searched. The results are reported to the jGRASP Message window, in a clickable format. Row and column numbers in the results assume the file will be opened in text mode (as will happen if you click on a result and the file is not already open). If the file is opened in binary mode, the column number will be off by one for any line for which the previous line is terminated by "\r\n".

Filters for the languages supported by jGRASP are provided, as well as the "all files" filter. Note that language filters classify files based on the extension only if they have not been opened in jGRASP before. Once a file is opened, jGRASP remembers that language. The default language for files with a ".h" extension can be set to C++ or C only (not both) by changing the extension settings for C or C++ (see settings).

You can also type a list of extensions into the "Filter Extensions" field to filter by extensions. These must be separated by whitespace, and can start with ".", "*.", or nothing. For example: "*.c *.cpp", ".c .cpp", and "c cpp" will all show only files that end in ".c" or ".cpp". This feature is provided for users running under JDK 1.3. Under 1.4, you can do the same thing by entering filter expressions in the "File Name" field, such as "*.c" or "*.c|*.cpp" .

To change to the current directory of the jGRASP "Browse" window, click on the folder icon with the "B" in it.

Note that cancelling the dialog does not stop the search. To stop the search, you must hit the "Stop" button on the "Compile Messages" window.

Files and directories can be selected. For each directory selected, any files in that directory matching the selected filter will be searched.

Search Pattern - the text or pattern for which to search.

Pattern Type

Plain Text - match the search text. A search will begin at the end of the previous match.

Awk/Grep Reg. Exp - match extended awk/grep style regular expression. A search will begin at the end of the previous match.

Perl5 Reg. Exp. - match a Perl 5 regular expression. A search will begin at the end of the previous match. If the pattern contains no groups, the whole match will be reported. Otherwise, there will be a match for each matching group. For example, the pattern  t(e)s(t) will result in two matches for "test", one for the "e" and one for the second "t". Zero-length groups are allowed, but the selection will be one character long. For example,  t(\S*)est  will select the "e" in "test". See the perlre man page for a description of the pattern format.

Case Sensitive - if on, the search will be case sensitive.

Search Subdirectories - if on, subdirectories of any directories in the search will be recursively scanned. Any files matching the selected filter will be searched.

Search Project Files - if on, all files and directories in all open projects will be searched.

Max. Results Per File - specifies the maximum number of matches that will be reported for each selected file.


 
 

Generate Documentation Dialog

Target Directory - the directory in which the "javadoc" documentation will be generated. Using a project-relative path will allow this setting to be valid if the entire project is moved (even to a different operating system).

Include Private Items - if checked, private fields and methods will be included in the documentation.

Additional Doc. Command Flags - additional flags to the "javadoc" command. This is useful for linking to Java API docs on the local system or the web. For example:
 
   local file:   -link "file:///C:/j2sdk1.4.0/docs/api"
   Sun website:  -link "http://java.sun.com/j2se/1.4/docs/api"
 

Generate - generates documentation using the current project-level "Document" command for Java.


 
 

New Workspace Dialog

Workspace Name - the name for the workspace that will appear in the workspaces menu.

Copy Settings, Open Files, and Projects from Current Workspace - if checked, the new workspace will be equivalent to the current one.

Copy Settings from Current Workspace - if checked, the new workspace will have the same settings as the current one, but will have no open projects and no open windows on the desktop.

Create an Uninitialized Workspace - if checked, the new workspace will have default settings, no open projects and no open windows on the desktop.

Open the New Workspace - if checked, open the new workspace after it is created. Otherwise, create the new workspace but continue using the current one.


 
 

Workspaces Dialog

This dialog displays all of the named (non-default) workspaces and allows workspaces to be created, deleted, and reordered. On the left is the workspace list, displaying all of the named workspaces. The workspaces list allows reordering by drag-and-drop.

New - opens a new workspace dialog.

Remove - permanently deletes the selection in the workspace list.

Open - opens the selection in the workspace list.

Sort by Name - sorts the workspace list and the workspace menu alphabetically by name. You can also drag-and-drop in the workspace list to reorder it.