mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 01:25:39 -05:00
Rework how we handle custom editors (#5696)
* update how we handle editors * small edit * handle changing languages * implement generic language association * implement notebook serializers * fix tests * formatting * update how we handle editors * small edit * handle changing languages * implement generic language association * implement notebook serializers * fix tests * formatting * fix broken * fix compile * fix tests * add back in removed note book contributions * fix layering * fix compile errors * fix workbench * fix hanging promises * idk why these changed * fix change * add comments to language change code * fix a few bugs * add query plan association
This commit is contained in:
@@ -9,10 +9,10 @@ import { IntervalTimer } from 'vs/base/common/async';
|
||||
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
import { localize } from 'vs/nls';
|
||||
import { QueryInput } from 'sql/workbench/contrib/query/common/queryInput';
|
||||
import QueryRunner from 'sql/platform/query/common/queryRunner';
|
||||
import { parseNumAsTimeString } from 'sql/platform/connection/common/utils';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { QueryEditorInput } from 'sql/workbench/contrib/query/common/queryEditorInput';
|
||||
import { IStatusbarService, IStatusbarEntryAccessor, StatusbarAlignment } from 'vs/workbench/services/statusbar/common/statusbar';
|
||||
|
||||
export class TimeElapsedStatusBarContributions extends Disposable implements IWorkbenchContribution {
|
||||
@@ -56,7 +56,7 @@ export class TimeElapsedStatusBarContributions extends Disposable implements IWo
|
||||
this.disposable.clear();
|
||||
this.hide();
|
||||
const activeInput = this.editorService.activeEditor;
|
||||
if (activeInput && activeInput instanceof QueryInput && activeInput.uri) {
|
||||
if (activeInput && activeInput instanceof QueryEditorInput && activeInput.uri) {
|
||||
const uri = activeInput.uri;
|
||||
const runner = this.queryModelService.getQueryRunner(uri);
|
||||
if (runner) {
|
||||
@@ -148,7 +148,7 @@ export class RowCountStatusBarContributions extends Disposable implements IWorkb
|
||||
this.disposable.clear();
|
||||
this.hide();
|
||||
const activeInput = this.editorService.activeEditor;
|
||||
if (activeInput && activeInput instanceof QueryInput && activeInput.uri) {
|
||||
if (activeInput && activeInput instanceof QueryEditorInput && activeInput.uri) {
|
||||
const uri = activeInput.uri;
|
||||
const runner = this.queryModelService.getQueryRunner(uri);
|
||||
if (runner) {
|
||||
@@ -227,7 +227,7 @@ export class QueryStatusStatusBarContributions extends Disposable implements IWo
|
||||
this.hide();
|
||||
this.visisbleUri = undefined;
|
||||
const activeInput = this.editorService.activeEditor;
|
||||
if (activeInput && activeInput instanceof QueryInput && activeInput.uri) {
|
||||
if (activeInput && activeInput instanceof QueryEditorInput && activeInput.uri) {
|
||||
this.visisbleUri = activeInput.uri;
|
||||
const runner = this.queryModelService.getQueryRunner(this.visisbleUri);
|
||||
if (runner && runner.isExecuting) {
|
||||
|
||||
Reference in New Issue
Block a user