Skip to content

Commit

Permalink
Remove machine perspective (eclipse-che#3689)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Kuleshov authored Jan 12, 2017

Verified

This commit was signed with the committer’s verified signature.
pentschev Peter Andreas Entschev
1 parent 140f07e commit a81ecdc
Showing 14 changed files with 1 addition and 858 deletions.
Original file line number Diff line number Diff line change
@@ -34,12 +34,8 @@
import org.eclipse.che.ide.api.parts.PerspectiveManager;
import org.eclipse.che.ide.api.workspace.event.WorkspaceStartingEvent;
import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent;
import org.eclipse.che.ide.extension.machine.client.actions.CreateMachineAction;
import org.eclipse.che.ide.extension.machine.client.actions.CreateSnapshotAction;
import org.eclipse.che.ide.extension.machine.client.actions.DestroyMachineAction;
import org.eclipse.che.ide.extension.machine.client.actions.EditCommandsAction;
import org.eclipse.che.ide.extension.machine.client.actions.ExecuteSelectedCommandAction;
import org.eclipse.che.ide.extension.machine.client.actions.RestartMachineAction;
import org.eclipse.che.ide.extension.machine.client.actions.RunCommandAction;
import org.eclipse.che.ide.extension.machine.client.actions.SelectCommandComboBox;
import org.eclipse.che.ide.extension.machine.client.actions.ShowConsoleTreeAction;
@@ -168,12 +164,8 @@ private void prepareActions(MachineLocalizationConstant localizationConstant,
ExecuteSelectedCommandAction executeSelectedCommandAction,
SelectCommandComboBox selectCommandAction,
EditCommandsAction editCommandsAction,
CreateMachineAction createMachine,
RestartMachineAction restartMachine,
DestroyMachineAction destroyMachineAction,
StopWorkspaceAction stopWorkspaceAction,
SwitchPerspectiveAction switchPerspectiveAction,
CreateSnapshotAction createSnapshotAction,
RunCommandAction runCommandAction,
NewTerminalAction newTerminalAction,
EditTargetsAction editTargetsAction,
@@ -183,8 +175,6 @@ private void prepareActions(MachineLocalizationConstant localizationConstant,
StopProcessAction stopProcessAction,
CloseConsoleAction closeConsoleAction,
ShowConsoleTreeAction showConsoleTreeAction) {
final DefaultActionGroup mainMenu = (DefaultActionGroup)actionManager.getAction(GROUP_MAIN_MENU);

final DefaultActionGroup workspaceMenu = (DefaultActionGroup)actionManager.getAction(GROUP_WORKSPACE);
final DefaultActionGroup runMenu = (DefaultActionGroup)actionManager.getAction(GROUP_RUN);

@@ -195,15 +185,7 @@ private void prepareActions(MachineLocalizationConstant localizationConstant,

actionManager.registerAction("editTargets", editTargetsAction);

//add actions in machine menu
final DefaultActionGroup machineMenu = new DefaultActionGroup(localizationConstant.mainMenuMachine(), true, actionManager);

actionManager.registerAction("machine", machineMenu);
actionManager.registerAction("createMachine", createMachine);
actionManager.registerAction("destroyMachine", destroyMachineAction);
actionManager.registerAction("restartMachine", restartMachine);
actionManager.registerAction("stopWorkspace", stopWorkspaceAction);
actionManager.registerAction("createSnapshot", createSnapshotAction);
actionManager.registerAction("runCommand", runCommandAction);
actionManager.registerAction("newTerminal", newTerminalAction);

@@ -215,11 +197,6 @@ private void prepareActions(MachineLocalizationConstant localizationConstant,

workspaceMenu.add(stopWorkspaceAction);

mainMenu.add(machineMenu, new Constraints(AFTER, IdeActions.GROUP_PROJECT));
machineMenu.add(createMachine);
machineMenu.add(restartMachine);
machineMenu.add(destroyMachineAction);
machineMenu.add(createSnapshotAction);

if (centralToolbarVisible) {
// add actions on center part of toolbar
@@ -233,10 +210,6 @@ private void prepareActions(MachineLocalizationConstant localizationConstant,
machineToolbarGroup.add(executeToolbarGroup);
}

// add actions on right part of toolbar
final DefaultActionGroup rightToolbarGroup = (DefaultActionGroup)actionManager.getAction(GROUP_RIGHT_TOOLBAR);
rightToolbarGroup.add(switchPerspectiveAction);

// add group for list of machines
final DefaultActionGroup machinesList = new DefaultActionGroup(GROUP_MACHINES_DROPDOWN, true, actionManager);
actionManager.registerAction(GROUP_MACHINES_LIST, machinesList);
@@ -261,5 +234,4 @@ private void prepareActions(MachineLocalizationConstant localizationConstant,

iconRegistry.registerIcon(new Icon("che.machine.icon", machineResources.devMachine()));
}

}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@
import org.eclipse.che.ide.extension.machine.client.MachineResources;
import org.eclipse.che.ide.ui.radiobuttongroup.RadioButtonGroup;

import static org.eclipse.che.ide.extension.machine.client.perspective.OperationsPerspective.OPERATIONS_PERSPECTIVE_ID;
import static org.eclipse.che.ide.workspace.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID;

/**
@@ -65,14 +64,6 @@ public void onClick(ClickEvent event) {
}
});

radioButtonGroup.addButton("", localizationConstant.perspectiveOperationsActionTooltip(), resources.operationsPerspective(),
new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
perspectiveManager.setPerspectiveId(OPERATIONS_PERSPECTIVE_ID);
}
});

radioButtonGroup.selectButton(0);
}

Loading

0 comments on commit a81ecdc

Please sign in to comment.