Skip to main content

Add new menu to plugin

If a D2SV plugin intends to define a new custom menu then this assistant option could be used to create the boilerplate associated with these custom menu, which are also known as unity menu.

caution

Use this option when at least one plugin project exists in the workspace.

Associated questions and their meanings -

  • Select plugin to add new menu

    Specify the plugin project where to add boilerplate for this menu

  • Id for the menu

    A unique id for this menu.

  • Label for the menu

    Define an English label for this menu.

  • Pick a toolbar to add this menu to

    D2-Smartview UI shows different type of menu bars depending on the application context. By answering this option we can specify the menubar where this menu is going to be added.

  • Select an appropriate menu action

    Specify the action to be performed when this menu is clicked like calling service's method or show dialog.

  • Specify selection mode for the menu

    Whether the menu should support single or multiple object selection.

Based on the menu action selected, the workspace assistant prompts for corresponding parameters

If the selected menu action is

Calling service's method
  • Specify service name

    Specify name of the calling service.

  • Specify service method name

    Specify name of the calling service method.

  • Create sample service class with method ?

    Whether to create a sample java service class with method definition.

  • Specify selection

    Specify on selection for calling service's method.

  • Specify return type

    Specify return type for the callback.

  • Specify return action

    Specify return action for the callback.

  • Create sample javascript file with callback function ?

    Whether to create a sample javascript callback action file with callback function. This question is asked only if 'return type' was selected as Javascript.

Show dialog
  • Specify dialog name

    Specify dialog name to be shown when this menu is clicked.

  • Create sample dialog class and definition file ?

    Whether to create a sample dialog class file. The workspace assistant will prompt to enter dialog title, dialog form mode and dialog view mode if Yes is selected