/* tslint:disable */ import { URI } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri'; import { IWorkspaceFolderData, IWorkspaceData } from '../generated-model'; // src/vs/platform/workspaces/common/workspace.ts export const enum WorkbenchState { EMPTY = 1, FOLDER, WORKSPACE } export interface IWorkspaceFoldersChangeEvent { added: IWorkspaceFolder[]; removed: IWorkspaceFolder[]; changed: IWorkspaceFolder[]; } export namespace IWorkspace { export function isIWorkspace(thing: any): thing is IWorkspace { return thing && typeof thing === 'object' && typeof (thing as IWorkspace).id === 'string' && Array.isArray((thing as IWorkspace).folders); } } export interface IWorkspace extends IWorkspaceData{ /** * the unique identifier of the workspace. */ readonly id: string; /** * Folders in the workspace. */ readonly folders: IWorkspaceFolder[]; /** * the location of the workspace configuration */ readonly configuration?: URI | null; } // export interface IWorkspaceFolderData { // /** // * The associated URI for this workspace folder. // */ // readonly uri: URI; // /** // * The name of this workspace folder. Defaults to // * the basename its [uri-path](#Uri.path) // */ // readonly name: string; // /** // * The ordinal number of this workspace folder. // */ // readonly index: number; // } // since IWorkspaceFolder interface and namespace should exist in same file export namespace IWorkspaceFolder { export function isIWorkspaceFolder(thing: any): thing is IWorkspaceFolder { return thing && typeof thing === 'object' && URI.isUri((thing as IWorkspaceFolder).uri) && typeof (thing as IWorkspaceFolder).name === 'string' && typeof (thing as IWorkspaceFolder).toResource === 'function'; } } export interface IWorkspaceFolder extends IWorkspaceFolderData { /** * Given workspace folder relative path, returns the resource with the absolute path. */ toResource?: (relativePath: string) => URI; }