Menu Reference

The following menus are available from the menu bar in Cosmo Code's main window. Those that are specific to the card currently displayed in the Card panel are noted.

File Menu

Menu Item Accelerator Description
New Ctrl+N Displays a blank file in the Source panel. Edit the file and save it using File > Save As....
Open... Ctrl+O Opens a dialog that allows you to specify a source file to display in the Source panel. You can also open a file in an open project by double-clicking the icon for the file in the Project card.
Open Recent >      Provides a list of files opened during the current session. Select a file to view it in the Source panel. You can also use the Source option menu above the Source panel to view previously opened files.
Insert File... Ctrl+I Opens a dialog that allows you to specify a file to insert at the location of the cursor.
Save Ctrl+S Saves the file displayed in the Source panel.
Save As...    Opens a dialog that allows you to save a file to a different location.
Print... Ctrl+P Opens a dialog that allows you to print the file that is displayed in the Source panel.
Print Selection    Opens a dialog that allows you to print the selected text in the Source panel.
Save as Text...    Implemented only for the Callstack and Command cards. It allows you to print the contents of the call stack or of the Command card.
Preferences...    Opens the Preferences Dialog which allows you to set configuration preferences for the different tools in the environment.
Clone Top Card    Makes a copy of the card displayed in the card panel and displays it in another window.
Clone Source Panel    Makes a copy of the Source panel and displays it in another window.
Clone Card Panel    Makes a copy of the Card panel and displays it in another window.
Quit Ctrl+Q Exits Cosmo Code.

Edit Menu

Menu Item Accelerator Description
Undo Ctrl+Z Keeps a list of the 400 most recent changes in the Source panel to undo/redo.
Redo Ctrl+E Keeps a list of the 400 most recent changes in the Source panel to undo/redo.
Cut Ctrl+X Removes the selected text from the Source panel.
Copy Ctrl+C Copies the selected text in the Source panel.
Paste Ctrl+V Pastes a cut or copied selection into the Source panel at the cursor location.
Paste Column   Pastes a cut or copied selection into the Source panel at the cursor location.
Clear Delete In the Source panel, removes the selected text from the file.
Select All Ctrl+A Selects all text in the file displayed in the Source panel.
Shift Left Ctrl+[ Moves the selected text in the Source panel one tab stop to the left.
Shift Right Ctrl+] Moves the selected text in the Source panel one tab stop to the right.
Capitalize   Changes all selected text in the Source panel to upper-case.
Lower Case   Changes all selected text in the Source panel to lower-case.

Project Menu

Menu Item Accelerator Description
New... Ctrl+Shift+N Opens a dialog that allows you to specify a project name, type, and directory. Cosmo code creates default .html, .java and .vb files.
Open... Ctrl+Shift+O Opens a dialog that allows you to specify an existing project to open.
Delete Ctrl+Shift+D  Deletes the files contained in the project selected in the Project card from disk. If the directory containing the project was created in Cosmo Code, and contains only project files, the directory is also deleted.
Save Ctrl+Shift+S Saves a project. This is useful if you opened Cosmo Code with an application or applet argument. Cosmo Code creates a temporary project that can then be saved using Save Project.
Add File...   Opens a dialog that allows you to add a file to a project.
Remove File   Removes the file selected in the Project card from the project. The file is not removed from disk.
Project Settings...   Opens the Project Settings Dialog which allows you to set build flags, classpath, file search path, run command etc. for an open project.
Move Project...   Opens a dialog that allows you to move your project to a different directory.
Launch Cosmo Create Ctrl+Shift+C Available when you have an applet project open in the Project card. Starts Cosmo Create with the HTML file that runs your applet.
Launch Visual Builder Ctrl+Shift+V When a project is open, starts the visual builder with the project's visual builder file. If the project does not already contain a visual builder file (.vb) starts the visual builder without specifying a file.
Preview  

If you have an application project open, runs the application and provides a shell window for the application output.

If you have an applet project open, displays your applet in an applet viewer.
Preview With Browser   Available when you have an applet project open in the Project card. Starts a web browser, and loads your project's HTML file into the browser.
Publish >   Publishes an applet to a directory that you specify in the dialog.
Build Ctrl+B

Opens the Build card and compiles the program using javac with the build options specified in the Project Settings dialog. Choose Project > Project Settings ... to modify the build options. Compiles only those files that have changed. To compile all files, choose Project > Build All.

Build also builds or rebuilds the class database needed to graph classes and perform queries over classes.

Output from the compiler and build process appear in the Build card and in the status line above the Source panel.

Provides the same behavior as clicking the Build button above the Source panel.
Build All  Ctrl+Shift+B Recompiles all files in the project.
Reanalyze Classes   Rebuilds the class database needed to graph classes and perform queries over classes. This action is usually performed automatically when you build your project from the Build or Run button. Use this menu item if you believe graphs or query results do not contain the most recent information.

Debug Menu

Menu Item Accelerator Description
Run Alt+R

Executes an attached program. If the program is an applet, also runs the applet viewer. Run compiles the program if:

  • Source files are newer than compiled files,
  • A new source file has been added to the project,
  • An existing source file has been removed from the project,
  • A newly -created .vb file has been saved.
After the initial run, Run allows you to rerun the program, maintaining the breakpoints you have set.
Suspend Thread Alt+J

Suspends execution of the thread that is selected as the current thread. Use Continue Thread to resume execution.

Note: To avoid a deadlock that would freeze your debugging session, the Java interpreter does not allow the debugger to suspend a thread which is in the process of using certain important Java runtime resources, such as I/O operations.
Suspend All Threads  

Suspends execution of all threads. Use Continue All Threads to continue execution.

Note: To avoid a deadlock that would freeze your debugging session, the Java interpreter does not allow the debugger to suspend a thread which is in the process of using certain important Java runtime resources, such as I/O operations.
Continue Thread Alt+N Continues execution of a suspended thread.
Continue All Threads   Continues execution of all threads. Use this option to continue execution from a breakpoint. Provides the same behavior as the Continue button above the Source panel.
Step Into Alt+I

Executes a single step in a line of source code. This command is legal only if a thread is suspended. If a statement invokes a method, it is stepped "into." That is, the next source statement is displayed, even if that statement is encountered in a different method. If a breakpoint is encountered while executing Step Into, the command is canceled and the thread is suspended where the breakpoint was fired.

In a call stack, if you select a frame other than the one where execution actually stopped, and you initiate a Step Into, the thread runs until it returns to the selected frame, at which point the Step Into takes place.
Step Over Alt+O

Executes a single step in a line of source code. This command is legal only if a thread is suspended. If a statement invokes a method, it is stepped "over." That is, the next source statement in the current method is displayed, although statements in a different method are being executed. If a breakpoint is encountered while executing Step Over, the command is canceled and the thread is suspended where the breakpoint was fired.

In a call stack, if you select a frame other than the one where execution actually stopped, and you initiate a Step Over, the thread runs until it returns to the selected frame, at which point the Step Over takes place.
Return Alt+B

Continues execution of the thread until the current method that is being executed returns. This command is legal only if a thread is suspended. The thread is suspended immediately upon returning to the calling method. All code within the current method is executed as usual. If a breakpoint is encountered while executing the Return command, the command is canceled and the thread is suspended where the breakpoint was fired..

In a call stack, if you select a frame other than the one where execution actually stopped, and you initiate a Return, the thread runs until it returns to the selected frame, at which point the Return takes place.
Terminate Thread Alt+T Stops, or terminates, the currently running thread. This command is legal only if the thread is running.
Terminate All Threads   Stops, or terminates, all threads. This command is legal only if an applet or application is running.
Frame Up Alt+Up Steps backward through the frames on the stack in any card. This command is legal only if one or more threads are suspended. The information displayed in the card reflects the state of the thread at that stack frame.
Frame Down Alt+Down Steps forward through the frames on the stack in any card. This command is legal only if one or more threads are suspended. The information displayed in the card reflects the state of the thread at that stack frame.
Examine Alt+X When a variable is selected in the Source panel, this displays the Data card with the selected variable.
Create Breakpoint...   Opens the Create Breakpoint dialog which allows you to create breakpoints.
Enable All Breakpoints   Enables all breakpoints displayed in the Breakpoints display area.
Disable All Breakpoints   Disables all breakpoints displayed in the Breakpoints display area.
Delete All Breakpoints   Deletes all breakpoints displayed in the Breakpoints display area.

Query Menu

Menu Item Description
Find Matching Classes and Interfaces Looks for all classes or interfaces that are an exact match for a selected string anywhere in the main window. Displays the results in the Query card.
Find Matching Methods Looks for all methods that are an exact match for a selected string anywhere in the main window. Displays the results in the Query card.
Find Matching Variables Looks for all variables that are an exact match for a selected string anywhere in the main window. Displays the results in the Query card.
Class and Interface Queries > Show Source Displays the source code for the class or interface in the Source panel. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].
Show Class or Interface Displays the class or interface in the Class card. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].
List Declared Methods Displays all the methods defined in the class in the Query card. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].
List Declared Variables Displays all the variables defined in the class in the Query card. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].
Method Queries > Show Source Displays the source code for the method in the Source panel. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].
What Calls Displays a list of methods that call the selected method, including source code lines, in the Query card. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].
What Is Called Displays a list of methods, including source code lines, that the selected method calls in the Query card. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].
What Is Read Displays a list of variables, including source code lines, that the selected method reads in the Query card. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].
What Is Modified Displays a list of variables, including source code lines, that the selected method modifies in the Query card. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].
Variable Queries > Show Source Displays the source code for the variable in the Source panel. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].
What Is Reading Displays a list of methods, including source code lines, that read the selected variable. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].
What Is Modifying Displays a list of methods, including source code lines, that modify the selected variable. If there is more than one item matching the selection, all items matching the selection are displayed in the Query card, with the label [Ambiguous query].

Search Menu

Menu Item Accelerator Description
Find... Ctrl+F Dialog allows you to specify literal, literal case-sensitive, or regular expression search. The default is set in Cosmo Code preferences (File > Preferences > Source.) You can keep the dialog open for multiple searches using the Keep Dialog checkbox or the Keep Search Dialogs Up preference. Verbose Search preference provides information dialogs on search progress. Default is to beep when no match is found.
Find Again Ctrl+G Finds the next occurrence of the string or expression typed into the Find dialog or the string found using Find Selection.
Find Selection Ctrl+H Select a region of text, then use Find Selection to find other occurrences of the selected region.
Replace... Ctrl+R Dialog allows you to specify literal, literal case-sensitive, or regular expression search and replace. The default is set in Cosmo Code preferences (File > Preferences > Source.) You can keep the dialog open for multiple searches/replaces using the Keep Dialog checkbox or the Keep Search Dialogs Up preference. Verbose Search preference provides information dialogs on search progress. Default is to beep when no match is found
Replace Same Ctrl+T Replaces the next occurrence of the string specified in the Replace dialog. To find the next occurrence, use Find Again.
Mark... Alt+M a-z Opens a dialog to identify a location in the file using a single character.
Goto Mark... Alt+G a-z Opens a dialog to enter a defined mark or location to display.
Goto Line Number... Ctrl+L Opens a dialog to enter a line number. The line number is highlighted in the Source panel.
Match Parenthesis Ctrl+M Highlights matching parentheses.

Command Menu

Menu Item Accelerator Description
Filter Selection Alt+L When text is selected in the Source panel, allows you to specify a shell command to filter the selected text. The output from this command replaces the contents of the selection.
Execute Command... Alt+Y Opens a dialog to enter a shell command to execute. Results are added to the source file at the cursor location.
Cancel Shell Command Ctrl+. Cancels a shell command that is executing as a result of using Execute Command....
Edit Shell Commands...   Opens an Edit Shell Menu dialog to add items to, or make changes to, the shell-related items on the Command menu.
Learn Keystrokes Alt+K Begins recording a macro. Select this menu item, record the steps to include in the macro, then choose Finish Learn. choose Replay Keystrokes to reply the macro. You can add the macro to the Command menu using Edit Macro Commands....
Finish Learn Alt+K Ends the recording of the macro. To be used in conjunction with Learn Keystrokes.
Cancel Learn Ctrl+. Cancels the recording of a macro.
Replay Keystrokes Ctrl+K Plays a macro.
Edit Macro Commands...   Opens an Edit Macro Menu dialog to add items to, or make changes to, the macro-related items on the Command menu.
Show URL Alt+U Displays the URL of the selected text.
man Opens a window that displays the referecne page for the selected command
spell Performs a spell check on the selection.
sort Sorts the selected lines in ascending order. If no lines are selected, sorts the entire document.
Comment /**/ Inserts C comment notation at beginning and end of selection.
Uncomment /**/ Deletes C comments notation at beginning and end of selection.
Comment /**/ Inserts C++ comment notation at beginning of selection.
Uncomment /**/ Deletes C++ comments notation for the selection.

View Menu (Project Card)

Menu Item Description
As Icons Displays an icon for each file.
As List Shows the pathname and filename of files in your project.
As Columns Organizes the icons that represent files in your project as columns.
By Time Sorts in order of creation/modification time. The most recently created or modified file appears first in the list.
By Size Sorts in order of file size. The largest files appear first in the list.
By Name Sorts in alphabetical order.
By Type Sorts in alphabetical order according to file type.

View Menu (Overview Card)

Menu Item Description
Current Display > Allows you to choose between displaying an inheritance graph, showing all classes, and a package outline listing all classes within each package.
Show Packages When checked, shows the name of the package for each class displayed in the Overview card.
Realign Graph Redraws the graph, restoring the positions of any nodes that were repositioned.
Show All Nodes Displays the entire graph.
Rotate Graph Toggles between vertical (calling nodes at the top) and horizontal (calling nodes at the left) tree orientation.
Pan Graph

Displays the Overview window, which lets you view the entire graph at a reduced scale using a movable viewport that lets you select the portion of the graph displayed in the main window. The Overview window also has an Admin menu with these three selections:

  • "Scale to Fit" scales the graph to match the aspect ratio of the Overview window.
  • "Show Arcs" displays or hides the arcs between the nodes.
  • "Close" closes the Overview window.
Zoom > Provides options that allows you to scale the graph to ranges between 15% and 200% of the normal (100%) size.
Node Actions >
  • Show Only Subgraph--Hides all parents and displays only the children of the selected node.
  • Show Butterfly--Displays the immediate parents and children of the selected class.
  • Show Only Related Nodes--Displays only the nodes related to the currently selected node.
  • Hide Node--Hides the selected node in the graph.
  • Hide Children--Hides all the children of the node, and displays a right-facing arrow to show that information has been hidden. Use Show Children to access the hidden nodes.
  • Show Children--Displays all the classes or interface types that inherit from the selected node

View Menu (Class Card)

Menu Item Description
Show Inherited Fields When checked, shows inherited fields (methods and variables) in addition to locally defined methods and variables.
Show Package Names When checked, displays package names for each class in the card.

Class Menu (Class Card)

Menu Item Accelerator Description
What Is Declared Ctrl+Shift+L Highlights all methods declared by the selected base class.
What Is Defined Ctrl+Shift+E Highlights all methods and variables defined by the selected base class.
What is Overridden By Ctrl+Shift+R Highlights all the methods in the current class that override inherited methods.
What is Abstract Highlights all the abstract classes and methods.
What Instantiates Highlights all methods and variables of the current class that instantiate the selected class.
What Uses Displays the What Uses Submenu
What is Instantiated Highlights all the classes that the current class instantiates
What Is Used Displays the What Is Used Submenu
Show Call Graph Displays a call graph for a selected method

What Uses and What Is Used Submenus

Menu Item Description
Using Any Field Highlights all methods and variables (of the current class) that the selected class uses.
Calling Methods Highlights all methods (of the current class) that the selected class uses.
Using Variables Highlights all variables (of the current class) that the selected class modifies or reads.
Modifying Variables Highlights all variables (of the current class) to which the selected class assigns a value.
Reading Variables Highlights all variables (of the current class) from which the selected class reads a value.

View Menu (Query Card)

When checked, Show Packages displays package information for each class in the Query card.

History Menu (Data Card)

Provides a list of previously evaluated variables in Data card. Select an item from the list to display the variable value.

Guide to the Cosmo Code Development Environment
12-96*289