Strict Null Checks, Builder Removal, Formatting (#4849)

* remove builder; more null checks

* null checks

* formatting

* wip

* fix dropdown themeing

* formatting

* formatting

* fix tests

* update what files are checked

* add code to help refresh bad nodes
This commit is contained in:
Anthony Dresser
2019-04-08 13:27:41 -07:00
committed by GitHub
parent 01784dd186
commit 22ec1d5f0a
57 changed files with 177 additions and 206 deletions

View File

@@ -23,7 +23,7 @@ import { localize } from 'vs/nls';
import { MessageLevel } from 'sql/workbench/api/common/sqlExtHostTypes';
import * as os from 'os';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
export const MODAL_SHOWING_KEY = 'modalShowing';
export const MODAL_SHOWING_CONTEXT = new RawContextKey<Array<string>>(MODAL_SHOWING_KEY, []);
@@ -152,7 +152,7 @@ export abstract class Modal extends Disposable implements IThemable {
private _title: string,
private _name: string,
private _telemetryService: ITelemetryService,
protected layoutService: IWorkbenchLayoutService,
protected layoutService: ILayoutService,
protected _clipboardService: IClipboardService,
protected _themeService: IThemeService,
_contextKeyService: IContextKeyService,
@@ -394,7 +394,7 @@ export abstract class Modal extends Disposable implements IThemable {
*/
protected show() {
this._modalShowingContext.get().push(this._staticKey);
this._builder.appendTo(this.layoutService.getWorkbenchElement());
this._builder.appendTo(this.layoutService.container);
this.setFocusableElements();

View File

@@ -36,6 +36,7 @@ import { MessageType } from 'vs/base/browser/ui/inputbox/inputBox';
import { endsWith, startsWith } from 'vs/base/common/strings';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
export class ConnectionWidget {
private _container: HTMLElement;
@@ -99,6 +100,7 @@ export class ConnectionWidget {
providerName: string,
@IThemeService private _themeService: IThemeService,
@IContextViewService private _contextViewService: IContextViewService,
@ILayoutService private _layoutService: ILayoutService,
@IConnectionManagementService private _connectionManagementService: IConnectionManagementService,
@ICapabilitiesService private _capabilitiesService: ICapabilitiesService,
@IClipboardService private _clipboardService: IClipboardService,
@@ -222,7 +224,7 @@ export class ConnectionWidget {
let databaseOption = this._optionsMaps[ConnectionOptionSpecialType.databaseName];
let databaseName = DialogHelper.appendRow(this._tableContainer, databaseOption.displayName, 'connection-label', 'connection-input');
this._databaseNameInputBox = new Dropdown(databaseName, this._contextViewService, {
this._databaseNameInputBox = new Dropdown(databaseName, this._contextViewService, this._layoutService, {
values: [this._defaultDatabaseName, this._loadingDatabaseName],
strictSelection: false,
placeholder: this._defaultDatabaseName,