提交 482dc607 编写于 作者: S Sandeep Somavarapu

Fix tests

上级 79cc26ac
......@@ -116,7 +116,7 @@ function openWorkbench(configuration: IWindowConfiguration): TPromise<void> {
}
function createAndInitializeWorkspaceService(configuration: IWindowConfiguration, environmentService: EnvironmentService): TPromise<WorkspaceService> {
const folderUri = configuration.folderPath ? uri.file(configuration.folderPath) /* TODO: Change to URI.path parsing once main sends URIs*/ : null;
const folderUri = configuration.folderPath ? uri.file(configuration.folderPath) /* TODO:Sandy Change to URI.parse once main sends URIs*/ : null;
return validateFolderUri(folderUri, configuration.verbose).then(validatedFolderUri => {
const workspaceService = new WorkspaceService(environmentService);
......
......@@ -132,16 +132,16 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat
public isCurrentWorkspace(workspaceIdentifier: ISingleFolderWorkspaceIdentifier | IWorkspaceIdentifier): boolean {
switch (this.getWorkbenchState()) {
case WorkbenchState.FOLDER:
return isSingleFolderWorkspaceIdentifier(workspaceIdentifier) && isEqual(this.workspace.folders[0].uri, this.toSingleFolderWorkspaceIdentifier2(workspaceIdentifier), this.workspace.folders[0].uri.scheme !== Schemas.file || !isLinux);
return isSingleFolderWorkspaceIdentifier(workspaceIdentifier) && isEqual(this.workspace.folders[0].uri, this.toUri(workspaceIdentifier), this.workspace.folders[0].uri.scheme !== Schemas.file || !isLinux);
case WorkbenchState.WORKSPACE:
return isWorkspaceIdentifier(workspaceIdentifier) && this.workspace.id === workspaceIdentifier.id;
}
return false;
}
private toSingleFolderWorkspaceIdentifier2(folderIdentifier: ISingleFolderWorkspaceIdentifier): URI {
const uri = URI.parse(folderIdentifier);
return uri.scheme ? uri : URI.file(folderIdentifier);
private toUri(folderIdentifier: ISingleFolderWorkspaceIdentifier): URI {
// TODO:Sandy Change to URI.parse parsing once main sends URIs
return URI.file(folderIdentifier);
}
private doUpdateFolders(foldersToAdd: IWorkspaceFolderCreationData[], foldersToRemove: URI[], index?: number): TPromise<void> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册