Skip to content

Commit

Permalink
Add ability to handle vscode.openFolder command
Browse files Browse the repository at this point in the history
Signed-off-by: Tomer Epstein <tomer.epstein@sap.com>
  • Loading branch information
tomer-epstein authored and amiramw committed Jan 22, 2020
1 parent b45f761 commit 9fb6351
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { ApplicationShellMouseTracker } from '@theia/core/lib/browser/shell/appl
import { CommandService } from '@theia/core/lib/common/command';
import TheiaURI from '@theia/core/lib/common/uri';
import { EditorManager } from '@theia/editor/lib/browser';
import { TextDocumentShowOptions, IOpenFolderAPICommandOptions } from '@theia/plugin-ext/lib/common/plugin-api-rpc-model';
import { TextDocumentShowOptions } from '@theia/plugin-ext/lib/common/plugin-api-rpc-model';
import { DocumentsMainImpl } from '@theia/plugin-ext/lib/main/browser/documents-main';
import { createUntitledResource } from '@theia/plugin-ext/lib/main/browser/editor/untitled-resource';
import { toDocumentSymbol } from '@theia/plugin-ext/lib/plugin/type-converters';
Expand Down Expand Up @@ -108,6 +108,12 @@ export class PluginVscodeCommandsContribution implements CommandContribution {
}
});

interface IOpenFolderAPICommandOptions {
forceNewWindow?: boolean;
forceReuseWindow?: boolean;
noRecentEntry?: boolean;
}

commands.registerCommand(VscodeCommands.OPEN_FOLDER, {
isVisible: () => false,
execute: async (resource?: URI, arg: boolean | IOpenFolderAPICommandOptions = {}) => {
Expand Down
6 changes: 0 additions & 6 deletions packages/plugin-ext/src/common/plugin-api-rpc-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,12 +434,6 @@ export interface WorkspaceFolder {
index: number;
}

export interface IOpenFolderAPICommandOptions {
forceNewWindow?: boolean;
forceReuseWindow?: boolean;
noRecentEntry?: boolean;
}

export interface Breakpoint {
readonly id: string;
readonly enabled: boolean;
Expand Down

0 comments on commit 9fb6351

Please sign in to comment.