prev back next

Menu functions

Each of the views provides its own middle button popup menu - activated by pressing the middle mouse button (the right button if you use a 2-button mouse).

Class category list popup menu functions

The class category list provides the following menu functions:
fileOut
save all classes in the currently selected class category into one big source file. The file will be named "categoryName.st" and contain the code such that it can be reloaded later or on another system (see FileBrowsers "fileIn" function).
The format in which the code is saved is compatible to Smalltalk-80's fileOut format.
The file is created in the current project-directory (see projects ).

fileOut each
save all classes, but put each class into a separate file, named "className.st". The files are created in the current project directory. (see projects)

printOut
sends a printed representation of all classes in the selected category to the printer. The printout includes each methods source code.

printOut protocol
sends a short protocol-only printed representation of all classes in the selected category to the printer. The printout will not include the methods code, but the methods selector and the first comment found in the method - a format which is very valuable for documentation purposes (if your methods where written with a short descriptive comment at the beginning).

spawn
starts a class category browser on the currently selected class category. This is a browser without the class category list (try and see).

spawn full class
starts a full class browser. A full class browser allows editing a classes complete code in one view. This is very handy, if changes to many methods are to be done - especially if those changes depend on each other (for example, to rename a methods selector or a variables name).

update
will rescan all classes in the system and update the lists shown.
Normally, the systemBrowser tries to keep track of changes done by other parts of the system; however, there are situations, in which the browser does not get notified of these changes and needs a manual update.

find class
pops up a box to enter the name of a class. This class will be searched for and selected. The entered string may include wildcard characters. For example, it is possible to search for all classes containing the substring "Collection" in their name by entering "*Collection*".
No action is performed, if the entered class does not exist.

new class category
allows creation of a new class category. Notice, that the new category will become persistent only after a class has been created with that category.

rename
rename a category. This will change the class category attribute of all classes in the currently selected class category.

remove
remove all classes (& subclasses) in the current class category. You will be warned by a popup box which has to be answered positively, for the deletion to be actually performed.

Class list popup menu functions

Most functions in the class lists popupmenu affect the currently selected class. It provides the following operations:
fileOut
save the currently selected classes source code in a file named "className.st". The file is created in the current project directory.

printOut
send the currently selected classes source code to the printer.

printOut protocol
send the currently selected classes protocol description to the printer. This output will contain the class description, class comment and the classes protocol. For each method, the selector and the methods description is printed in a format that is very valuable for documentation purposes (if your methods where written with a short descriptive comment at the beginning).

spawn
start a single class browser on the currently selected class (try and see) If the codeview has a valid className highlighted (i.e. selected), a browser is spawned on that class.

spawn full protocol
start a full protocol browser on the currently selected class. A full protocol browser shows all messages understood by a class (try and see). If the codeview has a valid className selected, a hierarchy browser is spawned on that class.

spawn hierarchy
start a hierarchy browser on the currently selected class, all of its superclasses and all subclasses. If the codeview has a valid className selected, a hierarchy browser is spawned on that class.

spawn subclasses
start a browser on all subclasses of the currently selected class. (this includes subclasses of subclasses etc). If the codeview has a valid className highlighted, a subclass browser is spawned on that class.

hierarchy
show the hierarchy of the currently selected class in the code view. If the class-toggle is pressed, the metaclass hierarchy is shown.

definition
shows the classes definition in the codeview. Editing the definition and "accepting" in the code view allows changing the classes definition (i.e. inheritance, instance variables and category).

comment
shows the class comment in the code view. Editing the comment and "accepting" allows changing the classes comment.

class instvars
shows the classes class-instance-variables in the code view. Editing and "accepting" in the code view allows changing the classes instance variables.
Do not confuse class-instance-variables with class-variables - see the Smalltalk language documentation for this.

class refs
searches for uses of the selected class, and opens a browser on all referencing methods. This is the same as the globals function in the method-menu; it has been added for the convenience of ST-80 users.

variable search
this entry provides access to a submenu offering searches for different variable references. After the search, another browser showing all methods referencing the variable of interrest. The search can be for any reference or modifying references. You may either search locally (in the selected class only) or over the whole tree of subclasses. You may use wildcards when searching.

Notice, that this search may take some time, the system has to parse the source of all involved methods to find these accesses. If no method is found referencing the variable, the Transcript will show a short message ("none found").

new class
shows a new class definition prototype in the code view. You should edit this template, by changing the classes name and filling in the instanceVariables and/or classVariable names. "accepting" in the code view will actually create the new class.

new subclass
same as new class, but the offered class definition will be for a subclass of the currently selected class.

rename
change the name of the currently selected class. Since this class may be referenced by other code in the system, all references to that class are searched for and shown in another browser - you should then decide if those references should be changed or not (edit those references and "accept" in this new browsers code view).

remove
will remove the currently selected class and all of its subclasses. You will get a chance to cancel, if you changed your mind.

Method category list popup menu functions

The method category list provides the following menu functions:
fileOut
save the currently selected method categorys source code in a file named "className-category.st". The file is created in the current project directory. Not very useful - except to transfer parts of a class to others.

fileOut all
save all methods (from all classes) which have the same category as the currently selected method category in a file named "category.st". The file is created in the current project directory.
If you use unique method categories for individual projects, this allows easy fileOut of all methods belonging to that project.

printOut
print all methods of the currently selected category.

spawn
start a method category browser on all methods in the selected category (try and see).

spawn category
start a browser on all methods (i.e. of all classes) which have the same method category as the currently selected one (try and see).

find method here
allows searching for the method implementing a selector. The selector has to be entered into a box - wildcards are allowed. No action is performed, if there is no method implementing that selector.

find method
same, but searches up in the class hierarchy for the first class implementing the selector. This answers the question "when I send #foo to instances of this class, which method gets evaluated ?" No action is performed, if there is no method implementing that selector.

new category
addes a new category to the list. For this new category to become persistent, at least one method must exist with this category attribute.

copy category
allows copying all methods within another classes category to the currently selected class. You can specify wildcards in the category name. For example, entering "*" as category, will copy all methods from the other class. This function is very useful if you want to clone a class (for example, to experiment with a modified system class).

create access methods
creates methods to access instance variables. For each instance variable foo, two methods are created:
#foo - which returns this instance variable
and:
#foo: - which sets this instance variable
This function is non-destructive: if a method by that name already exists, it is not overwritten or changed.

create documentation stubs
creates empty documentation methods in the classes documentation protocol.

rename
rename the method category

remove
remove all methods (in the currently selected class only) which are members of the selected method category. You will be asked before the remove is actually performed.

Method list popup menu functions

The method list provides the following menu functions:
fileOut
save the currently selected method in a file named "className-selector.st". The file is created in the current project directory. Not very useful - except to transfer individual methods to others.

printout
send a printed representation of the currently selected method to the printer.

spawn
start a browser for editing this method only. If a string of the form "classname>>selector" is selected in the codeview, a browser is opened on that method. Some method comments contain this kind of cross-reference to allow quick start of a browser.

senders
starts a new browser on all methods sending a specific message. The message selector can be entered in a box, the browser offers a reasonable default, which is the current methods selector or the selection in the code view. If the code views selection consists of a code fragment, the browser tries to extract the selector (try & see).

implementors
starts a new browser on all methods implementing a specific message. The same selection mechanism as in "senders" is used.

globals
starts a new browser on all methods accessing a global

string search
starts a new browser on all methods where some sub-string is found in the source. Since all methods sourcecode has to be processed, this may take a while.

apropos
starts a new browser on all methods where some keyword is found in the selector or comment. Since all methods sourcecode has to be processed, this may take a while.

local sender
same as "senders", but limits the search to the current class and its subclasses.

local implementors
same as "implementors", but limits the search to the current class and its subclasses.

local string search
same as "string search", but limits the search to the current class and its subclasses.

local apropos
same as "apropos", but limits the search to the current class and its subclasses.

breakpoint
sets a breakpoint on the selected method. The debugger will be entered, whenever a breakpointed method is about to be executed. A single step or continue will then actually start execution of the method.

trace
turns on tracing of the selected method. Traced methods will output some information on the standard-error (Stderr) both on entry and exit. To trace into a file, Stderr can be set to some fileStream opened for writing.

trace sender
turns on sender-tracing of the selected method. Like trace, but only a short note identifying the sender of the method will be written to Stderr.

remove break/trace
remove breakpointing or tracing of the selected method. Any trace- or breakpoint is also removed, whenever the current method is recompiled (i.e. "accepted").

new method
shows a method template in the code view. You should edit this template and "accept" in the code view.
Actually, this template is simply a reminder on method syntax. To create a method, it is sufficient to "accept" in the code view with any method category selected. (i.e. just edit and "accept")
Typically new methods are created by copying some existing code into an empty codeview, then the selector and code are modified as needed, and finally "accepted".

change category
allows putting the currently selected method into another category (i.e. change the category of the selected method)

remove
removes the currently selected method. No confirmations are asked for.