Navigating to the Methods for a Specified Class

To access the methods for a specified class

  1. If you want to navigate to a method in another schema, select the appropriate schema in the drop-down list or specify the name in the text box of the Schema combo box.

  2. In the Command combo box, select Methods Browser from the drop-down list or specify Methods Browser in the text area.

  3. In the Class combo box, select the class to whose methods you want to navigate or specify part or the entire name in the text area so that your required class is selected.

    For details about filtering the entries displayed in the list box associated with the Class combo box, see "Filtering Entries in Combo Box and List Box Text", elsewhere in this chapter.

  4. Click the OK button.

You can also access the Methods Browser for a class selected in the Class List of the Class Browser, a primitive type selected in the Primitive Type List of the Primitive Types Browser, or an interface selected in the Interface List of the Interface Browser, by selecting the Methods Browser command from the Classes menu, the Types menu, or the Interfaces menu. A standalone browser containing only the methods defined in the selected class, primitive type, or interface is then displayed.

You can group methods from any class in any schema into a named workspace that assists you in book-marking workflows (for example, all methods and events that relate to a specific feature, with the method view description advising other users about the functionality provided by the methods). For details, see "Using Method Views to Bookmark Workflows", in Chapter 13.

The Methods Browser for the specified class is then displayed, as shown in the following image.

The methods provided by instances of the class are listed on the left of the browser.

To view the logic for a method

The logic for the selected method is then displayed in the pane on the right of the Methods Browser. You can select the Remove command from the Methods menu to remove a selected method from the class or you can select the References command or the Implementors command from the Methods menu to view the references or implementors of the selected method. (See also "Removing a Schema Element", in Chapter 3.)

You can modify a method that is displayed in the editor pane. If you modify a method and then close the Methods Browser before you have saved or compiled the method, a dialog prompts you to save the method before the window is closed.

To compile a displayed method, perform one of the following actions

To execute a displayed JadeScript method or Workspace code

  1. In a Workspace only, drag the mouse over the logic to select the body of the method.

  2. The Jade menu displays the Execute It command if the JadeTestCase class or subclass is not selected. Perform one of the following actions.

    • Press F9 to execute the selected logic of a displayed method or all code in a Workspace.

    • Select the Execute It command from the Jade menu.

If the JadeScript method or Workspace code is not compiled, the F9 key first compiles the method before executing it.

Running a JadeScript method always starts a new application copy.

You can execute a JadeScript method or Workspace code only from the current schema context (version).

To test JadeTestCase class methods

You can press F9 or select the Unit Test command from the Jade menu to test a JadeTestCase entity from a schema, class, or method selected in the applicable browser.

In the Schema Browser, if the selected schema has user subclasses of JadeTestCase, pressing F9 or selecting the Unit Test command from the Jade menu (which is enabled only in this situation) runs the tests for all JadeTestCase classes in the selected schema and in all subschemas that also contain such tests.

In the Class Browser, pressing F9 or selecting the Unit Test command from the Jade menu with a JadeTestCase or subclass selected runs the test for this class and for all subclasses.

If a test method is selected in the Methods List of the Class Browser, the test is run for that method only.

If a JadeTestCase class or subclass method is selected and it is not compiled, the F9 key first compiles the method before testing it.

You can test a JadeTestCase class or subclass method only from the current schema context (version).

To debug the execution of a JADE unit test

The Jade menu displays the Unit Test Debug command if a user-defined schema with the JadeTestCase subclass, a JadeTestCase class or subclass, or a method in a JadeTestCase subclass is selected.

The JADE unit test framework is then initiated in JADE debug mode for the selected JadeTestCase class or selected method of the class if a method is selected. For details, see "Running Unit Tests", in Chapter 17 of the JADE Developer's Reference.