/**
   * This adds to the menu bar a menu and some separators for editor additions, as well as the
   * sub-menus for object creation items.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public void contributeToMenu(IMenuManager menuManager) {
    super.contributeToMenu(menuManager);

    IMenuManager submenuManager =
        new MenuManager(DsmlEditorPlugin.INSTANCE.getString("_UI_DsmlEditor_menu"), "dsmlMenuID");
    menuManager.insertAfter("additions", submenuManager);
    submenuManager.add(new Separator("settings"));
    submenuManager.add(new Separator("actions"));
    submenuManager.add(new Separator("additions"));
    submenuManager.add(new Separator("additions-end"));

    // Prepare for CreateChild item addition or removal.
    //
    createChildMenuManager =
        new MenuManager(DsmlEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
    submenuManager.insertBefore("additions", createChildMenuManager);

    // Prepare for CreateSibling item addition or removal.
    //
    createSiblingMenuManager =
        new MenuManager(DsmlEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
    submenuManager.insertBefore("additions", createSiblingMenuManager);

    // Force an update because Eclipse hides empty menus now.
    //
    submenuManager.addMenuListener(
        new IMenuListener() {
          public void menuAboutToShow(IMenuManager menuManager) {
            menuManager.updateAll(true);
          }
        });

    addGlobalActions(submenuManager);
  }
  /**
   * This adds to the menu bar a menu and some separators for editor additions, as well as the
   * sub-menus for object creation items.
   * <!--
   * begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @param menuManager the menu manager
   * @generated_not
   */
  @Override
  public void contributeToMenu(IMenuManager menuManager) {
    super.contributeToMenu(menuManager);

    IMenuManager submenuManager =
        new MenuManager(
            DsEditorPlugin.INSTANCE.getString("_UI_DsEditor_menu"),
            "org.wso2.carbonstudio.eclipse.dsMenuID");
    menuManager.insertAfter("additions", submenuManager);
    submenuManager.add(new Separator("settings"));
    submenuManager.add(new Separator("actions"));
    submenuManager.add(new Separator("additions"));
    submenuManager.add(new Separator("additions-end"));

    // Prepare for item addition or removal.

    if (generateDataSourceMenu) {
      submenuManager.insertBefore("additions", dsMenuManager);
    }

    if (generateQueryAndOperationAndResourceMenu) {
      submenuManager.insertBefore("additions", configPropertyAction);
      submenuManager.insertBefore("additions", queryAction);
      submenuManager.insertBefore("additions", operationAction);
      submenuManager.insertBefore("additions", resourceAction);
    }

    if (generateQueryChildrenMenu) {
      submenuManager.insertBefore("additions", resultAction);
      submenuManager.insertBefore("additions", inputParamAction);
      submenuManager.insertBefore("additions", eventTriggerAction);
      submenuManager.insertBefore("additions", queryPropertyGroupAction);
    }

    if (generateSubscriptionMenu) {
      submenuManager.insertBefore("additions", subscriptionAction);
    }

    if (generateCallQueryInputMappingMenu) {
      submenuManager.insertBefore("additions", callQueryInputMappingAction);
    }

    if (generateOutputMappingMenu) {
      submenuManager.insertBefore("additions", outputMappingsMenuManager);
    }

    if (generateCallQueryMenu) {
      submenuManager.insertBefore("additions", callQueryAction);
    }

    if (generateValidatorMenu) {
      submenuManager.insertBefore("additions", validatorMenuManager);
    }

    if (generateQueryPropertyListMenu) {
      submenuManager.insertBefore("additions", queryPropertyAction);
    }

    // Force an update because Eclipse hides empty menus now.

    submenuManager.addMenuListener(
        new IMenuListener() {
          public void menuAboutToShow(IMenuManager menuManager) {
            menuManager.updateAll(true);
          }
        });

    addGlobalActions(submenuManager);
  }