mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge VS Code 1.21 source code (#1067)
* Initial VS Code 1.21 file copy with patches * A few more merges * Post npm install * Fix batch of build breaks * Fix more build breaks * Fix more build errors * Fix more build breaks * Runtime fixes 1 * Get connection dialog working with some todos * Fix a few packaging issues * Copy several node_modules to package build to fix loader issues * Fix breaks from master * A few more fixes * Make tests pass * First pass of license header updates * Second pass of license header updates * Fix restore dialog issues * Remove add additional themes menu items * fix select box issues where the list doesn't show up * formatting * Fix editor dispose issue * Copy over node modules to correct location on all platforms
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
import { coalesce } from 'vs/base/common/arrays';
|
||||
import { onUnexpectedExternalError } from 'vs/base/common/errors';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IReadOnlyModel } from 'vs/editor/common/editorCommon';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
import { registerDefaultLanguageCommand } from 'vs/editor/browser/editorExtensions';
|
||||
import { Hover, HoverProviderRegistry } from 'vs/editor/common/modes';
|
||||
import { asWinJsPromise } from 'vs/base/common/async';
|
||||
import { Position } from 'vs/editor/common/core/position';
|
||||
|
||||
export function getHover(model: IReadOnlyModel, position: Position): TPromise<Hover[]> {
|
||||
export function getHover(model: ITextModel, position: Position): TPromise<Hover[]> {
|
||||
|
||||
const supports = HoverProviderRegistry.ordered(model);
|
||||
const values: Hover[] = [];
|
||||
|
||||
@@ -56,8 +56,8 @@ export class ModesHoverController implements editorCommon.IEditorContribution {
|
||||
}
|
||||
|
||||
constructor(editor: ICodeEditor,
|
||||
@IOpenerService private _openerService: IOpenerService,
|
||||
@IModeService private _modeService: IModeService
|
||||
@IOpenerService private readonly _openerService: IOpenerService,
|
||||
@IModeService private readonly _modeService: IModeService
|
||||
) {
|
||||
this._editor = editor;
|
||||
|
||||
|
||||
@@ -140,6 +140,10 @@ export class ContentHoverWidget extends Widget implements editorBrowser.IContent
|
||||
this.updateFont();
|
||||
|
||||
this._editor.layoutContentWidget(this);
|
||||
this.onContentsChange();
|
||||
}
|
||||
|
||||
protected onContentsChange(): void {
|
||||
this.scrollbar.scanDomNode();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import { HoverOperation, IHoverComputer } from './hoverOperation';
|
||||
import { ContentHoverWidget } from './hoverWidgets';
|
||||
import { IMarkdownString, MarkdownString, isEmptyMarkdownString, markedStringsEquals } from 'vs/base/common/htmlContent';
|
||||
import { MarkdownRenderer } from 'vs/editor/contrib/markdown/markdownRenderer';
|
||||
import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations';
|
||||
import { ModelDecorationOptions } from 'vs/editor/common/model/textModel';
|
||||
import { ColorPickerModel } from 'vs/editor/contrib/colorPicker/colorPickerModel';
|
||||
import { ColorPickerWidget } from 'vs/editor/contrib/colorPicker/colorPickerWidget';
|
||||
import { ColorDetector } from 'vs/editor/contrib/colorPicker/colorDetector';
|
||||
@@ -154,7 +154,7 @@ class ModesContentComputer implements IHoverComputer<HoverPart[]> {
|
||||
|
||||
export class ModesContentHoverWidget extends ContentHoverWidget {
|
||||
|
||||
static ID = 'editor.contrib.modesContentHoverWidget';
|
||||
static readonly ID = 'editor.contrib.modesContentHoverWidget';
|
||||
|
||||
private _messages: HoverPart[];
|
||||
private _lastRange: Range;
|
||||
@@ -167,7 +167,7 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
|
||||
private _colorPicker: ColorPickerWidget;
|
||||
|
||||
private renderDisposable: IDisposable = EmptyDisposable;
|
||||
private toDispose: IDisposable[];
|
||||
private toDispose: IDisposable[] = [];
|
||||
|
||||
constructor(editor: ICodeEditor, markdownRenderner: MarkdownRenderer) {
|
||||
super(ModesContentHoverWidget.ID, editor);
|
||||
@@ -175,7 +175,9 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
|
||||
this._computer = new ModesContentComputer(this._editor);
|
||||
this._highlightDecorations = [];
|
||||
this._isChangingDecorations = false;
|
||||
|
||||
this._markdownRenderer = markdownRenderner;
|
||||
markdownRenderner.onDidRenderCodeBlock(this.onContentsChange, this, this.toDispose);
|
||||
|
||||
this._hoverOperation = new HoverOperation(
|
||||
this._computer,
|
||||
@@ -184,7 +186,6 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
|
||||
result => this._withResult(result, false)
|
||||
);
|
||||
|
||||
this.toDispose = [];
|
||||
this.toDispose.push(dom.addStandardDisposableListener(this.getDomNode(), dom.EventType.FOCUS, () => {
|
||||
if (this._colorPicker) {
|
||||
dom.addClass(this.getDomNode(), 'colorpicker-hover');
|
||||
|
||||
Reference in New Issue
Block a user