Adding a Toolbar Button to Run a Script or Application

You can add one or more custom buttons to the Jade Platform development environment toolbar to run a specific application, JadeScript method, or Jade test cases in standard run or debug mode, regardless of the current schema. These buttons initiate the required action without having to switch the Jade Platform development environment view to the required environment.

For details about custom toolbar buttons, see "Using Custom Toolbar Buttons", elsewhere in this document.

To add a new custom button

  1. Click the button with the caption + positioned to the right of the clipboard toolbar.

    The Add new run application / script button dialog, shown in the following image, is then displayed to enable you to define the functionality to be assigned to a new button that will be added to your view of the toolbar area.

  2. Select both a schema and an application from the relevant Schema and Application combo boxes.

    By default, the Application combo box contains only the applications defined for the selected schema.

  3. Check the Show Super Schema Applications check box if you want to include all superschema applications in the application list of the Application combo box.

  4. Select the option button of the type of action that you require; that is:

    • Run Application, if you want the new button to run the specified application in the specified schema.

      This action is the same as selecting the required schema in the Jade Platform development environment, initiating the Run Application dialog, and then selecting the required application.

    • Run Script, if you want to add all JadeScript classes for the selected schema to the JadeScript Class combo box.

      Check the Show Super Schema Classes check box if you want to include all superschema JadeScript classes in the JadeScript Class combo box.

      Only classes that have suitable JadeScript class methods are included (that is, those with no type methods and only those methods that have no parameters).

      When you select a JadeScript class, the Method combo box is populated with the available methods that can be executed. Select the method that is to be run when the new custom button is clicked.

      The selected application will be started under the selected schema and will run the selected method when the new custom button in the Jade Platform development environment toolbar is clicked. This action is the same as selecting the specified schema, the JadeScript class, and the required method in the Class Browser and then selecting the File menu Run command.

    • Run Test Case, if you want to add all JadeTestCase classes for the selected schema to the Test Case Class combo box.

      Check the Show Super Schema Classes check box if you want to include all superschema JadeTestCase classes in the Test Case Class combo box.

      Only classes that have suitable JadeTestCase class methods are included (that is, only test case methods).

      By default, the Test Case Class combo box displays - All Test Cases for Schema -. When this entry is selected, clicking the + toolbar button in the Jade Platform development environment is equivalent to selecting the Unit Test command or Unit Test Debug) command from the Jade menu in the Schema Browser.

      The Unit Test Runner form that is then displayed lists all test cases for the schema.

      If you select a specific test case class in the Test Case Class combo box of the Add new run application / script button dialog, the Method combo box is populated with the suitable test case methods. By default, the Method combo box displays - Run all Test Case methods for class -, which causes the execution of all test cases for the selected class when you click the + toolbar button in the Jade Platform development environment. Alternatively, select a specific method if you want to execute that test case method only.

      The test case execution is run by starting the selected application using the selected schema.

  5. To complete the set up of your new custom button, specify the caption for your new button in the Button Caption text box. The caption has a maximum length of 20 characters.

  6. If you want the code executed in debug mode, check the Run in Debug Mode check box to cause the execution to run in the Jade Debugger.

  7. When you have specified all of your required values, click the Update button to add a new button with the specified caption to the right of the + button in the toolbar or to the right of any previously defined custom buttons.

When you close the Jade Platform development environment, any defined button descriptions are stored in your user profile and they are restored when you restart the Jade Platform development environment.

All combo boxes filter the displayed list according to the content of any text typed into the text box portion of the combo box.

2022.0.01 and higher