mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Change hardcoded MSSQL provider name to use constant instead (#5953)
This commit is contained in:
@@ -7,6 +7,7 @@ import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { ExtHostQueryEditorShape, SqlMainContext, MainThreadQueryEditorShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import * as azdata from 'azdata';
|
||||
import { IQueryEvent } from 'sql/platform/query/common/queryModel';
|
||||
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
|
||||
|
||||
class ExtHostQueryDocument implements azdata.queryeditor.QueryDocument {
|
||||
constructor(
|
||||
@@ -57,13 +58,13 @@ export class ExtHostQueryEditor implements ExtHostQueryEditorShape {
|
||||
let listener: azdata.queryeditor.QueryEventListener = this._queryListeners[handle];
|
||||
if (listener) {
|
||||
let planXml = event.params ? event.params.planXml : undefined;
|
||||
listener.onQueryEvent(event.type, new ExtHostQueryDocument('MSSQL', fileUri, this._proxy), planXml);
|
||||
listener.onQueryEvent(event.type, new ExtHostQueryDocument(mssqlProviderName, fileUri, this._proxy), planXml);
|
||||
}
|
||||
}
|
||||
|
||||
public $getQueryDocument(fileUri: string): Thenable<azdata.queryeditor.QueryDocument> {
|
||||
return new Promise((resolve) => {
|
||||
resolve(new ExtHostQueryDocument('MSSQL', fileUri, this._proxy));
|
||||
resolve(new ExtHostQueryDocument(mssqlProviderName, fileUri, this._proxy));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ import { ExtHostStorage } from 'vs/workbench/api/common/extHostStorage';
|
||||
import * as extHostTypes from 'vs/workbench/api/common/extHostTypes';
|
||||
import { ISchemeTransformer } from 'vs/workbench/api/common/extHostLanguageFeatures';
|
||||
import { AzureResource } from 'sql/platform/accounts/common/interfaces';
|
||||
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
|
||||
|
||||
export interface ISqlExtensionApiFactory {
|
||||
vsCodeFactory(extension: IExtensionDescription, registry: ExtensionDescriptionRegistry, configProvider: ExtHostConfigProvider): typeof vscode;
|
||||
@@ -460,7 +461,7 @@ export function createApiFactory(
|
||||
},
|
||||
|
||||
registerQueryEventListener(listener: azdata.queryeditor.QueryEventListener): void {
|
||||
extHostQueryEditor.$registerQueryInfoListener('MSSQL', listener);
|
||||
extHostQueryEditor.$registerQueryInfoListener(mssqlProviderName, listener);
|
||||
},
|
||||
|
||||
getQueryDocument(fileUri: string): Thenable<azdata.queryeditor.QueryDocument> {
|
||||
|
||||
Reference in New Issue
Block a user