Merge from vscode cfc1ab4c5f816765b91fb7ead3c3427a7c8581a3

This commit is contained in:
ADS Merger
2020-03-11 04:19:23 +00:00
parent 16fab722d5
commit 4c3e48773d
880 changed files with 20441 additions and 11232 deletions

View File

@@ -13,7 +13,7 @@ import { Taskbar } from 'sql/base/browser/ui/taskbar/taskbar';
import { RunCellAction, CellContext } from 'sql/workbench/contrib/notebook/browser/cellViews/codeActions';
import { NotebookModel } from 'sql/workbench/services/notebook/browser/models/notebookModel';
import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import * as themeColors from 'vs/workbench/common/theme';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ITextModel } from 'vs/editor/common/model';
@@ -36,6 +36,7 @@ import { IEditorProgressService } from 'vs/platform/progress/common/progress';
import { SimpleProgressIndicator } from 'sql/workbench/services/progress/browser/simpleProgressIndicator';
import { notebookConstants } from 'sql/workbench/services/notebook/browser/interfaces';
import { tryMatchCellMagic } from 'sql/workbench/services/notebook/browser/utils';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
export const CODE_SELECTOR: string = 'code-component';
const MARKDOWN_CLASS = 'markdown';

View File

@@ -10,7 +10,7 @@ import { Event } from 'vs/base/common/event';
import { nb } from 'azdata';
import { ICellModel } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
import * as outputProcessor from 'sql/workbench/contrib/notebook/browser/models/outputProcessor';
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeService';
import * as DOM from 'vs/base/browser/dom';
import { ComponentHostDirective } from 'sql/base/browser/componentHost.directive';
import { Extensions, IMimeComponent, IMimeComponentRegistry } from 'sql/workbench/contrib/notebook/browser/outputs/mimeRegistry';
@@ -53,7 +53,7 @@ export class OutputComponent extends CellView implements OnInit, AfterViewInit {
}
ngOnInit() {
this._register(this._themeService.onThemeChange(event => this.updateTheme(event)));
this._register(this._themeService.onDidColorThemeChange(event => this.updateTheme(event)));
this.loadComponent();
this.layout();
this._initialized = true;
@@ -62,7 +62,7 @@ export class OutputComponent extends CellView implements OnInit, AfterViewInit {
}
ngAfterViewInit() {
this.updateTheme(this._themeService.getTheme());
this.updateTheme(this._themeService.getColorTheme());
}
ngOnChanges(changes: { [propKey: string]: SimpleChange }) {
@@ -128,7 +128,7 @@ export class OutputComponent extends CellView implements OnInit, AfterViewInit {
public hasError(): boolean {
return !types.isUndefinedOrNull(this.errorText);
}
private updateTheme(theme: ITheme): void {
private updateTheme(theme: IColorTheme): void {
let el = <HTMLElement>this._ref.nativeElement;
let backgroundColor = theme.getColor(colors.editorBackground, true);
let foregroundColor = theme.getColor(themeColors.SIDE_BAR_FOREGROUND, true);

View File

@@ -8,8 +8,9 @@ import { OnInit, Component, Input, Inject, ElementRef, ViewChild, forwardRef, Ch
import { AngularDisposable } from 'sql/base/browser/lifecycle';
import { ICellModel } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
import * as themeColors from 'vs/workbench/common/theme';
import { IWorkbenchThemeService, IColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { URI } from 'vs/base/common/uri';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
export const OUTPUT_AREA_SELECTOR: string = 'output-area-component';

View File

@@ -9,7 +9,7 @@ import 'vs/css!./media/highlight';
import { OnInit, Component, Input, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, OnChanges, SimpleChange, HostListener, ViewChildren, QueryList } from '@angular/core';
import { localize } from 'vs/nls';
import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import * as themeColors from 'vs/workbench/common/theme';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { Emitter } from 'vs/base/common/event';
@@ -27,6 +27,7 @@ import { CellToggleMoreActions } from 'sql/workbench/contrib/notebook/browser/ce
import { CodeComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/code.component';
import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor';
import { NotebookRange } from 'sql/workbench/services/notebook/browser/notebookService';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
export const TEXT_SELECTOR: string = 'text-cell-component';
const USER_SELECT_CLASS = 'actionselect';

View File

@@ -231,7 +231,7 @@ export abstract class NotebookInput extends EditorInput {
return this._textInput;
}
public revert(group: GroupIdentifier, options?: IRevertOptions): Promise<boolean> {
public revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void> {
return this._textInput.revert(group, options);
}

View File

@@ -6,7 +6,7 @@
import { nb } from 'azdata';
import { OnInit, Component, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, OnDestroy, ViewChildren, QueryList } from '@angular/core';
import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import * as themeColors from 'vs/workbench/common/theme';
import { INotificationService, INotification } from 'vs/platform/notification/common/notification';
import { localize } from 'vs/nls';
@@ -54,6 +54,7 @@ import { find, firstIndex } from 'vs/base/common/arrays';
import { CodeCellComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/codeCell.component';
import { TextCellComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/textCell.component';
import { NotebookInput } from 'sql/workbench/contrib/notebook/browser/models/notebookInput';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
import { ICommandService } from 'vs/platform/commands/common/commands';
@@ -260,7 +261,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
});
this.notificationService.error(errorWithAction);
let editors = this.editorService.visibleControls;
let editors = this.editorService.visibleEditorPanes;
for (let editor of editors) {
if (editor && editor.input.resource === this._notebookParams.input.notebookUri) {
await editor.group.closeEditor(this._notebookParams.input as NotebookInput, { preserveFocus: true }); // sketchy

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./notebook';
import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import { registerThemingParticipant, IColorTheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import { SIDE_BAR_BACKGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND, EDITOR_GROUP_HEADER_TABS_BACKGROUND } from 'vs/workbench/common/theme';
import { activeContrastBorder, contrastBorder, buttonBackground, textLinkForeground, textLinkActiveForeground, textPreformatForeground, textBlockQuoteBackground, textBlockQuoteBorder, buttonForeground, editorBackground, lighten } from 'vs/platform/theme/common/colorRegistry';
import { editorLineHighlight, editorLineHighlightBorder } from 'vs/editor/common/view/editorColorRegistry';
@@ -15,7 +15,7 @@ import { getZoomLevel } from 'vs/base/browser/browser';
import * as types from 'vs/base/common/types';
export function registerNotebookThemes(overrideEditorThemeSetting: boolean, configurationService: IConfigurationService): IDisposable {
return registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
return registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) => {
let lightBoxShadow = '0px 4px 6px 0px rgba(0, 0, 0, 0.14)';
let darkBoxShadow = '0px 4px 6px 0px rgba(0, 0, 0, 1)';

View File

@@ -660,7 +660,7 @@ export class NotebookIntervalNode {
abstract class SettingsCommand extends Command {
protected getNotebookEditor(accessor: ServicesAccessor): NotebookEditor {
const activeEditor = accessor.get(IEditorService).activeControl;
const activeEditor = accessor.get(IEditorService).activeEditorPane;
if (activeEditor instanceof NotebookEditor) {
return activeEditor;
}

View File

@@ -21,7 +21,7 @@ import { IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference
import { FIND_IDS, CONTEXT_FIND_INPUT_FOCUSED } from 'vs/editor/contrib/find/findModel';
import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/findState';
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService';
import { IColorTheme, IThemeService } from 'vs/platform/theme/common/themeService';
import * as colors from 'vs/platform/theme/common/colorRegistry';
import { IEditorAction } from 'vs/editor/common/editorCommon';
import { IDisposable } from 'vs/base/common/lifecycle';
@@ -159,8 +159,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
this._notebookController.addOverlayWidget(this);
this._applyTheme(themeService.getTheme());
this._register(themeService.onThemeChange(this._applyTheme.bind(this)));
this._applyTheme(themeService.getColorTheme());
this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));
this.onkeyup(this._domNode, e => {
if (e.equals(KeyCode.Escape)) {
@@ -299,7 +299,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
}
}
private _applyTheme(theme: ITheme) {
private _applyTheme(theme: IColorTheme) {
let inputStyles: IFindInputStyles = {
inputActiveOptionBorder: theme.getColor(colors.inputActiveOptionBorder),
inputBackground: theme.getColor(colors.inputBackground),

View File

@@ -28,7 +28,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel';
import { TextFileEditorModelManager } from 'vs/workbench/services/textfile/common/textFileEditorModelManager';
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
import { TestEnvironmentService, TestLifecycleService, TestStorageService, TestTextFileService, workbenchInstantiationService, TestTextResourcePropertiesService } from 'vs/workbench/test/browser/workbenchTestServices';
import { TestEnvironmentService, TestLifecycleService, TestTextFileService, workbenchInstantiationService } from 'vs/workbench/test/browser/workbenchTestServices';
import { Range } from 'vs/editor/common/core/range';
import { nb } from 'azdata';
import { Emitter } from 'vs/base/common/event';
@@ -38,6 +38,7 @@ import { startsWith } from 'vs/base/common/strings';
import { assign } from 'vs/base/common/objects';
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { TestStorageService, TestTextResourcePropertiesService } from 'vs/workbench/test/common/workbenchTestServices';
class ServiceAccessor {

View File

@@ -25,7 +25,7 @@ import { TestCapabilitiesService } from 'sql/platform/capabilities/test/common/t
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
import { ClientSession } from 'sql/workbench/services/notebook/browser/models/clientSession';
import { TestStorageService } from 'vs/workbench/test/browser/workbenchTestServices';
import { TestStorageService } from 'vs/workbench/test/common/workbenchTestServices';
import { NotebookEditorContentManager } from 'sql/workbench/contrib/notebook/browser/models/notebookInput';
import { NotebookRange } from 'sql/workbench/services/notebook/browser/notebookService';
import { NotebookMarkdownRenderer } from 'sql/workbench/contrib/notebook/browser/outputs/notebookMarkdown';

View File

@@ -22,7 +22,7 @@ import { Memento } from 'vs/workbench/common/memento';
import { Emitter } from 'vs/base/common/event';
import { TestCapabilitiesService } from 'sql/platform/capabilities/test/common/testCapabilitiesService';
import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService';
import { TestStorageService } from 'vs/workbench/test/browser/workbenchTestServices';
import { TestStorageService } from 'vs/workbench/test/common/workbenchTestServices';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';