mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from master
This commit is contained in:
@@ -238,9 +238,9 @@ export class ProfilerFindNext implements IEditorAction {
|
||||
|
||||
constructor(private profiler: IProfilerController) { }
|
||||
|
||||
run(): TPromise<void> {
|
||||
run(): Promise<void> {
|
||||
this.profiler.findNext();
|
||||
return TPromise.as(null);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
isSupported(): boolean {
|
||||
@@ -255,9 +255,9 @@ export class ProfilerFindPrevious implements IEditorAction {
|
||||
|
||||
constructor(private profiler: IProfilerController) { }
|
||||
|
||||
run(): TPromise<void> {
|
||||
run(): Promise<void> {
|
||||
this.profiler.findPrevious();
|
||||
return TPromise.as(null);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
isSupported(): boolean {
|
||||
|
||||
@@ -14,7 +14,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import * as nls from 'vs/nls';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import { Builder } from 'sql/base/browser/builder';
|
||||
import { SelectBox } from 'vs/base/browser/ui/selectBox/selectBox';
|
||||
import { Tree } from 'vs/base/parts/tree/browser/treeImpl';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
|
||||
@@ -11,7 +11,7 @@ import { Modal } from 'sql/workbench/browser/modal/modal';
|
||||
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
||||
import { attachButtonStyler, attachModalDialogStyler, attachInputBoxStyler } from 'sql/platform/theme/common/styler';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import { Builder } from 'sql/base/browser/builder';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
|
||||
@@ -88,7 +88,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
|
||||
|
||||
private _resizeSash: Sash;
|
||||
|
||||
private searchTimeoutHandle: number;
|
||||
private searchTimeoutHandle: NodeJS.Timer;
|
||||
|
||||
constructor(
|
||||
tableController: ITableController,
|
||||
@@ -329,13 +329,13 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
|
||||
private _onFindInputKeyDown(e: IKeyboardEvent): void {
|
||||
|
||||
if (e.equals(KeyCode.Enter)) {
|
||||
this._tableController.getAction(ACTION_IDS.FIND_NEXT).run().done(null, onUnexpectedError);
|
||||
this._tableController.getAction(ACTION_IDS.FIND_NEXT).run().then(null, onUnexpectedError);
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.equals(KeyMod.Shift | KeyCode.Enter)) {
|
||||
this._tableController.getAction(ACTION_IDS.FIND_NEXT).run().done(null, onUnexpectedError);
|
||||
this._tableController.getAction(ACTION_IDS.FIND_NEXT).run().then(null, onUnexpectedError);
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
@@ -376,7 +376,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
|
||||
|
||||
private _buildFindPart(): HTMLElement {
|
||||
// Find input
|
||||
this._findInput = this._register(new FindInput(null, this._contextViewProvider, {
|
||||
this._findInput = this._register(new FindInput(null, this._contextViewProvider, true, {
|
||||
width: FIND_INPUT_AREA_WIDTH,
|
||||
label: NLS_FIND_INPUT_LABEL,
|
||||
placeholder: NLS_FIND_INPUT_PLACEHOLDER,
|
||||
@@ -434,7 +434,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
|
||||
label: NLS_PREVIOUS_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.PreviousMatchFindAction),
|
||||
className: 'previous',
|
||||
onTrigger: () => {
|
||||
this._tableController.getAction(ACTION_IDS.FIND_PREVIOUS).run().done(null, onUnexpectedError);
|
||||
this._tableController.getAction(ACTION_IDS.FIND_PREVIOUS).run().then(null, onUnexpectedError);
|
||||
},
|
||||
onKeyDown: (e) => { }
|
||||
}));
|
||||
@@ -444,7 +444,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
|
||||
label: NLS_NEXT_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.NextMatchFindAction),
|
||||
className: 'next',
|
||||
onTrigger: () => {
|
||||
this._tableController.getAction(ACTION_IDS.FIND_NEXT).run().done(null, onUnexpectedError);
|
||||
this._tableController.getAction(ACTION_IDS.FIND_NEXT).run().then(null, onUnexpectedError);
|
||||
},
|
||||
onKeyDown: (e) => { }
|
||||
}));
|
||||
|
||||
@@ -28,6 +28,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { Dimension } from 'vs/base/browser/dom';
|
||||
import { textFormatter } from 'sql/parts/grid/services/sharedServices';
|
||||
import { PROFILER_MAX_MATCHES } from 'sql/parts/profiler/editor/controller/profilerFindWidget';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { IStatusbarService, StatusbarAlignment, IStatusbarEntry } from 'vs/platform/statusbar/common/statusbar';
|
||||
import { localize } from 'vs/nls';
|
||||
|
||||
@@ -62,9 +63,10 @@ export class ProfilerTableEditor extends BaseEditor implements IProfilerControll
|
||||
@IKeybindingService private _keybindingService: IKeybindingService,
|
||||
@IContextKeyService private _contextKeyService: IContextKeyService,
|
||||
@IInstantiationService private _instantiationService: IInstantiationService,
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IStatusbarService private _statusbarService: IStatusbarService
|
||||
) {
|
||||
super(ProfilerTableEditor.ID, telemetryService, _themeService);
|
||||
super(ProfilerTableEditor.ID, telemetryService, _themeService, storageService);
|
||||
this._actionMap[ACTION_IDS.FIND_NEXT] = this._instantiationService.createInstance(ProfilerFindNext, this);
|
||||
this._actionMap[ACTION_IDS.FIND_PREVIOUS] = this._instantiationService.createInstance(ProfilerFindPrevious, this);
|
||||
this._showStatusBarItem = true;
|
||||
|
||||
@@ -17,12 +17,11 @@ import { CONTEXT_PROFILER_EDITOR, PROFILER_TABLE_COMMAND_SEARCH } from './interf
|
||||
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
|
||||
import { textFormatter } from 'sql/parts/grid/services/sharedServices';
|
||||
import { ProfilerResourceEditor } from './profilerResourceEditor';
|
||||
|
||||
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import * as nls from 'vs/nls';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
@@ -38,6 +37,7 @@ import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler';
|
||||
import { DARK, HIGH_CONTRAST } from 'vs/platform/theme/common/themeService';
|
||||
import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { IView, SplitView, Sizing } from 'vs/base/browser/ui/splitview/splitview';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
@@ -158,9 +158,10 @@ export class ProfilerEditor extends BaseEditor {
|
||||
@IProfilerService private _profilerService: IProfilerService,
|
||||
@IContextKeyService private _contextKeyService: IContextKeyService,
|
||||
@IContextViewService private _contextViewService: IContextViewService,
|
||||
@IEditorService editorService: IEditorService
|
||||
@IEditorService editorService: IEditorService,
|
||||
@IStorageService storageService: IStorageService
|
||||
) {
|
||||
super(ProfilerEditor.ID, telemetryService, themeService);
|
||||
super(ProfilerEditor.ID, telemetryService, themeService, storageService);
|
||||
this._profilerEditorContextKey = CONTEXT_PROFILER_EDITOR.bindTo(this._contextKeyService);
|
||||
|
||||
if (editorService) {
|
||||
@@ -462,7 +463,8 @@ export class ProfilerEditor extends BaseEditor {
|
||||
seedSearchStringFromGlobalClipboard: false,
|
||||
seedSearchStringFromSelection: (controller.getState().searchString.length === 0),
|
||||
shouldFocus: FindStartFocusAction.FocusFindInput,
|
||||
shouldAnimate: true
|
||||
shouldAnimate: true,
|
||||
updateSearchScope: false
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -21,7 +21,7 @@ import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { escape } from 'sql/base/common/strings';
|
||||
import * as types from 'vs/base/common/types';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { FilterData } from 'sql/parts/profiler/service/profilerFilter';
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import { FoldingController } from 'vs/editor/contrib/folding/folding';
|
||||
import { StandaloneCodeEditor } from 'vs/editor/standalone/browser/standaloneCodeEditor';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { IWindowService } from 'vs/platform/windows/common/windows';
|
||||
|
||||
class ProfilerResourceCodeEditor extends StandaloneCodeEditor {
|
||||
|
||||
@@ -50,13 +51,13 @@ export class ProfilerResourceEditor extends BaseTextEditor {
|
||||
@IStorageService storageService: IStorageService,
|
||||
@ITextResourceConfigurationService configurationService: ITextResourceConfigurationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IModeService modeService: IModeService,
|
||||
@ITextFileService textFileService: ITextFileService,
|
||||
@IEditorService protected editorService: IEditorService,
|
||||
@IEditorGroupsService editorGroupService: IEditorGroupsService
|
||||
@IEditorGroupsService editorGroupService: IEditorGroupsService,
|
||||
@IWindowService windowService: IWindowService
|
||||
|
||||
) {
|
||||
super(ProfilerResourceEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService, editorService, editorGroupService);
|
||||
super(ProfilerResourceEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService, editorService, editorGroupService, windowService);
|
||||
}
|
||||
|
||||
public createEditorControl(parent: HTMLElement, configuration: IEditorOptions): editorCommon.IEditor {
|
||||
|
||||
Reference in New Issue
Block a user