From 4f864fd5bd6ca80312f66404de28d4714cb1877f Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Tue, 3 Jul 2018 11:49:17 -0700 Subject: [PATCH] add escape formatting (#1825) --- .../profiler/editor/controller/profilerTableEditor.ts | 7 +++++-- src/sql/parts/profiler/editor/profilerEditor.ts | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/sql/parts/profiler/editor/controller/profilerTableEditor.ts b/src/sql/parts/profiler/editor/controller/profilerTableEditor.ts index 5bd6478919..9a8990d4bf 100644 --- a/src/sql/parts/profiler/editor/controller/profilerTableEditor.ts +++ b/src/sql/parts/profiler/editor/controller/profilerTableEditor.ts @@ -21,12 +21,12 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IEditorAction } from 'vs/editor/common/editorCommon'; import { IOverlayWidget } from 'vs/editor/browser/editorBrowser'; import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/findState'; -import { Builder } from 'vs/base/browser/builder'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { Event, Emitter } from 'vs/base/common/event'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { Dimension } from 'vs/base/browser/dom'; +import { textFormatter } from 'sql/parts/grid/services/sharedServices'; export class ProfilerTableEditor extends BaseEditor implements IProfilerController, ITableController { @@ -89,7 +89,10 @@ export class ProfilerTableEditor extends BaseEditor implements IProfilerControll this._columnListener.dispose(); } this._columnListener = input.onColumnsChanged(e => { - this._profilerTable.columns = e; + this._profilerTable.columns = e.map(e => { + e.formatter = textFormatter; + return e; + }); this._profilerTable.autosizeColumns(); }); if (this._stateListener) { diff --git a/src/sql/parts/profiler/editor/profilerEditor.ts b/src/sql/parts/profiler/editor/profilerEditor.ts index f07217f092..9244d6e3c5 100644 --- a/src/sql/parts/profiler/editor/profilerEditor.ts +++ b/src/sql/parts/profiler/editor/profilerEditor.ts @@ -19,7 +19,6 @@ import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox'; import * as DOM from 'vs/base/browser/dom'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; -import { Builder } from 'vs/base/browser/builder'; import { TPromise } from 'vs/base/common/winjs.base'; import { EditorOptions } from 'vs/workbench/common/editor'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -44,6 +43,7 @@ import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRe import { CommonFindController, FindStartFocusAction } from 'vs/editor/contrib/find/findController'; import * as types from 'vs/base/common/types'; import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; +import { textFormatter } from 'sql/parts/grid/services/sharedServices'; class BasicView extends View { private _previousSize: number; @@ -271,12 +271,14 @@ export class ProfilerEditor extends BaseEditor { { id: 'label', name: nls.localize('label', "Label"), - field: 'label' + field: 'label', + formatter: textFormatter }, { id: 'value', name: nls.localize('profilerEditor.value', "Value"), - field: 'value' + field: 'value', + formatter: textFormatter } ], { forceFitColumns: true });