@@ -26,7 +26,6 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
2626import { IWindowsMainService , IOpenConfiguration , IWindowsCountChangedEvent , ICodeWindow , IWindowState as ISingleWindowState , WindowMode } from 'vs/platform/windows/electron-main/windows' ;
2727import { IHistoryMainService } from 'vs/platform/history/common/history' ;
2828import { IProcessEnvironment , isLinux , isMacintosh , isWindows } from 'vs/base/common/platform' ;
29- import { TPromise } from 'vs/base/common/winjs.base' ;
3029import { IWorkspacesMainService , IWorkspaceIdentifier , WORKSPACE_FILTER , IWorkspaceFolderCreationData , ISingleFolderWorkspaceIdentifier , isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces' ;
3130import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
3231import { mnemonicButtonLabel } from 'vs/base/common/labels' ;
@@ -1489,15 +1488,15 @@ export class WindowsManager implements IWindowsMainService {
14891488 } ) ;
14901489 }
14911490
1492- saveAndEnterWorkspace ( win : ICodeWindow , path : string ) : TPromise < IEnterWorkspaceResult > {
1491+ saveAndEnterWorkspace ( win : ICodeWindow , path : string ) : Thenable < IEnterWorkspaceResult > {
14931492 return this . workspacesManager . saveAndEnterWorkspace ( win , path ) . then ( result => this . doEnterWorkspace ( win , result ) ) ;
14941493 }
14951494
1496- enterWorkspace ( win : ICodeWindow , path : string ) : TPromise < IEnterWorkspaceResult > {
1495+ enterWorkspace ( win : ICodeWindow , path : string ) : Thenable < IEnterWorkspaceResult > {
14971496 return this . workspacesManager . enterWorkspace ( win , path ) . then ( result => this . doEnterWorkspace ( win , result ) ) ;
14981497 }
14991498
1500- createAndEnterWorkspace ( win : ICodeWindow , folders ?: IWorkspaceFolderCreationData [ ] , path ?: string ) : TPromise < IEnterWorkspaceResult > {
1499+ createAndEnterWorkspace ( win : ICodeWindow , folders ?: IWorkspaceFolderCreationData [ ] , path ?: string ) : Thenable < IEnterWorkspaceResult > {
15011500 return this . workspacesManager . createAndEnterWorkspace ( win , folders , path ) . then ( result => this . doEnterWorkspace ( win , result ) ) ;
15021501 }
15031502
@@ -1853,7 +1852,7 @@ class Dialogs {
18531852 } ) ;
18541853 }
18551854
1856- private getFileOrFolderUris ( options : IInternalNativeOpenDialogOptions ) : TPromise < URI [ ] > {
1855+ private getFileOrFolderUris ( options : IInternalNativeOpenDialogOptions ) : Thenable < URI [ ] > {
18571856
18581857 // Ensure dialog options
18591858 if ( ! options . dialogOptions ) {
@@ -1985,15 +1984,15 @@ class WorkspacesManager {
19851984 ) {
19861985 }
19871986
1988- saveAndEnterWorkspace ( window : ICodeWindow , path : string ) : TPromise < IEnterWorkspaceResult > {
1987+ saveAndEnterWorkspace ( window : ICodeWindow , path : string ) : Thenable < IEnterWorkspaceResult > {
19891988 if ( ! window || ! window . win || ! window . isReady || ! window . openedWorkspace || ! path || ! this . isValidTargetWorkspacePath ( window , path ) ) {
19901989 return Promise . resolve ( null ) ; // return early if the window is not ready or disposed or does not have a workspace
19911990 }
19921991
19931992 return this . doSaveAndOpenWorkspace ( window , window . openedWorkspace , path ) ;
19941993 }
19951994
1996- enterWorkspace ( window : ICodeWindow , path : string ) : TPromise < IEnterWorkspaceResult > {
1995+ enterWorkspace ( window : ICodeWindow , path : string ) : Thenable < IEnterWorkspaceResult > {
19971996 if ( ! window || ! window . win || ! window . isReady ) {
19981997 return Promise . resolve ( null ) ; // return early if the window is not ready or disposed
19991998 }
@@ -2010,7 +2009,7 @@ class WorkspacesManager {
20102009
20112010 }
20122011
2013- createAndEnterWorkspace ( window : ICodeWindow , folders ?: IWorkspaceFolderCreationData [ ] , path ?: string ) : TPromise < IEnterWorkspaceResult > {
2012+ createAndEnterWorkspace ( window : ICodeWindow , folders ?: IWorkspaceFolderCreationData [ ] , path ?: string ) : Thenable < IEnterWorkspaceResult > {
20142013 if ( ! window || ! window . win || ! window . isReady ) {
20152014 return Promise . resolve ( null ) ; // return early if the window is not ready or disposed
20162015 }
@@ -2027,7 +2026,7 @@ class WorkspacesManager {
20272026
20282027 }
20292028
2030- private isValidTargetWorkspacePath ( window : ICodeWindow , path ?: string ) : TPromise < boolean > {
2029+ private isValidTargetWorkspacePath ( window : ICodeWindow , path ?: string ) : Thenable < boolean > {
20312030 if ( ! path ) {
20322031 return Promise . resolve ( true ) ;
20332032 }
@@ -2053,8 +2052,8 @@ class WorkspacesManager {
20532052 return Promise . resolve ( true ) ; // OK
20542053 }
20552054
2056- private doSaveAndOpenWorkspace ( window : ICodeWindow , workspace : IWorkspaceIdentifier , path ?: string ) : TPromise < IEnterWorkspaceResult > {
2057- let savePromise : TPromise < IWorkspaceIdentifier > ;
2055+ private doSaveAndOpenWorkspace ( window : ICodeWindow , workspace : IWorkspaceIdentifier , path ?: string ) : Thenable < IEnterWorkspaceResult > {
2056+ let savePromise : Thenable < IWorkspaceIdentifier > ;
20582057 if ( path ) {
20592058 savePromise = this . workspacesMainService . saveWorkspace ( workspace , path ) ;
20602059 } else {
@@ -2099,7 +2098,7 @@ class WorkspacesManager {
20992098 } ) ;
21002099 }
21012100
2102- promptToSaveUntitledWorkspace ( window : ICodeWindow , workspace : IWorkspaceIdentifier ) : TPromise < boolean > {
2101+ promptToSaveUntitledWorkspace ( window : ICodeWindow , workspace : IWorkspaceIdentifier ) : Thenable < boolean > {
21032102 enum ConfirmResult {
21042103 SAVE ,
21052104 DONT_SAVE ,
0 commit comments