コード例 #1
0
  private void fillContextMenu(IMenuManager manager) {
    for (RunStateAction a : actions.getRunStateActions()) {
      addVisible(manager, a);
    }
    addVisible(manager, actions.getOpenBrowserAction());
    addVisible(manager, actions.getOpenConsoleAction());
    addVisible(manager, actions.getOpenInPackageExplorerAction());
    addVisible(manager, actions.getShowPropertiesViewAction());

    manager.add(new Separator());

    addVisible(manager, actions.getOpenConfigAction());
    addVisible(manager, actions.getDuplicateConfigAction());
    addVisible(manager, actions.getDeleteConfigsAction());

    manager.add(new Separator());

    addVisible(manager, actions.getExposeRunAppAction());
    addVisible(manager, actions.getExposeDebugAppAction());

    manager.add(new Separator());

    for (AddRunTargetAction a : actions.getAddRunTargetActions()) {
      addVisible(manager, a);
    }
    manager.add(new Separator());

    IAction removeTargetAction = actions.getRemoveRunTargetAction();
    if (removeTargetAction != null) {
      addVisible(manager, removeTargetAction);
    }

    IAction refreshAction = actions.getRefreshRunTargetAction();
    if (refreshAction != null) {
      addVisible(manager, refreshAction);
    }

    IAction restartOnlyAction = actions.getRestartOnlyApplicationAction();
    if (restartOnlyAction != null) {
      addVisible(manager, restartOnlyAction);
    }

    IAction selectManifestAction = actions.getSelectManifestAction();
    if (selectManifestAction != null) {
      addVisible(manager, selectManifestAction);
    }

    IAction restartWithRemoteDevClientAction = actions.getRestartWithRemoteDevClientAction();
    if (restartWithRemoteDevClientAction != null) {
      addVisible(manager, actions.getRestartWithRemoteDevClientAction());
    }

    IAction deleteAppsAction = actions.getDeleteAppsAction();
    if (deleteAppsAction != null) {
      addVisible(manager, deleteAppsAction);
    }

    IAction updatePasswordAction = actions.getUpdatePasswordAction();
    if (updatePasswordAction != null) {
      addVisible(manager, updatePasswordAction);
    }

    IAction openCloudAdminConsoleAction = actions.getOpenCloudAdminConsoleAction();
    if (openCloudAdminConsoleAction != null) {
      addVisible(manager, openCloudAdminConsoleAction);
    }

    IAction toggleCloudConnectAction = actions.getToggleTargetConnectionAction();
    if (toggleCloudConnectAction != null) {
      addVisible(manager, toggleCloudConnectAction);
    }

    IAction reconnectConsole = actions.getReconnectCloudConsole();
    if (reconnectConsole != null) {
      addVisible(manager, reconnectConsole);
    }

    ToggleFilterAction[] toggleFilterActions = actions.getToggleFilterActions();
    if (ArrayUtils.hasElements(toggleFilterActions)) {
      manager.add(new Separator());
      for (ToggleFilterAction a : toggleFilterActions) {
        addVisible(manager, a);
      }
    }

    //		manager.add
    //		addVisible(manager, new Separator());
    //		addVisible(manager, refreshAction);
    //		addVisible(manager, action2);
    // Other plug-ins can contribute there actions here
    //		manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  }
コード例 #2
0
  private void fillContextMenu(IMenuManager manager) {
    for (RunStateAction a : actions.getRunStateActions()) {
      addVisible(manager, a);
    }
    addVisible(manager, actions.getOpenBrowserAction());
    addVisible(manager, actions.getOpenConsoleAction());
    addVisible(manager, actions.getOpenInPackageExplorerAction());
    addVisible(manager, actions.getShowPropertiesViewAction());

    manager.add(new Separator());

    addVisible(manager, actions.getOpenConfigAction());
    addVisible(manager, actions.getDuplicateConfigAction());
    addVisible(manager, actions.getDeleteConfigsAction());

    manager.add(new Separator());

    addVisible(manager, actions.getExposeRunAppAction());
    addVisible(manager, actions.getExposeDebugAppAction());
    addSubmenu(
        manager,
        "Deploy and Run On...",
        BootDashActivator.getImageDescriptor("icons/run-on-cloud.png"),
        actions.getRunOnTargetActions());
    addSubmenu(
        manager,
        "Deploy and Debug On...",
        BootDashActivator.getImageDescriptor("icons/debug-on-cloud.png"),
        actions.getDebugOnTargetActions());

    manager.add(new Separator());

    for (AddRunTargetAction a : actions.getAddRunTargetActions()) {
      addVisible(manager, a);
    }
    manager.add(new Separator());

    IAction removeTargetAction = actions.getRemoveRunTargetAction();
    if (removeTargetAction != null) {
      addVisible(manager, removeTargetAction);
    }

    IAction refreshAction = actions.getRefreshRunTargetAction();
    if (refreshAction != null) {
      addVisible(manager, refreshAction);
    }

    IAction restartOnlyAction = actions.getRestartOnlyApplicationAction();
    if (restartOnlyAction != null) {
      addVisible(manager, restartOnlyAction);
    }

    IAction selectManifestAction = actions.getSelectManifestAction();
    if (selectManifestAction != null) {
      addVisible(manager, selectManifestAction);
    }

    IAction restartWithRemoteDevClientAction = actions.getRestartWithRemoteDevClientAction();
    if (restartWithRemoteDevClientAction != null) {
      addVisible(manager, actions.getRestartWithRemoteDevClientAction());
    }

    IAction deleteAppsAction = actions.getDeleteAppsAction();
    if (deleteAppsAction != null) {
      addVisible(manager, deleteAppsAction);
    }

    IAction updatePasswordAction = actions.getUpdatePasswordAction();
    if (updatePasswordAction != null) {
      addVisible(manager, updatePasswordAction);
    }

    IAction openCloudAdminConsoleAction = actions.getOpenCloudAdminConsoleAction();
    if (openCloudAdminConsoleAction != null) {
      addVisible(manager, openCloudAdminConsoleAction);
    }

    IAction toggleCloudConnectAction = actions.getToggleTargetConnectionAction();
    if (toggleCloudConnectAction != null) {
      addVisible(manager, toggleCloudConnectAction);
    }

    IAction reconnectConsole = actions.getReconnectCloudConsole();
    if (reconnectConsole != null) {
      addVisible(manager, reconnectConsole);
    }

    //		manager.add
    //		addVisible(manager, new Separator());
    //		addVisible(manager, refreshAction);
    //		addVisible(manager, action2);
    // Other plug-ins can contribute there actions here
    //		manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  }