mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-21 12:20:29 -04:00
Initial VS Code 1.19 source merge (#571)
* Initial 1.19 xcopy * Fix yarn build * Fix numerous build breaks * Next batch of build break fixes * More build break fixes * Runtime breaks * Additional post merge fixes * Fix windows setup file * Fix test failures. * Update license header blocks to refer to source eula
This commit is contained in:
@@ -12,21 +12,21 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { alert } from 'vs/base/browser/ui/aria/aria';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import { commonEditorContribution, CommonEditorRegistry, EditorCommand } from 'vs/editor/common/editorCommonExtensions';
|
||||
import { registerEditorContribution, EditorCommand, registerEditorCommand } from 'vs/editor/browser/editorExtensions';
|
||||
import { ICodeEditor, IContentWidget, IContentWidgetPosition, ContentWidgetPositionPreference } from 'vs/editor/browser/editorBrowser';
|
||||
import { IContextKeyService, RawContextKey, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IPosition } from 'vs/editor/common/core/position';
|
||||
import { registerThemingParticipant, HIGH_CONTRAST } from 'vs/platform/theme/common/themeService';
|
||||
import { inputValidationInfoBorder, inputValidationInfoBackground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
|
||||
@commonEditorContribution
|
||||
export class MessageController {
|
||||
export class MessageController implements editorCommon.IEditorContribution {
|
||||
|
||||
private static _id = 'editor.contrib.messageController';
|
||||
private static readonly _id = 'editor.contrib.messageController';
|
||||
|
||||
static CONTEXT_SNIPPET_MODE = new RawContextKey<boolean>('messageVisible', false);
|
||||
|
||||
static get(editor: editorCommon.ICommonCodeEditor): MessageController {
|
||||
static get(editor: ICodeEditor): MessageController {
|
||||
return editor.getContribution<MessageController>(MessageController._id);
|
||||
}
|
||||
|
||||
@@ -101,12 +101,12 @@ export class MessageController {
|
||||
const MessageCommand = EditorCommand.bindToContribution<MessageController>(MessageController.get);
|
||||
|
||||
|
||||
CommonEditorRegistry.registerEditorCommand(new MessageCommand({
|
||||
registerEditorCommand(new MessageCommand({
|
||||
id: 'leaveEditorMessage',
|
||||
precondition: MessageController.CONTEXT_SNIPPET_MODE,
|
||||
handler: c => c.closeMessage(),
|
||||
kbOpts: {
|
||||
weight: CommonEditorRegistry.commandWeight(30),
|
||||
weight: KeybindingsRegistry.WEIGHT.editorContrib(30),
|
||||
primary: KeyCode.Escape
|
||||
}
|
||||
}));
|
||||
@@ -138,10 +138,9 @@ class MessageWidget implements IContentWidget {
|
||||
|
||||
this._editor = editor;
|
||||
this._editor.revealLinesInCenterIfOutsideViewport(lineNumber, lineNumber, editorCommon.ScrollType.Smooth);
|
||||
this._position = { lineNumber, column: 1 };
|
||||
this._position = { lineNumber, column: column - 1 };
|
||||
|
||||
this._domNode = document.createElement('div');
|
||||
this._domNode.style.paddingLeft = `${editor.getOffsetForColumn(lineNumber, column) - 6}px`;
|
||||
this._domNode.classList.add('monaco-editor-overlaymessage');
|
||||
|
||||
const message = document.createElement('div');
|
||||
@@ -174,6 +173,8 @@ class MessageWidget implements IContentWidget {
|
||||
}
|
||||
}
|
||||
|
||||
registerEditorContribution(MessageController);
|
||||
|
||||
registerThemingParticipant((theme, collector) => {
|
||||
let border = theme.getColor(inputValidationInfoBorder);
|
||||
if (border) {
|
||||
|
||||
Reference in New Issue
Block a user