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 desktop supports file dropping (drag and drop).
The documentation below shows menu items that appear when no windows are open. For menus that are specific to a particular type of active window, see CSD Window, UML Window, or CPG Window.
New - 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 - brings up an open file dialog.
Sync All - checks file modification times for all files open 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.
Close All - closes all CSD Windows. The user will be warned and given a chance to cancel if modified files exist.
Save All - saves files in all CSD windows.
Recent Files - allows recently closed files to be re-opened.
Workspace - 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, open 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 (it is checked by default), in which case all files are saved before compiling.
Search Multiple Files - brings up the multi-file search dialog.
Toolbars - allows the jGRASP interface to be configured with a single toolbar, separate toolbars for each window, or no toolbars. Windows that are outside the virtual desktop will always have a separate toolbar, unless the mode is set to "None".
Toolbar Buttons - allows the jGRASP interface to be configured so that toolbar buttons show icons only, text only, or both icons and text. This applies to most toolbars in jGRASP.
Messagebars - allows the jGRASP interface to be configured with a single messagebar, separate messagebars for each window, or no messagebars. Windows that are outside the virtual desktop will always have a separate messagebar, unless the mode is set to "None".
Menus - allows the jGRASP interface to be configured with a single menu or separate menus for each window. Windows that are outside the virtual desktop will always have a separate 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).
Project operations apply to the project associated with the currently active window.
New - allows the user to create a new empty project or new J2ME (Java 2 Micro Edition) project.
Open - allows a saved project to be opened.
Close - closes the project.
Close All - closes all open projects.
Save - save modifications to the project immediately. This is never necessary, except to be safe against a crash.
Save As - allows the user to save the project under a new name.
Recent Projects - allows the user to open recently closed projects.
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.
Import Files (J2ME projects only) - similar to "Add Files", except that the files are copied into the appropriate directory of the J2ME 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.
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 MIDlet Package (JAR/JAD) - brings up a dialog for creating a JAR/JAD package for a J2ME project.
Create Jar File for Project - brings up a jar creation dialog for the project.
Jar/Zip Extractor - brings up a jar/zip extractor dialog.
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.
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 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.
Verify on Save - if on, files will be verified after saving. That is, they will be read back in and compared to that data that was written.
Auto Sync - if on, file modification times will be checked 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 All.
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.
Documentation Settings - brings up a dialog that allows the user to change settings related to the display of documentation. This contains the following settings:
Show Documentation Outside jGRASP - if on, display of javadoc documentation for the Java API and user classes will be in the default system browser (Netscape on systems that don't have a default browser). On Windows, link targets within a local html file will not be followed in that case. That will be fixed in a future release.
Java API Documentation Root - specifies the URL at which to search for Java API documentation. The path should end at the "api" directory. Because of major changes made to the Java APIs in Java 1.5, if you are developing under pre-Java 1.5, you should set this to Java 1.4 api documentation.
Colors - opens a CSD settings dialog for the workspace, project, or file 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, project, or file 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.
File - opens a CSD settings dialog for the file 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, project, or file 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, project, or file print settings.
Java Debug Settings - opens a dialog that allows changing the properties of the integrated Java debugger.
J2ME Settings - opens a dialog that allows changing the global settings that apply to J2ME projects.
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.
jGRASP Startup Settings (Windows Only) - allows the user to choose which "java" is used to run jGRASP, the maximum memory available to jGRASP, and other startup settings. These will take effect the next time jGRASP is started. Note that the "java" used to run jGRASP is not necessarily the same one used to compile and run Java programs. To change the "java" used for compiling and running programs, use Settings > PATH / CLASSPATH.
Look And Feel - allows the look and feel to be changed. After a change, the color, size, and alignment of some interface elements may be slightly off due to Swing bugs in some versions of Java.
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.
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.
Reload Plugins - reloads the debugger viewers and tool plugins. In a future version of jGRASP, APIs will be provided so that users can easily develop their own viewers and tool plugins. This function will cause those plugins to be reloaded after changes are made, so that plugins can be modified and tested while jGRASP is running.
Compile Multiple Java Files - brings up a dialog that allows compiling a group of Java files.
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.
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". Note that 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 keep the dialog up.
To change to the current directory of the jGRASP "Browse" window, click on the folder icon with the "B" in it.
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 file system roots. You can type a new directory in directly and hit "Enter" to change to that directory.
The Bookmarks menu displays bookmarks, and allows bookmarking the current directory and editing 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.
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.
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. This button is enabled only when 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. This button is enabled only when a "run" process is active.
All three pages have a "Clear" button that clears previous output.
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 non-J2ME projects; they mainly provide compiler environments through the CSD settings, and a set of files for UML generation.
The project associated with the CSD window, CPG window, or UML window that is in focus will be active. When compiling or running, if a file belongs to more than one open project, the project settings for the most recently opened one will be used for the operation. 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.
The project window displays the current projects and the files they contain.
The project menu allows various operations to be performed on the active project.
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". Note that 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 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.
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.
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.
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.