mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 03:28:33 -05:00
More builder removal (#4810)
* remove more builder references * formatting
This commit is contained in:
@@ -7,15 +7,14 @@
|
||||
|
||||
import { Graph } from './graphInsight';
|
||||
import { IInsightData } from 'sql/parts/dashboard/widgets/insights/interfaces';
|
||||
import { DataDirection, ChartType, DataType } from 'sql/parts/dashboard/widgets/insights/views/charts/interfaces';
|
||||
import { DataDirection, ChartType } from 'sql/parts/dashboard/widgets/insights/views/charts/interfaces';
|
||||
import { ImageInsight } from './imageInsight';
|
||||
import { TableInsight } from './tableInsight';
|
||||
import { IInsightOptions, IInsight, InsightType, IInsightCtor } from './interfaces';
|
||||
import { CountInsight } from './countInsight';
|
||||
|
||||
import { Builder } from 'sql/base/browser/builder';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Dimension } from 'vs/base/browser/dom';
|
||||
import { Dimension, clearNode } from 'vs/base/browser/dom';
|
||||
import { deepClone } from 'vs/base/common/objects';
|
||||
|
||||
const defaultOptions: IInsightOptions = {
|
||||
@@ -75,7 +74,7 @@ export class Insight {
|
||||
this.insight.dispose();
|
||||
}
|
||||
|
||||
new Builder(this.container).empty();
|
||||
clearNode(this.container);
|
||||
|
||||
let ctor = this.findctor(this.options.type);
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
|
||||
import 'vs/css!sql/parts/query/editor/media/queryActions';
|
||||
import * as nls from 'vs/nls';
|
||||
import { Builder, $ } from 'sql/base/browser/builder';
|
||||
import { Dropdown } from 'sql/base/browser/ui/editableDropdown/dropdown';
|
||||
import { Action, IActionItem, IActionRunner } from 'vs/base/common/actions';
|
||||
import { EventEmitter } from 'sql/base/common/eventEmitter';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { attachEditableDropdownStyler, attachSelectBoxStyler } from 'sql/platform/theme/common/styler';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { append, $ } from 'vs/base/browser/dom';
|
||||
|
||||
import { ISelectionData } from 'azdata';
|
||||
import {
|
||||
@@ -24,10 +24,10 @@ import {
|
||||
} from 'sql/platform/connection/common/connectionManagement';
|
||||
import { QueryEditor } from 'sql/parts/query/editor/queryEditor';
|
||||
import { IQueryModelService } from 'sql/platform/query/common/queryModel';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { attachEditableDropdownStyler, attachSelectBoxStyler } from 'sql/platform/theme/common/styler';
|
||||
import { EventEmitter } from 'sql/base/common/eventEmitter';
|
||||
import { Dropdown } from 'sql/base/browser/ui/editableDropdown/dropdown';
|
||||
|
||||
/**
|
||||
* Action class that query-based Actions will extend. This base class automatically handles activating and
|
||||
@@ -436,7 +436,7 @@ export class ListDatabasesActionItem extends EventEmitter implements IActionItem
|
||||
private _context: any;
|
||||
private _currentDatabaseName: string;
|
||||
private _isConnected: boolean;
|
||||
private $databaseListDropdown: Builder;
|
||||
private _databaseListDropdown: HTMLElement;
|
||||
private _dropdown: Dropdown;
|
||||
private _databaseSelectBox: SelectBox;
|
||||
private _isInAccessibilityMode: boolean;
|
||||
@@ -452,17 +452,17 @@ export class ListDatabasesActionItem extends EventEmitter implements IActionItem
|
||||
) {
|
||||
super();
|
||||
this._toDispose = [];
|
||||
this.$databaseListDropdown = $('.databaseListDropdown');
|
||||
this._databaseListDropdown = $('.databaseListDropdown');
|
||||
this._isInAccessibilityMode = this._configurationService.getValue('editor.accessibilitySupport') === 'on';
|
||||
|
||||
if (this._isInAccessibilityMode) {
|
||||
this._databaseSelectBox = new SelectBox([this._selectDatabaseString], this._selectDatabaseString, contextViewProvider, undefined, { ariaLabel: this._selectDatabaseString });
|
||||
this._databaseSelectBox.render(this.$databaseListDropdown.getHTMLElement());
|
||||
this._databaseSelectBox.render(this._databaseListDropdown);
|
||||
this._databaseSelectBox.onDidSelect(e => { this.databaseSelected(e.selected); });
|
||||
this._databaseSelectBox.disable();
|
||||
|
||||
} else {
|
||||
this._dropdown = new Dropdown(this.$databaseListDropdown.getHTMLElement(), contextViewProvider, {
|
||||
this._dropdown = new Dropdown(this._databaseListDropdown, contextViewProvider, {
|
||||
strictSelection: true,
|
||||
placeholder: this._selectDatabaseString,
|
||||
ariaLabel: this._selectDatabaseString,
|
||||
@@ -479,7 +479,7 @@ export class ListDatabasesActionItem extends EventEmitter implements IActionItem
|
||||
|
||||
// PUBLIC METHODS //////////////////////////////////////////////////////
|
||||
public render(container: HTMLElement): void {
|
||||
this.$databaseListDropdown.appendTo(container);
|
||||
append(container, this._databaseListDropdown);
|
||||
}
|
||||
|
||||
public style(styles) {
|
||||
|
||||
@@ -8,9 +8,8 @@ import * as QP from 'html-query-plan';
|
||||
|
||||
import { IPanelView, IPanelTab } from 'sql/base/browser/ui/panel/panel';
|
||||
|
||||
import { Dimension } from 'vs/base/browser/dom';
|
||||
import { Dimension, clearNode } from 'vs/base/browser/dom';
|
||||
import { localize } from 'vs/nls';
|
||||
import { Builder } from 'sql/base/browser/builder';
|
||||
import { dispose, Disposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
export class QueryPlanState {
|
||||
@@ -102,7 +101,7 @@ export class QueryPlan {
|
||||
|
||||
public set xml(xml: string) {
|
||||
this._xml = xml;
|
||||
new Builder(this.container).empty();
|
||||
clearNode(this.container);
|
||||
if (this.xml) {
|
||||
QP.showPlan(this.container, this._xml, {
|
||||
jsTooltips: false
|
||||
|
||||
@@ -8,7 +8,6 @@ import errors = require('vs/base/common/errors');
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { Tree } from 'vs/base/parts/tree/browser/treeImpl';
|
||||
import * as builder from 'sql/base/browser/builder';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { attachListStyler } from 'vs/platform/theme/common/styler';
|
||||
import { ITree } from 'vs/base/parts/tree/browser/tree';
|
||||
@@ -23,14 +22,13 @@ import { TaskHistoryActionProvider } from 'sql/parts/taskHistory/viewlet/taskHis
|
||||
import { ITaskService } from 'sql/platform/taskHistory/common/taskService';
|
||||
import { TaskNode, TaskStatus } from 'sql/parts/taskHistory/common/taskNode';
|
||||
import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMessageService';
|
||||
|
||||
const $ = builder.$;
|
||||
import { hide, $, append } from 'vs/base/browser/dom';
|
||||
|
||||
/**
|
||||
* TaskHistoryView implements the dynamic tree view.
|
||||
*/
|
||||
export class TaskHistoryView {
|
||||
private _messages: builder.Builder;
|
||||
private _messages: HTMLElement;
|
||||
private _tree: ITree;
|
||||
private _toDispose: IDisposable[] = [];
|
||||
|
||||
@@ -50,13 +48,13 @@ export class TaskHistoryView {
|
||||
let taskNode = this._taskService.getAllTasks();
|
||||
|
||||
// Add div to display no task executed message
|
||||
this._messages = $('div.empty-task-message').appendTo(container);
|
||||
this._messages = append(container, $('div.empty-task-message'));
|
||||
|
||||
if (taskNode && taskNode.hasChildren) {
|
||||
this._messages.hide();
|
||||
hide(this._messages);
|
||||
}
|
||||
let noTaskMessage = localize('noTaskMessage', 'No task history to display. Try backup or restore task to view its execution status.');
|
||||
$('span').text(noTaskMessage).appendTo(this._messages);
|
||||
append(this._messages, $('span')).innerText = noTaskMessage;
|
||||
|
||||
this._tree = this.createTaskHistoryTree(container, this._instantiationService);
|
||||
this._toDispose.push(this._tree.onDidChangeSelection((event) => this.onSelected(event)));
|
||||
@@ -65,7 +63,7 @@ export class TaskHistoryView {
|
||||
this._toDispose.push(attachListStyler(this._tree, this._themeService));
|
||||
|
||||
this._toDispose.push(this._taskService.onAddNewTask(args => {
|
||||
this._messages.hide();
|
||||
hide(this._messages);
|
||||
this.refreshTree();
|
||||
}));
|
||||
this._toDispose.push(this._taskService.onTaskComplete(task => {
|
||||
@@ -174,4 +172,4 @@ export class TaskHistoryView {
|
||||
this._tree.dispose();
|
||||
this._toDispose = dispose(this._toDispose);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user