Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove machine perspective #3689

Merged
merged 2 commits into from
Jan 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand All @@ -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);

Expand All @@ -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);

Expand All @@ -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
Expand All @@ -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);
Expand All @@ -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
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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);
}

Expand Down
Loading