Skip to content

Commit

Permalink
Workspace folders API
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliy-guliy committed Jun 21, 2018
1 parent c53854c commit 1821b19
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
5 changes: 1 addition & 4 deletions packages/plugin-ext/src/plugin/plugin-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export function createAPI(rpc: RPCProtocol): typeof theia {
return statusBarMessageRegistryExt.createStatusBarItem(alignment, priority);
},
createOutputChannel(name: string): theia.OutputChannel {
return outputChannelRegistryExt.createOutputChannel(name);
return outputChannelRegistryExt.createOutputChannel(name);
},

get state(): theia.WindowState {
Expand All @@ -154,9 +154,6 @@ export function createAPI(rpc: RPCProtocol): typeof theia {
};

const workspace: typeof theia.workspace = {
get rootPath(): string | undefined {
return workspaceExt.rootPath;
},
get workspaceFolders(): theia.WorkspaceFolder[] | undefined {
return workspaceExt.workspaceFolders;
},
Expand Down
8 changes: 0 additions & 8 deletions packages/plugin-ext/src/plugin/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ export class WorkspaceExtImpl implements WorkspaceExt {
return this.folders;
}

get rootPath(): string | undefined {
if (this.workspaceFolders) {
return this.workspaceFolders[0].uri.path;
}

return undefined;
}

get name(): string | undefined {
if (this.workspaceFolders) {
return new Path(this.workspaceFolders[0].uri.path).base;
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2141,16 +2141,6 @@ declare module '@theia/plugin' {
* the editor-process so that they should be always used instead of nodejs-equivalents.
*/
export namespace workspace {
/**
* ~~The folder that is open in the editor. `undefined` when no folder
* has been opened.~~
*
* @deprecated Use [`workspaceFolders`](#workspace.workspaceFolders) instead.
*
* @readonly
*/
export let rootPath: string | undefined;

/**
* List of workspace folders or `undefined` when no folder is open.
* *Note* that the first entry corresponds to the value of `rootPath`.
Expand Down

0 comments on commit 1821b19

Please sign in to comment.