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

@@ -3,10 +3,8 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { Event, Emitter } from 'vs/base/common/event';
import { IThemeService, ITheme, DARK } from 'vs/platform/theme/common/themeService';
import { IThemeService, ITheme, DARK, IIconTheme } from 'vs/platform/theme/common/themeService';
import { Color } from 'vs/base/common/color';
export class TestTheme implements ITheme {
@@ -14,12 +12,12 @@ export class TestTheme implements ITheme {
constructor(private colors: { [id: string]: string; } = {}, public type = DARK) {
}
getColor(color: string, useDefault?: boolean): Color {
getColor(color: string, useDefault?: boolean): Color | null {
let value = this.colors[color];
if (value) {
return Color.fromHex(value);
}
return void 0;
return null;
}
defines(color: string): boolean {
@@ -27,14 +25,23 @@ export class TestTheme implements ITheme {
}
}
export class TestIconTheme implements IIconTheme {
hasFileIcons = false;
hasFolderIcons = false;
hidesExplorerArrows = false;
}
export class TestThemeService implements IThemeService {
_serviceBrand: any;
_theme: ITheme;
_iconTheme: IIconTheme;
_onThemeChange = new Emitter<ITheme>();
_onIconThemeChange = new Emitter<IIconTheme>();
constructor(theme = new TestTheme()) {
constructor(theme = new TestTheme(), iconTheme = new TestIconTheme()) {
this._theme = theme;
this._iconTheme = iconTheme;
}
getTheme(): ITheme {
@@ -53,4 +60,12 @@ export class TestThemeService implements IThemeService {
public get onThemeChange(): Event<ITheme> {
return this._onThemeChange.event;
}
getIconTheme(): IIconTheme {
return this._iconTheme;
}
public get onIconThemeChange(): Event<IIconTheme> {
return this._onIconThemeChange.event;
}
}