workspaces.ts 1.2 KB
Newer Older
B
Benjamin Pasero 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

'use strict';

import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { TPromise } from 'vs/base/common/winjs.base';

export const IWorkspacesMainService = createDecorator<IWorkspacesMainService>('workspacesMainService');
export const IWorkspacesService = createDecorator<IWorkspacesService>('workspacesService');

B
Benjamin Pasero 已提交
14 15
export const WORKSPACE_EXTNAME = '.code';

16 17
export interface IWorkspaceIdentifier {
	id: string;
18
	configPath: string;
B
Benjamin Pasero 已提交
19 20 21 22 23 24 25 26 27 28
}

export interface IStoredWorkspace {
	id: string;
	folders: string[];
}

export interface IWorkspacesMainService extends IWorkspacesService {
	_serviceBrand: any;

29
	resolveWorkspaceSync(path: string): IWorkspaceIdentifier;
B
Benjamin Pasero 已提交
30 31 32 33 34
}

export interface IWorkspacesService {
	_serviceBrand: any;

35
	createWorkspace(folders?: string[]): TPromise<IWorkspaceIdentifier>;
B
Benjamin Pasero 已提交
36
}