mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 18:46:34 -05:00
Remove references to query model service in query code (#6513)
* remove references of query model service from query code * fix tests * clean up the code
This commit is contained in:
@@ -24,7 +24,6 @@ import {
|
||||
RunQueryOnConnectionMode
|
||||
} from 'sql/platform/connection/common/connectionManagement';
|
||||
import { QueryEditor } from 'sql/workbench/parts/query/browser/queryEditor';
|
||||
import { IQueryModelService } from 'sql/platform/query/common/queryModel';
|
||||
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
|
||||
import { attachEditableDropdownStyler, attachSelectBoxStyler } from 'sql/platform/theme/common/styler';
|
||||
import { Dropdown } from 'sql/base/parts/editableDropdown/browser/dropdown';
|
||||
@@ -107,9 +106,7 @@ export class RunQueryAction extends QueryTaskbarAction {
|
||||
|
||||
constructor(
|
||||
editor: QueryEditor,
|
||||
@IQueryModelService protected readonly queryModelService: IQueryModelService,
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@IExtensionTipsService private readonly extensionTipsService: IExtensionTipsService
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService
|
||||
) {
|
||||
super(connectionManagementService, editor, RunQueryAction.ID, RunQueryAction.EnabledClass);
|
||||
this.label = nls.localize('runQueryLabel', "Run");
|
||||
@@ -178,8 +175,7 @@ export class CancelQueryAction extends QueryTaskbarAction {
|
||||
|
||||
constructor(
|
||||
editor: QueryEditor,
|
||||
@IQueryModelService private readonly queryModelService: IQueryModelService,
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
) {
|
||||
super(connectionManagementService, editor, CancelQueryAction.ID, CancelQueryAction.EnabledClass);
|
||||
this.enabled = false;
|
||||
@@ -188,7 +184,7 @@ export class CancelQueryAction extends QueryTaskbarAction {
|
||||
|
||||
public run(): Promise<void> {
|
||||
if (this.isConnected(this.editor)) {
|
||||
this.queryModelService.cancelQuery(this.editor.input.uri);
|
||||
this.editor.input.runner.cancelQuery();
|
||||
}
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user