Generating a Method Stub from the Editor Pane

When editing a Jade method, you can generate a method stub (whose logic must be filled in later) from a call statement.

To generate a method stub from the editor pane

  1. Specify a method call with all of the required parameters.

  2. Position the cursor over the new method name and then select the Generate Method Stub command from the Refactor submenu of the Edit menu.

A new method stub is then defined on the receiver of the method call. The types of the parameters are determined from the call statement. If the method call is assigned, the method return type is the type of the assignment variable.

If the receiver of the method is not in the current schema, a dialog is displayed, asking you to select the schema in which to add the method. For a class, the schema of the root of the class is selected by default. For a primitive method, the current browser schema is selected by default.

An example of an undefined method call is:

bool := cust.anewMethod(custName, bank.id, descStr);

This method call results in the creation of the anewMethod method stub on the Customer class, as follows.

anewMethod(custName: String;
           integer1: Integer;
           descStr:  String): Boolean;
vars
begin
    return null;
end;

When generating a method stub from the editor pane, note that: