Skip to content

Commit

Permalink
Implemented vscode navigateBack, navigateForward, and navigateToLastE…
Browse files Browse the repository at this point in the history
…ditLocation commands

Signed-off-by: Daniel Ku <daniel.ku@ericsson.com>
  • Loading branch information
danieltomasku authored and colin-grant-work committed Jan 20, 2021
1 parent 4a3e133 commit 885c679
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
import { ApplicationShellMouseTracker } from '@theia/core/lib/browser/shell/application-shell-mouse-tracker';
import { CommandService } from '@theia/core/lib/common/command';
import TheiaURI from '@theia/core/lib/common/uri';
import { EditorManager } from '@theia/editor/lib/browser';
import { EditorManager, EditorCommands } from '@theia/editor/lib/browser';
import {
CodeEditorWidgetUtil
} from '@theia/plugin-ext/lib/main/browser/menus/menus-contribution-handler';
Expand Down Expand Up @@ -364,6 +364,15 @@ export class PluginVscodeCommandsContribution implements CommandContribution {
commands.registerCommand({ id: 'workbench.action.previousEditor' }, {
execute: () => this.shell.activatePreviousTab()
});
commands.registerCommand({ id: 'workbench.action.navigateBack' }, {
execute: () => commands.executeCommand(EditorCommands.GO_BACK.id)
});
commands.registerCommand({ id: 'workbench.action.navigateForward' }, {
execute: () => commands.executeCommand(EditorCommands.GO_FORWARD.id)
});
commands.registerCommand({ id: 'workbench.action.navigateToLastEditLocation' }, {
execute: () => commands.executeCommand(EditorCommands.GO_LAST_EDIT.id)
});

commands.registerCommand({ id: 'openInTerminal' }, {
execute: (resource: URI) => this.terminalContribution.openInTerminal(new TheiaURI(resource.toString()))
Expand Down

0 comments on commit 885c679

Please sign in to comment.