Merge from master

This commit is contained in:
Raj Musuku
2019-02-21 17:56:04 -08:00
parent 5a146e34fa
commit 666ae11639
11482 changed files with 119352 additions and 255574 deletions

View File

@@ -2,9 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { TPromise } from 'vs/base/common/winjs.base';
import { IViewlet } from 'vs/workbench/common/viewlet';
import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
import { Event } from 'vs/base/common/event';
@@ -24,7 +22,7 @@ export interface IViewletService {
/**
* Opens a viewlet with the given identifier and pass keyboard focus to it if specified.
*/
openViewlet(id: string, focus?: boolean): TPromise<IViewlet>;
openViewlet(id: string, focus?: boolean): Thenable<IViewlet>;
/**
* Returns the current active viewlet or null if none.
@@ -41,6 +39,11 @@ export interface IViewletService {
*/
getViewlet(id: string): ViewletDescriptor;
/**
* Returns all enabled viewlets following the default order (Explorer - Search - SCM - Debug - Extensions)
*/
getAllViewlets(): ViewletDescriptor[];
/**
* Returns all enabled viewlets
*/

View File

@@ -2,9 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { TPromise } from 'vs/base/common/winjs.base';
import { IViewlet } from 'vs/workbench/common/viewlet';
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { Event, Emitter } from 'vs/base/common/event';
@@ -70,9 +68,9 @@ export class ViewletService extends Disposable implements IViewletService {
}
}
openViewlet(id: string, focus?: boolean): TPromise<IViewlet> {
openViewlet(id: string, focus?: boolean): Thenable<IViewlet> {
if (this.getViewlet(id)) {
return this.sidebarPart.openViewlet(id, focus);
return Promise.resolve(this.sidebarPart.openViewlet(id, focus));
}
return this.extensionService.whenInstalledExtensionsRegistered()
.then(() => {
@@ -92,7 +90,7 @@ export class ViewletService extends Disposable implements IViewletService {
.filter(v => v.enabled);
}
private getAllViewlets(): ViewletDescriptor[] {
getAllViewlets(): ViewletDescriptor[] {
return this.viewletRegistry.getViewlets()
.sort((v1, v2) => v1.order - v2.order);
}