diff --git a/build/monaco/monaco.d.ts.recipe b/build/monaco/monaco.d.ts.recipe index 35051652e25..b1bdee07b02 100644 --- a/build/monaco/monaco.d.ts.recipe +++ b/build/monaco/monaco.d.ts.recipe @@ -70,6 +70,7 @@ export interface ICommandHandler { #include(vs/platform/markers/common/markers): IMarkerData #include(vs/editor/browser/standalone/colorizer): IColorizerOptions, IColorizerElementOptions #include(vs/base/common/scrollable): ScrollbarVisibility +#include(vs/platform/theme/common/themeService): ThemeColor #includeAll(vs/editor/common/editorCommon;IMode=>languages.IMode;LanguageIdentifier=>languages.LanguageIdentifier;editorOptions.=>): ISelection, IScrollEvent #includeAll(vs/editor/common/model/textModelEvents): #includeAll(vs/editor/common/controller/cursorEvents): diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index f36e32b73fa..35f14e0b0e4 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -9,11 +9,11 @@ import URI from 'vs/base/common/uri'; import * as dom from 'vs/base/browser/dom'; import { IDecorationRenderOptions, IModelDecorationOptions, IModelDecorationOverviewRulerOptions, IThemeDecorationRenderOptions, - IContentDecorationRenderOptions, OverviewRulerLane, TrackedRangeStickiness, ThemeColor, isThemeColor + IContentDecorationRenderOptions, OverviewRulerLane, TrackedRangeStickiness, isThemeColor } from 'vs/editor/common/editorCommon'; import { AbstractCodeEditorService } from 'vs/editor/common/services/abstractCodeEditorService'; import { IDisposable, dispose as disposeAll } from 'vs/base/common/lifecycle'; -import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; +import { IThemeService, ITheme, ThemeColor } from 'vs/platform/theme/common/themeService'; export class CodeEditorServiceImpl extends AbstractCodeEditorService { diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index 3c4f0a6c3ab..081179d2303 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -16,6 +16,7 @@ import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { editorOverviewRulerBorder, editorCursor } from 'vs/editor/common/view/editorColorRegistry'; import { Color } from 'vs/base/common/color'; +import { ThemeColor } from "vs/platform/theme/common/themeService"; export class DecorationsOverviewRuler extends ViewPart { @@ -191,7 +192,7 @@ export class DecorationsOverviewRuler extends ViewPart { return zones; } - private resolveRulerColor(color: string | editorCommon.ThemeColor): string { + private resolveRulerColor(color: string | ThemeColor): string { if (editorCommon.isThemeColor(color)) { let c = this._context.theme.getColor(color.id) || Color.transparent; return c.toString(); diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index ce257401e3e..5a70f7580c1 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -24,6 +24,7 @@ import { import * as editorOptions from 'vs/editor/common/config/editorOptions'; import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { ICursors, CursorConfiguration } from 'vs/editor/common/controller/cursorCommon'; +import { ThemeColor } from "vs/platform/theme/common/themeService"; /** * Vertical Lane in the overview ruler of the editor. @@ -1622,10 +1623,6 @@ export interface IEditorContribution { restoreViewState?(state: any): void; } -export interface ThemeColor { - id: string; -} - /** * @internal */ diff --git a/src/vs/editor/common/model/textModelWithDecorations.ts b/src/vs/editor/common/model/textModelWithDecorations.ts index 84380b69ef3..57e058c6236 100644 --- a/src/vs/editor/common/model/textModelWithDecorations.ts +++ b/src/vs/editor/common/model/textModelWithDecorations.ts @@ -16,6 +16,7 @@ import { INewMarker, TextModelWithMarkers } from 'vs/editor/common/model/textMod import { LanguageIdentifier } from 'vs/editor/common/modes'; import { ITextSource, IRawTextSource } from 'vs/editor/common/model/textSource'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; +import { ThemeColor } from "vs/platform/theme/common/themeService"; export const ClassName = { EditorWarningDecoration: 'greensquiggly', @@ -840,9 +841,9 @@ function cleanClassName(className: string): string { } export class ModelDecorationOverviewRulerOptions implements editorCommon.IModelDecorationOverviewRulerOptions { - readonly color: string | editorCommon.ThemeColor; - readonly darkColor: string | editorCommon.ThemeColor; - readonly hcColor: string | editorCommon.ThemeColor; + readonly color: string | ThemeColor; + readonly darkColor: string | ThemeColor; + readonly hcColor: string | ThemeColor; readonly position: editorCommon.OverviewRulerLane; constructor(options: editorCommon.IModelDecorationOverviewRulerOptions) { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 6a801403e30..91b3303a2d0 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1052,6 +1052,10 @@ declare module monaco.editor { Visible = 3, } + export interface ThemeColor { + id: string; + } + /** * Vertical Lane in the overview ruler of the editor. */ @@ -2159,10 +2163,6 @@ declare module monaco.editor { restoreViewState?(state: any): void; } - export interface ThemeColor { - id: string; - } - export interface ICommonCodeEditor extends IEditor { /** * An event emitted when the content of the current model has changed. diff --git a/src/vs/platform/statusbar/common/statusbar.ts b/src/vs/platform/statusbar/common/statusbar.ts index d42f792b801..a68317576e8 100644 --- a/src/vs/platform/statusbar/common/statusbar.ts +++ b/src/vs/platform/statusbar/common/statusbar.ts @@ -7,7 +7,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { ThemeColor } from 'vs/editor/common/editorCommon'; +import { ThemeColor } from "vs/platform/theme/common/themeService"; export var IStatusbarService = createDecorator('statusbarService'); diff --git a/src/vs/platform/theme/common/themeService.ts b/src/vs/platform/theme/common/themeService.ts index 10305538863..1eaf2d391c2 100644 --- a/src/vs/platform/theme/common/themeService.ts +++ b/src/vs/platform/theme/common/themeService.ts @@ -13,6 +13,10 @@ import Event, { Emitter } from 'vs/base/common/event'; export let IThemeService = createDecorator('themeService'); +export interface ThemeColor { + id: string; +} + // base themes export const DARK: ThemeType = 'dark'; export const LIGHT: ThemeType = 'light'; diff --git a/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts b/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts index d16e17cda09..1edba109555 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts @@ -7,7 +7,7 @@ import { IStatusbarService, StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; import { IDisposable } from 'vs/base/common/lifecycle'; import { MainThreadStatusBarShape } from '../node/extHost.protocol'; -import { ThemeColor } from 'vs/editor/common/editorCommon'; +import { ThemeColor } from "vs/platform/theme/common/themeService"; export class MainThreadStatusBar extends MainThreadStatusBarShape { private mapIdToDisposable: { [id: number]: IDisposable }; diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 0cd7ab1785a..2b30bf1c2ae 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -45,6 +45,7 @@ import { IRange } from 'vs/editor/common/core/range'; import { ISelection, Selection } from 'vs/editor/common/core/selection'; import { ITreeItem } from 'vs/workbench/parts/views/common/views'; +import { ThemeColor } from "vs/platform/theme/common/themeService"; export interface IEnvironment { enableProposedApiForAll: boolean; @@ -274,7 +275,7 @@ export abstract class MainThreadQuickOpenShape { } export abstract class MainThreadStatusBarShape { - $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string | editorCommon.ThemeColor, alignment: MainThreadStatusBarAlignment, priority: number): void { throw ni(); } + $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string | ThemeColor, alignment: MainThreadStatusBarAlignment, priority: number): void { throw ni(); } $dispose(id: number) { throw ni(); } }