after save workspace: remove untitled WS and add to recent

This commit is contained in:
Martin Aeschlimann
2019-01-25 11:46:26 +01:00
parent 9226fffe05
commit 2331b990f2
8 changed files with 46 additions and 151 deletions
@@ -32,6 +32,11 @@ export class WorkspacesChannel implements IServerChannel {
return this.service.createUntitledWorkspace(folders);
}
case 'deleteIfUntitledWorkspace': {
const rawWorkspace: IWorkspaceIdentifier = arg;
// TODO aeschli: resolve IWorkspaceIdentifier when switching to URI
return this.service.deleteIfUntitledWorkspace(rawWorkspace);
}
}
throw new Error(`Call not found: ${command}`);
@@ -47,4 +52,8 @@ export class WorkspacesChannelClient implements IWorkspacesService {
createUntitledWorkspace(folders?: IWorkspaceFolderCreationData[]): Promise<IWorkspaceIdentifier> {
return this.channel.call('createUntitledWorkspace', folders);
}
deleteIfUntitledWorkspace(workspace: IWorkspaceIdentifier): Promise<void> {
return this.channel.call('deleteIfUntitledWorkspace', workspace);
}
}