mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 09:35:41 -05:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
@@ -13,6 +13,7 @@ import { renderViewLine2 as renderViewLine, RenderLineInput } from 'vs/editor/co
|
||||
import { LineTokens, IViewLineTokens } from 'vs/editor/common/core/lineTokens';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService';
|
||||
import { ViewLineRenderingData } from 'vs/editor/common/viewModel/viewModel';
|
||||
|
||||
export interface IColorizerOptions {
|
||||
tabSize?: number;
|
||||
@@ -93,11 +94,14 @@ export class Colorizer {
|
||||
});
|
||||
}
|
||||
|
||||
public static colorizeLine(line: string, mightContainRTL: boolean, tokens: IViewLineTokens, tabSize: number = 4): string {
|
||||
public static colorizeLine(line: string, mightContainNonBasicASCII: boolean, mightContainRTL: boolean, tokens: IViewLineTokens, tabSize: number = 4): string {
|
||||
const isBasicASCII = ViewLineRenderingData.isBasicASCII(line, mightContainNonBasicASCII);
|
||||
const containsRTL = ViewLineRenderingData.containsRTL(line, isBasicASCII, mightContainRTL);
|
||||
let renderResult = renderViewLine(new RenderLineInput(
|
||||
false,
|
||||
line,
|
||||
mightContainRTL,
|
||||
isBasicASCII,
|
||||
containsRTL,
|
||||
0,
|
||||
tokens,
|
||||
[],
|
||||
@@ -116,7 +120,7 @@ export class Colorizer {
|
||||
model.forceTokenization(lineNumber);
|
||||
let tokens = model.getLineTokens(lineNumber);
|
||||
let inflatedTokens = tokens.inflate();
|
||||
return this.colorizeLine(content, model.mightContainRTL(), inflatedTokens, tabSize);
|
||||
return this.colorizeLine(content, model.mightContainNonBasicASCII(), model.mightContainRTL(), inflatedTokens, tabSize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,10 +147,13 @@ function _fakeColorize(lines: string[], tabSize: number): string {
|
||||
tokens[0] = line.length;
|
||||
const lineTokens = new LineTokens(tokens, line);
|
||||
|
||||
const isBasicASCII = ViewLineRenderingData.isBasicASCII(line, /* check for basic ASCII */true);
|
||||
const containsRTL = ViewLineRenderingData.containsRTL(line, isBasicASCII, /* check for RTL */true);
|
||||
let renderResult = renderViewLine(new RenderLineInput(
|
||||
false,
|
||||
line,
|
||||
false,
|
||||
isBasicASCII,
|
||||
containsRTL,
|
||||
0,
|
||||
lineTokens,
|
||||
[],
|
||||
@@ -174,10 +181,13 @@ function _actualColorize(lines: string[], tabSize: number, tokenizationSupport:
|
||||
let tokenizeResult = tokenizationSupport.tokenize2(line, state, 0);
|
||||
LineTokens.convertToEndOffset(tokenizeResult.tokens, line.length);
|
||||
let lineTokens = new LineTokens(tokenizeResult.tokens, line);
|
||||
const isBasicASCII = ViewLineRenderingData.isBasicASCII(line, /* check for basic ASCII */true);
|
||||
const containsRTL = ViewLineRenderingData.containsRTL(line, isBasicASCII, /* check for RTL */true);
|
||||
let renderResult = renderViewLine(new RenderLineInput(
|
||||
false,
|
||||
line,
|
||||
true/* check for RTL */,
|
||||
isBasicASCII,
|
||||
containsRTL,
|
||||
0,
|
||||
lineTokens.inflate(),
|
||||
[],
|
||||
|
||||
@@ -14,7 +14,7 @@ import { registerEditorContribution, IActionOptions, EditorAction } from 'vs/edi
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
import { ModelDecorationOptions } from 'vs/editor/common/model/textModel';
|
||||
import { IModelDecorationsChangeAccessor, IModelDeltaDecoration } from 'vs/editor/common/model';
|
||||
import { IModelDeltaDecoration } from 'vs/editor/common/model';
|
||||
|
||||
export interface IQuickOpenControllerOpts {
|
||||
inputAriaLabel: string;
|
||||
@@ -100,31 +100,27 @@ export class QuickOpenController implements editorCommon.IEditorContribution, ID
|
||||
});
|
||||
|
||||
public decorateLine(range: Range, editor: ICodeEditor): void {
|
||||
editor.changeDecorations((changeAccessor: IModelDecorationsChangeAccessor) => {
|
||||
const oldDecorations: string[] = [];
|
||||
if (this.rangeHighlightDecorationId) {
|
||||
oldDecorations.push(this.rangeHighlightDecorationId);
|
||||
this.rangeHighlightDecorationId = null;
|
||||
const oldDecorations: string[] = [];
|
||||
if (this.rangeHighlightDecorationId) {
|
||||
oldDecorations.push(this.rangeHighlightDecorationId);
|
||||
this.rangeHighlightDecorationId = null;
|
||||
}
|
||||
|
||||
const newDecorations: IModelDeltaDecoration[] = [
|
||||
{
|
||||
range: range,
|
||||
options: QuickOpenController._RANGE_HIGHLIGHT_DECORATION
|
||||
}
|
||||
];
|
||||
|
||||
const newDecorations: IModelDeltaDecoration[] = [
|
||||
{
|
||||
range: range,
|
||||
options: QuickOpenController._RANGE_HIGHLIGHT_DECORATION
|
||||
}
|
||||
];
|
||||
|
||||
const decorations = changeAccessor.deltaDecorations(oldDecorations, newDecorations);
|
||||
this.rangeHighlightDecorationId = decorations[0];
|
||||
});
|
||||
const decorations = editor.deltaDecorations(oldDecorations, newDecorations);
|
||||
this.rangeHighlightDecorationId = decorations[0];
|
||||
}
|
||||
|
||||
public clearDecorations(): void {
|
||||
if (this.rangeHighlightDecorationId) {
|
||||
this.editor.changeDecorations((changeAccessor: IModelDecorationsChangeAccessor) => {
|
||||
changeAccessor.deltaDecorations([this.rangeHighlightDecorationId], []);
|
||||
this.rangeHighlightDecorationId = null;
|
||||
});
|
||||
this.editor.deltaDecorations([this.rangeHighlightDecorationId], []);
|
||||
this.rangeHighlightDecorationId = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.quick-open-widget {
|
||||
.monaco-quick-open-widget {
|
||||
font-size: 13px;
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { $, Dimension } from 'vs/base/browser/builder';
|
||||
import { QuickOpenModel } from 'vs/base/parts/quickopen/browser/quickOpenModel';
|
||||
import { QuickOpenWidget } from 'vs/base/parts/quickopen/browser/quickOpenWidget';
|
||||
import { IAutoFocus } from 'vs/base/parts/quickopen/common/quickOpen';
|
||||
@@ -13,6 +12,7 @@ import { attachQuickOpenStyler } from 'vs/platform/theme/common/styler';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { foreground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { Dimension } from 'vs/base/browser/dom';
|
||||
|
||||
export interface IQuickOpenEditorWidgetOptions {
|
||||
inputAriaLabel: string;
|
||||
@@ -37,7 +37,7 @@ export class QuickOpenEditorWidget implements IOverlayWidget {
|
||||
}
|
||||
|
||||
private create(onOk: () => void, onCancel: () => void, onType: (value: string) => void, configuration: IQuickOpenEditorWidgetOptions): void {
|
||||
this.domNode = $().div().getHTMLElement();
|
||||
this.domNode = document.createElement('div');
|
||||
|
||||
this.quickOpenWidget = new QuickOpenWidget(
|
||||
this.domNode,
|
||||
|
||||
@@ -3,93 +3,93 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.quick-open-widget {
|
||||
.monaco-quick-open-widget {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon,
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon,
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {
|
||||
background-image: url('symbol-sprite.svg');
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor { background-position: 0 -4px; }
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field,
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable { background-position: -22px -4px; }
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class { background-position: -43px -3px; }
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface { background-position: -63px -4px; }
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module { background-position: -82px -4px; }
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property { background-position: -102px -3px; }
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum { background-position: -122px -3px; }
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule { background-position: -242px -4px; }
|
||||
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file { background-position: -262px -4px; }
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor { background-position: 0 -4px; }
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field,
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable { background-position: -22px -4px; }
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class { background-position: -43px -3px; }
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface { background-position: -63px -4px; }
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module { background-position: -82px -4px; }
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property { background-position: -102px -3px; }
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum { background-position: -122px -3px; }
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule { background-position: -242px -4px; }
|
||||
.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file { background-position: -262px -4px; }
|
||||
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor { background-position: 0 -24px; }
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field,
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable { background-position: -22px -24px; }
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class { background-position: -43px -23px; }
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface { background-position: -63px -24px; }
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module { background-position: -82px -24px; }
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property { background-position: -102px -23px; }
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum { background-position: -122px -23px; }
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule { background-position: -242px -24px; }
|
||||
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file { background-position: -262px -24px; }
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor { background-position: 0 -24px; }
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field,
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable { background-position: -22px -24px; }
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class { background-position: -43px -23px; }
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface { background-position: -63px -24px; }
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module { background-position: -82px -24px; }
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property { background-position: -102px -23px; }
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum { background-position: -122px -23px; }
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule { background-position: -242px -24px; }
|
||||
.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file { background-position: -262px -24px; }
|
||||
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {
|
||||
background: none;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon:before {
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon:before {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method:before,
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function:before,
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor:before {
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method:before,
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function:before,
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor:before {
|
||||
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0IxODBENyIgZD0iTTUuNSAzbC00LjUgMi44NTd2NC4yODVsNC41IDIuODU4IDQuNS0yLjg1N3YtNC4yODZsLTQuNS0yLjg1N3ptLS41IDguNDk4bC0zLTEuOTA1di0yLjgxNmwzIDEuOTA1djIuODE2em0tMi4zNTgtNS40OThsMi44NTgtMS44MTUgMi44NTggMS44MTUtMi44NTggMS44MTUtMi44NTgtMS44MTV6bTYuMzU4IDMuNTkzbC0zIDEuOTA1di0yLjgxNWwzLTEuOTA1djIuODE1eiIvPjwvc3ZnPg==");
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field:before,
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable:before {
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field:before,
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable:before {
|
||||
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTEgNnY0bDQgMiA2LTN2LTRsLTQtMi02IDN6bTQgMWwtMi0xIDQtMiAyIDEtNCAyeiIvPjwvc3ZnPg==");
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class:before {
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class:before {
|
||||
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBvbHlnb24gZmlsbD0iI0U4QUI1MyIgcG9pbnRzPSIxMS45OTgsMTEuMDAyIDksMTEgOSw3IDExLDcgMTAsOCAxMiwxMCAxNSw3IDEzLDUgMTIsNiA3LDYgOSw0IDYsMSAxLDYgNCw5IDYsNyA4LDcgOCwxMiAxMSwxMiAxMCwxMyAxMiwxNSAxNSwxMiAxMywxMCIvPjwvc3ZnPg==");
|
||||
}
|
||||
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface:before {
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface:before {
|
||||
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTExLjUgNGMtMS43NTkgMC0zLjIwNCAxLjMwOC0zLjQ0OSAzaC0zLjEyMmMtLjIyMy0uODYxLS45OTgtMS41LTEuOTI5LTEuNS0xLjEwNCAwLTIgLjg5NS0yIDIgMCAxLjEwNC44OTYgMiAyIDIgLjkzMSAwIDEuNzA2LS42MzkgMS45MjktMS41aDMuMTIyYy4yNDUgMS42OTEgMS42OSAzIDMuNDQ5IDMgMS45MyAwIDMuNS0xLjU3IDMuNS0zLjUgMC0xLjkzMS0xLjU3LTMuNS0zLjUtMy41em0wIDVjLS44MjcgMC0xLjUtLjY3NC0xLjUtMS41IDAtLjgyOC42NzMtMS41IDEuNS0xLjVzMS41LjY3MiAxLjUgMS41YzAgLjgyNi0uNjczIDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==");
|
||||
}
|
||||
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module:before {
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module:before {
|
||||
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkgMTF2LTFjMC0uODM0LjQ5Ni0xLjczOCAxLTItLjUwNC0uMjctMS0xLjE2OC0xLTJ2LTFjMC0uODQtLjU4NC0xLTEtMXYtMWMyLjA4MyAwIDIgMS4xNjYgMiAydjFjMCAuOTY5LjcwMy45OCAxIDF2MmMtLjMyMi4wMi0xIC4wNTMtMSAxdjFjMCAuODM0LjA4MyAyLTIgMnYtMWMuODMzIDAgMS0xIDEtMXptLTYgMHYtMWMwLS44MzQtLjQ5Ni0xLjczOC0xLTIgLjUwNC0uMjcgMS0xLjE2OCAxLTJ2LTFjMC0uODQuNTg0LTEgMS0xdi0xYy0yLjA4MyAwLTIgMS4xNjYtMiAydjFjMCAuOTY5LS43MDMuOTgtMSAxdjJjLjMyMi4wMiAxIC4wNTMgMSAxdjFjMCAuODM0LS4wODMgMiAyIDJ2LTFjLS44MzMgMC0xLTEtMS0xeiIvPjwvc3ZnPg==");
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property:before {
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property:before {
|
||||
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEyLjA5IDQuMzU5bC0yLjY0MSAyLjY0MS0yLTIgMi42NDEtMi42NDFjLS41MDItLjIyNi0xLjA1NS0uMzU5LTEuNjQxLS4zNTktMi4yMDkgMC00IDEuNzkxLTQgNCAwIC41ODYuMTMzIDEuMTM5LjM1OSAxLjY0bC0zLjM1OSAzLjM2cy0xIDEgMCAyaDJsMy4zNTktMy4zNmMuNTAzLjIyNiAxLjA1NS4zNiAxLjY0MS4zNiAyLjIwOSAwIDQtMS43OTEgNC00IDAtLjU4Ni0uMTMzLTEuMTM5LS4zNTktMS42NDF6Ii8+PC9zdmc+");
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.value:before,
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum:before {
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.value:before,
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum:before {
|
||||
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PGcgZmlsbD0iIzc1QkVGRiI+PHBhdGggZD0iTTEyIDNoLTRsLTEgMXYyaDV2MWgtMnYxaDJsMS0xdi0zbC0xLTF6bTAgMmgtNHYtMWg0djF6TTMgMTJoNnYtNWgtNnY1em0xLTNoNHYxaC00di0xeiIvPjwvZz48L3N2Zz4=");
|
||||
}
|
||||
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule:before {
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule:before {
|
||||
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEwIDVoLTh2LTJoOHYyem0wIDFoLTZ2MWg2di0xem0wIDJoLTZ2MWg2di0xeiIvPjwvc3ZnPg==");
|
||||
}
|
||||
|
||||
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file:before {
|
||||
.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file:before {
|
||||
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkuNjc2IDJoLTYuNjc2djEyaDEwdi05bC0zLjMyNC0zem0yLjMyNCAxMWgtOHYtMTBoNXYzaDN2N3oiLz48L3N2Zz4=");
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import { IContext, IHighlight, QuickOpenEntryGroup, QuickOpenModel } from 'vs/ba
|
||||
import { IAutoFocus, Mode } from 'vs/base/parts/quickopen/common/quickOpen';
|
||||
import { ScrollType } from 'vs/editor/common/editorCommon';
|
||||
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
|
||||
import { SymbolInformation, DocumentSymbolProviderRegistry, symbolKindToCssClass, IOutline } from 'vs/editor/common/modes';
|
||||
import { SymbolInformation, DocumentSymbolProviderRegistry, symbolKindToCssClass, IOutline, Location } from 'vs/editor/common/modes';
|
||||
import { BaseEditorQuickOpenAction, IDecorator } from './editorQuickOpen';
|
||||
import { getDocumentSymbols } from 'vs/editor/contrib/quickOpen/quickOpen';
|
||||
import { registerEditorAction, ServicesAccessor } from 'vs/editor/browser/editorExtensions';
|
||||
@@ -25,7 +25,7 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
|
||||
let SCOPE_PREFIX = ':';
|
||||
|
||||
class SymbolEntry extends QuickOpenEntryGroup {
|
||||
export class SymbolEntry extends QuickOpenEntryGroup {
|
||||
private name: string;
|
||||
private type: string;
|
||||
private description: string;
|
||||
@@ -167,6 +167,10 @@ export class QuickOutlineAction extends BaseEditorQuickOpenAction {
|
||||
});
|
||||
}
|
||||
|
||||
private symbolEntry(name: string, type: string, description: string, location: Location, highlights: IHighlight[], editor: ICodeEditor, decorator: IDecorator): SymbolEntry {
|
||||
return new SymbolEntry(name, type, description, Range.lift(location.range), highlights, editor, decorator);
|
||||
}
|
||||
|
||||
private toQuickOpenEntries(editor: ICodeEditor, flattened: SymbolInformation[], searchValue: string): SymbolEntry[] {
|
||||
const controller = this.getController(editor);
|
||||
|
||||
@@ -193,7 +197,7 @@ export class QuickOutlineAction extends BaseEditorQuickOpenAction {
|
||||
}
|
||||
|
||||
// Add
|
||||
results.push(new SymbolEntry(label, symbolKindToCssClass(element.kind), description, Range.lift(element.location.range), highlights, editor, controller));
|
||||
results.push(this.symbolEntry(label, symbolKindToCssClass(element.kind), description, element.location, highlights, editor, controller));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* 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 { IEditorService } from 'vs/platform/editor/common/editor';
|
||||
import { IInstantiationService, optional } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { registerEditorContribution } from 'vs/editor/browser/editorExtensions';
|
||||
import { ITextModelService } from 'vs/editor/common/services/resolverService';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { ReferencesController } from 'vs/editor/contrib/referenceSearch/referencesController';
|
||||
|
||||
export class StandaloneReferencesController extends ReferencesController {
|
||||
|
||||
public constructor(
|
||||
editor: ICodeEditor,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IEditorService editorService: IEditorService,
|
||||
@ITextModelService textModelResolverService: ITextModelService,
|
||||
@INotificationService notificationService: INotificationService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IWorkspaceContextService contextService: IWorkspaceContextService,
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@optional(IEnvironmentService) environmentService: IEnvironmentService
|
||||
) {
|
||||
super(
|
||||
true,
|
||||
editor,
|
||||
contextKeyService,
|
||||
editorService,
|
||||
textModelResolverService,
|
||||
notificationService,
|
||||
instantiationService,
|
||||
contextService,
|
||||
storageService,
|
||||
themeService,
|
||||
configurationService,
|
||||
environmentService
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
registerEditorContribution(StandaloneReferencesController);
|
||||
@@ -20,7 +20,7 @@ import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/commo
|
||||
import { IWorkspaceContextService, IWorkspace, WorkbenchState, IWorkspaceFolder, IWorkspaceFoldersChangeEvent, WorkspaceFolder } from 'vs/platform/workspace/common/workspace';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import { ICodeEditor, IDiffEditor, isCodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Configuration, DefaultConfigurationModel, ConfigurationModel } from 'vs/platform/configuration/common/configurationModels';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IProgressService, IProgressRunner } from 'vs/platform/progress/common/progress';
|
||||
@@ -39,7 +39,7 @@ import { OS } from 'vs/base/common/platform';
|
||||
import { IRange } from 'vs/editor/common/core/range';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
import { INotificationService, INotification, INotificationHandle, NoOpNotification, IPromptChoice } from 'vs/platform/notification/common/notification';
|
||||
import { IConfirmation, IConfirmationResult, IConfirmationService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { IConfirmation, IConfirmationResult, IDialogService, IDialogOptions } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { IPosition, Position as Pos } from 'vs/editor/common/core/position';
|
||||
|
||||
export class SimpleEditor implements IEditor {
|
||||
@@ -73,7 +73,7 @@ export class SimpleEditor implements IEditor {
|
||||
export class SimpleModel implements ITextEditorModel {
|
||||
|
||||
private model: ITextModel;
|
||||
private _onDispose: Emitter<void>;
|
||||
private readonly _onDispose: Emitter<void>;
|
||||
|
||||
constructor(model: ITextModel) {
|
||||
this.model = model;
|
||||
@@ -236,11 +236,20 @@ export class SimpleProgressService implements IProgressService {
|
||||
}
|
||||
}
|
||||
|
||||
export class SimpleConfirmationService implements IConfirmationService {
|
||||
export class SimpleDialogService implements IDialogService {
|
||||
|
||||
public _serviceBrand: any;
|
||||
|
||||
public confirm(confirmation: IConfirmation): TPromise<boolean> {
|
||||
public confirm(confirmation: IConfirmation): TPromise<IConfirmationResult> {
|
||||
return this.doConfirm(confirmation).then(confirmed => {
|
||||
return {
|
||||
confirmed,
|
||||
checkboxChecked: false // unsupported
|
||||
} as IConfirmationResult;
|
||||
});
|
||||
}
|
||||
|
||||
private doConfirm(confirmation: IConfirmation): TPromise<boolean> {
|
||||
let messageText = confirmation.message;
|
||||
if (confirmation.detail) {
|
||||
messageText = messageText + '\n\n' + confirmation.detail;
|
||||
@@ -249,13 +258,8 @@ export class SimpleConfirmationService implements IConfirmationService {
|
||||
return TPromise.wrap(window.confirm(messageText));
|
||||
}
|
||||
|
||||
public confirmWithCheckbox(confirmation: IConfirmation): TPromise<IConfirmationResult> {
|
||||
return this.confirm(confirmation).then(confirmed => {
|
||||
return {
|
||||
confirmed,
|
||||
checkboxChecked: false // unsupported
|
||||
} as IConfirmationResult;
|
||||
});
|
||||
public show(severity: Severity, message: string, buttons: string[], options?: IDialogOptions): TPromise<number> {
|
||||
return TPromise.as(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,7 +308,7 @@ export class StandaloneCommandService implements ICommandService {
|
||||
private readonly _instantiationService: IInstantiationService;
|
||||
private _dynamicCommands: { [id: string]: ICommand; };
|
||||
|
||||
private _onWillExecuteCommand: Emitter<ICommandEvent> = new Emitter<ICommandEvent>();
|
||||
private readonly _onWillExecuteCommand: Emitter<ICommandEvent> = new Emitter<ICommandEvent>();
|
||||
public readonly onWillExecuteCommand: Event<ICommandEvent> = this._onWillExecuteCommand.event;
|
||||
|
||||
constructor(instantiationService: IInstantiationService) {
|
||||
@@ -468,7 +472,7 @@ export class SimpleConfigurationService implements IConfigurationService {
|
||||
_serviceBrand: any;
|
||||
|
||||
private _onDidChangeConfiguration = new Emitter<IConfigurationChangeEvent>();
|
||||
public onDidChangeConfiguration: Event<IConfigurationChangeEvent> = this._onDidChangeConfiguration.event;
|
||||
public readonly onDidChangeConfiguration: Event<IConfigurationChangeEvent> = this._onDidChangeConfiguration.event;
|
||||
|
||||
private _configuration: Configuration;
|
||||
|
||||
|
||||
@@ -192,19 +192,23 @@
|
||||
}
|
||||
|
||||
/* squiggles */
|
||||
.monaco-editor.vs .squiggly-c-error,
|
||||
.monaco-editor.vs-dark .squiggly-c-error {
|
||||
.monaco-editor.vs .squiggly-d-error,
|
||||
.monaco-editor.vs-dark .squiggly-d-error {
|
||||
background: transparent !important;
|
||||
border-bottom: 4px double #E47777;
|
||||
}
|
||||
.monaco-editor.vs .squiggly-b-warning,
|
||||
.monaco-editor.vs-dark .squiggly-b-warning {
|
||||
.monaco-editor.vs .squiggly-c-warning,
|
||||
.monaco-editor.vs-dark .squiggly-c-warning {
|
||||
border-bottom: 4px double #71B771;
|
||||
}
|
||||
.monaco-editor.vs .squiggly-a-info,
|
||||
.monaco-editor.vs-dark .squiggly-a-info {
|
||||
.monaco-editor.vs .squiggly-b-info,
|
||||
.monaco-editor.vs-dark .squiggly-b-info {
|
||||
border-bottom: 4px double #71B771;
|
||||
}
|
||||
.monaco-editor.vs .squiggly-a-hint,
|
||||
.monaco-editor.vs-dark .squiggly-a-hint {
|
||||
border-bottom: 4px double #6c6c6c;
|
||||
}
|
||||
|
||||
/* contextmenu */
|
||||
.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-item .action-label:focus,
|
||||
|
||||
@@ -164,7 +164,8 @@ export class StandaloneCodeEditor extends CodeEditor implements IStandaloneCodeE
|
||||
@ICommandService commandService: ICommandService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IThemeService themeService: IThemeService
|
||||
@IThemeService themeService: IThemeService,
|
||||
@INotificationService notificationService: INotificationService
|
||||
) {
|
||||
options = options || {};
|
||||
options.ariaLabel = options.ariaLabel || nls.localize('editorViewAccessibleLabel', "Editor content");
|
||||
@@ -173,7 +174,7 @@ export class StandaloneCodeEditor extends CodeEditor implements IStandaloneCodeE
|
||||
? nls.localize('accessibilityHelpMessageIE', "Press Ctrl+F1 for Accessibility Options.")
|
||||
: nls.localize('accessibilityHelpMessage', "Press Alt+F1 for Accessibility Options.")
|
||||
);
|
||||
super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, themeService);
|
||||
super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService);
|
||||
|
||||
if (keybindingService instanceof StandaloneKeybindingService) {
|
||||
this._standaloneKeybindingService = keybindingService;
|
||||
@@ -295,7 +296,8 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IContextViewService contextViewService: IContextViewService,
|
||||
@IStandaloneThemeService themeService: IStandaloneThemeService
|
||||
@IStandaloneThemeService themeService: IStandaloneThemeService,
|
||||
@INotificationService notificationService: INotificationService,
|
||||
) {
|
||||
options = options || {};
|
||||
if (typeof options.theme === 'string') {
|
||||
@@ -303,7 +305,7 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon
|
||||
}
|
||||
let model: ITextModel = options.model;
|
||||
delete options.model;
|
||||
super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, themeService);
|
||||
super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, themeService, notificationService);
|
||||
|
||||
this._contextViewService = <IEditorContextViewService>contextViewService;
|
||||
this._register(toDispose);
|
||||
|
||||
@@ -89,7 +89,8 @@ export function create(domElement: HTMLElement, options?: IEditorConstructionOpt
|
||||
services.get(IContextKeyService),
|
||||
services.get(IKeybindingService),
|
||||
services.get(IContextViewService),
|
||||
services.get(IStandaloneThemeService)
|
||||
services.get(IStandaloneThemeService),
|
||||
services.get(INotificationService)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import { IMarkerData } from 'vs/platform/markers/common/markers';
|
||||
import { Token, TokenizationResult, TokenizationResult2 } from 'vs/editor/common/core/token';
|
||||
import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService';
|
||||
import * as model from 'vs/editor/common/model';
|
||||
import { IMarkdownString } from 'vs/base/common/htmlContent';
|
||||
|
||||
/**
|
||||
* Register information about a new language.
|
||||
@@ -390,12 +391,11 @@ export function registerColorProvider(languageId: string, provider: modes.Docume
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a folding provider
|
||||
* Register a folding range provider
|
||||
*/
|
||||
/*export function registerFoldingProvider(languageId: string, provider: modes.FoldingProvider): IDisposable {
|
||||
return modes.FoldingProviderRegistry.register(languageId, provider);
|
||||
}*/
|
||||
|
||||
export function registerFoldingRangeProvider(languageId: string, provider: modes.FoldingRangeProvider): IDisposable {
|
||||
return modes.FoldingRangeProviderRegistry.register(languageId, provider);
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains additional diagnostic information about the context in which
|
||||
@@ -494,7 +494,7 @@ export interface CompletionItem {
|
||||
/**
|
||||
* A human-readable string that represents a doc-comment.
|
||||
*/
|
||||
documentation?: string;
|
||||
documentation?: string | IMarkdownString;
|
||||
/**
|
||||
* A command that should be run upon acceptance of this item.
|
||||
*/
|
||||
@@ -527,6 +527,12 @@ export interface CompletionItem {
|
||||
* [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
|
||||
*/
|
||||
range?: Range;
|
||||
/**
|
||||
* An optional set of characters that when pressed while this completion is active will accept it first and
|
||||
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
|
||||
* characters will be ignored.
|
||||
*/
|
||||
commitCharacters?: string[];
|
||||
/**
|
||||
* @deprecated **Deprecated** in favor of `CompletionItem.insertText` and `CompletionItem.range`.
|
||||
*
|
||||
@@ -544,12 +550,6 @@ export interface CompletionItem {
|
||||
* nor with themselves.
|
||||
*/
|
||||
additionalTextEdits?: model.ISingleEditOperation[];
|
||||
/**
|
||||
* An optional set of characters that when pressed while this completion is active will accept it first and
|
||||
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
|
||||
* characters will be ignored.
|
||||
*/
|
||||
commitCharacters?: string[];
|
||||
}
|
||||
/**
|
||||
* Represents a collection of [completion items](#CompletionItem) to be presented
|
||||
@@ -786,12 +786,14 @@ export function createMonacoLanguagesAPI(): typeof monaco.languages {
|
||||
registerOnTypeFormattingEditProvider: registerOnTypeFormattingEditProvider,
|
||||
registerLinkProvider: registerLinkProvider,
|
||||
registerColorProvider: registerColorProvider,
|
||||
registerFoldingRangeProvider: registerFoldingRangeProvider,
|
||||
|
||||
// enums
|
||||
DocumentHighlightKind: modes.DocumentHighlightKind,
|
||||
CompletionItemKind: CompletionItemKind,
|
||||
SymbolKind: modes.SymbolKind,
|
||||
IndentAction: IndentAction,
|
||||
SuggestTriggerKind: modes.SuggestTriggerKind
|
||||
SuggestTriggerKind: modes.SuggestTriggerKind,
|
||||
FoldingRangeKind: modes.FoldingRangeKind
|
||||
};
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ import { CodeEditorServiceImpl } from 'vs/editor/browser/services/codeEditorServ
|
||||
import {
|
||||
SimpleConfigurationService, SimpleResourceConfigurationService, SimpleMenuService,
|
||||
SimpleProgressService, StandaloneCommandService, StandaloneKeybindingService, SimpleNotificationService,
|
||||
StandaloneTelemetryService, SimpleWorkspaceContextService, SimpleConfirmationService
|
||||
StandaloneTelemetryService, SimpleWorkspaceContextService, SimpleDialogService
|
||||
} from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService';
|
||||
import { IMenuService } from 'vs/platform/actions/common/actions';
|
||||
@@ -41,7 +41,8 @@ import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneT
|
||||
import { StandaloneThemeServiceImpl } from 'vs/editor/standalone/browser/standaloneThemeServiceImpl';
|
||||
import { ILogService, NullLogService } from 'vs/platform/log/common/log';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { IConfirmationService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { IListService, ListService } from 'vs/platform/list/browser/listService';
|
||||
|
||||
export interface IEditorContextViewService extends IContextViewService {
|
||||
dispose(): void;
|
||||
@@ -126,7 +127,7 @@ export module StaticServices {
|
||||
|
||||
export const telemetryService = define(ITelemetryService, () => new StandaloneTelemetryService());
|
||||
|
||||
export const confirmationService = define(IConfirmationService, () => new SimpleConfirmationService());
|
||||
export const dialogService = define(IDialogService, () => new SimpleDialogService());
|
||||
|
||||
export const notificationService = define(INotificationService, () => new SimpleNotificationService());
|
||||
|
||||
@@ -180,6 +181,8 @@ export class DynamicStandaloneServices extends Disposable {
|
||||
|
||||
let contextKeyService = ensure(IContextKeyService, () => this._register(new ContextKeyService(configurationService)));
|
||||
|
||||
ensure(IListService, () => new ListService(contextKeyService));
|
||||
|
||||
let commandService = ensure(ICommandService, () => new StandaloneCommandService(this._instantiationService));
|
||||
|
||||
ensure(IKeybindingService, () => this._register(new StandaloneKeybindingService(contextKeyService, commandService, telemetryService, notificationService, domElement)));
|
||||
|
||||
@@ -13,13 +13,13 @@ import { Color } from 'vs/base/common/color';
|
||||
import { Extensions, IColorRegistry, ColorIdentifier } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { Extensions as ThemingExtensions, IThemingRegistry, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
const VS_THEME_NAME = 'vs';
|
||||
const VS_DARK_THEME_NAME = 'vs-dark';
|
||||
const HC_BLACK_THEME_NAME = 'hc-black';
|
||||
|
||||
const colorRegistry = <IColorRegistry>Registry.as(Extensions.ColorContribution);
|
||||
const colorRegistry = Registry.as<IColorRegistry>(Extensions.ColorContribution);
|
||||
const themingRegistry = Registry.as<IThemingRegistry>(ThemingExtensions.ThemingContribution);
|
||||
|
||||
class StandaloneTheme implements IStandaloneTheme {
|
||||
@@ -118,7 +118,7 @@ export class StandaloneThemeServiceImpl implements IStandaloneThemeService {
|
||||
private _knownThemes: Map<string, StandaloneTheme>;
|
||||
private _styleElement: HTMLStyleElement;
|
||||
private _theme: IStandaloneTheme;
|
||||
private _onThemeChange: Emitter<IStandaloneTheme>;
|
||||
private readonly _onThemeChange: Emitter<IStandaloneTheme>;
|
||||
|
||||
|
||||
constructor() {
|
||||
|
||||
Reference in New Issue
Block a user