mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Adds build connection info feature (#2192)
* connection string * formatting * change serailize reponse type to match connect params * add connection string serialization * readd the connection string to the connection widget * format * remove unnecessary change * update serializer to require provider * update name of function * fix function name * bump dataprotocol and sqltools * revert unnecessary change * remove more unnecessary chagnes * bump sqltoolsserivce * adde configuration for auto parsing the clipboard
This commit is contained in:
committed by
Karl Burtram
parent
21c4429c6e
commit
033c8cb8b1
@@ -17,6 +17,14 @@
|
|||||||
"compile": "gulp compile-extension:mssql-client",
|
"compile": "gulp compile-extension:mssql-client",
|
||||||
"update-grammar": "node ../../build/npm/update-grammar.js Microsoft/vscode-mssql syntaxes/SQL.plist ./syntaxes/sql.tmLanguage.json"
|
"update-grammar": "node ../../build/npm/update-grammar.js Microsoft/vscode-mssql syntaxes/SQL.plist ./syntaxes/sql.tmLanguage.json"
|
||||||
},
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#0.2.6",
|
||||||
|
"opener": "^1.4.3",
|
||||||
|
"service-downloader": "github:anthonydresser/service-downloader#0.1.4",
|
||||||
|
"vscode-extension-telemetry": "^0.0.15"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
},
|
||||||
"contributes": {
|
"contributes": {
|
||||||
"languages": [
|
"languages": [
|
||||||
{
|
{
|
||||||
@@ -656,13 +664,5 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#0.2.5",
|
|
||||||
"opener": "^1.4.3",
|
|
||||||
"service-downloader": "github:anthonydresser/service-downloader#0.1.4",
|
|
||||||
"vscode-extension-telemetry": "^0.0.15"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/v{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
|
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/v{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
|
||||||
"version": "1.5.0-alpha.27",
|
"version": "1.5.0-alpha.28",
|
||||||
"downloadFileNames": {
|
"downloadFileNames": {
|
||||||
"Windows_86": "win-x86-netcoreapp2.1.zip",
|
"Windows_86": "win-x86-netcoreapp2.1.zip",
|
||||||
"Windows_64": "win-x64-netcoreapp2.1.zip",
|
"Windows_64": "win-x64-netcoreapp2.1.zip",
|
||||||
|
|||||||
@@ -64,9 +64,9 @@ core-util-is@~1.0.0:
|
|||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||||
|
|
||||||
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#0.2.5":
|
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#0.2.6":
|
||||||
version "0.2.5"
|
version "0.2.6"
|
||||||
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/6aca9c6850d2b2e1e59f09d67e15922f5acec5ea"
|
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/b40358cdf33fbc4076a5621363d95350ab08d882"
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-languageclient "3.5.1"
|
vscode-languageclient "3.5.1"
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export abstract class Modal extends Disposable implements IThemable {
|
|||||||
private _name: string,
|
private _name: string,
|
||||||
private _partService: IPartService,
|
private _partService: IPartService,
|
||||||
private _telemetryService: ITelemetryService,
|
private _telemetryService: ITelemetryService,
|
||||||
private _contextKeyService: IContextKeyService,
|
_contextKeyService: IContextKeyService,
|
||||||
options?: IModalOptions
|
options?: IModalOptions
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
|
|||||||
@@ -92,5 +92,10 @@ configurationRegistry.registerConfiguration({
|
|||||||
'description': localize('sql.defaultEngineDescription', 'Default SQL Engine to use. This drives default language provider in .sql files and the default to use when creating a new connection. Valid option is currently MSSQL'),
|
'description': localize('sql.defaultEngineDescription', 'Default SQL Engine to use. This drives default language provider in .sql files and the default to use when creating a new connection. Valid option is currently MSSQL'),
|
||||||
'default': 'MSSQL'
|
'default': 'MSSQL'
|
||||||
},
|
},
|
||||||
|
'connection.parseClipboardForConnectionString': {
|
||||||
|
'type': 'boolean',
|
||||||
|
'default': true,
|
||||||
|
'description': localize('connection.parseClipboardForConnectionStringDescription', 'Attempt to parse the contents of the clipboard when the connection dialog is opened or a paste is performed.')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -266,6 +266,11 @@ export interface IConnectionManagementService {
|
|||||||
* Get the connection string for the provided connection profile
|
* Get the connection string for the provided connection profile
|
||||||
*/
|
*/
|
||||||
getConnectionString(ownerUri: string, includePassword: boolean): Thenable<string>;
|
getConnectionString(ownerUri: string, includePassword: boolean): Thenable<string>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize connection string with optional provider
|
||||||
|
*/
|
||||||
|
buildConnectionInfo(connectionString: string, provider?: string): Thenable<sqlops.ConnectionInfo>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const IConnectionDialogService = createDecorator<IConnectionDialogService>('connectionDialogService');
|
export const IConnectionDialogService = createDecorator<IConnectionDialogService>('connectionDialogService');
|
||||||
|
|||||||
@@ -1366,4 +1366,14 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize connection with options provider
|
||||||
|
* TODO this could be a map reduce operation
|
||||||
|
*/
|
||||||
|
public buildConnectionInfo(connectionString: string, provider: string): Thenable<sqlops.ConnectionInfo> {
|
||||||
|
return this._providers.get(provider).onReady.then(e => {
|
||||||
|
return e.buildConnectionInfo(connectionString);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ import { ITree } from 'vs/base/parts/tree/browser/tree';
|
|||||||
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import * as styler from 'vs/platform/theme/common/styler';
|
import * as styler from 'vs/platform/theme/common/styler';
|
||||||
import { TPromise } from 'vs/base/common/winjs.base';
|
|
||||||
import * as DOM from 'vs/base/browser/dom';
|
import * as DOM from 'vs/base/browser/dom';
|
||||||
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||||
|
|
||||||
@@ -376,6 +375,7 @@ export class ConnectionDialogWidget extends Modal {
|
|||||||
*/
|
*/
|
||||||
public open(recentConnections: boolean) {
|
public open(recentConnections: boolean) {
|
||||||
this._panel.showTab(this._recentConnectionTabId);
|
this._panel.showTab(this._recentConnectionTabId);
|
||||||
|
|
||||||
this.show();
|
this.show();
|
||||||
if (recentConnections) {
|
if (recentConnections) {
|
||||||
this._noRecentConnectionBuilder.hide();
|
this._noRecentConnectionBuilder.hide();
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ import * as Constants from 'sql/parts/connection/common/constants';
|
|||||||
import { ConnectionProfileGroup, IConnectionProfileGroup } from 'sql/parts/connection/common/connectionProfileGroup';
|
import { ConnectionProfileGroup, IConnectionProfileGroup } from 'sql/parts/connection/common/connectionProfileGroup';
|
||||||
import { attachInputBoxStyler, attachButtonStyler, attachEditableDropdownStyler } from 'sql/common/theme/styler';
|
import { attachInputBoxStyler, attachButtonStyler, attachEditableDropdownStyler } from 'sql/common/theme/styler';
|
||||||
import { Dropdown } from 'sql/base/browser/ui/editableDropdown/dropdown';
|
import { Dropdown } from 'sql/base/browser/ui/editableDropdown/dropdown';
|
||||||
|
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
||||||
|
import { ICapabilitiesService } from 'sql/services/capabilities/capabilitiesService';
|
||||||
|
import { ConnectionProfile } from '../common/connectionProfile';
|
||||||
|
|
||||||
import * as sqlops from 'sqlops';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
@@ -32,6 +35,8 @@ import { OS, OperatingSystem } from 'vs/base/common/platform';
|
|||||||
import { Builder, $ } from 'vs/base/browser/builder';
|
import { Builder, $ } from 'vs/base/browser/builder';
|
||||||
import { MessageType } from 'vs/base/browser/ui/inputbox/inputBox';
|
import { MessageType } from 'vs/base/browser/ui/inputbox/inputBox';
|
||||||
import { endsWith, startsWith } from 'vs/base/common/strings';
|
import { endsWith, startsWith } from 'vs/base/common/strings';
|
||||||
|
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||||
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||||
|
|
||||||
export class ConnectionWidget {
|
export class ConnectionWidget {
|
||||||
private _builder: Builder;
|
private _builder: Builder;
|
||||||
@@ -85,7 +90,12 @@ export class ConnectionWidget {
|
|||||||
callbacks: IConnectionComponentCallbacks,
|
callbacks: IConnectionComponentCallbacks,
|
||||||
providerName: string,
|
providerName: string,
|
||||||
@IThemeService private _themeService: IThemeService,
|
@IThemeService private _themeService: IThemeService,
|
||||||
@IContextViewService private _contextViewService: IContextViewService) {
|
@IContextViewService private _contextViewService: IContextViewService,
|
||||||
|
@IConnectionManagementService private _connectionManagementService: IConnectionManagementService,
|
||||||
|
@ICapabilitiesService private _capabilitiesService: ICapabilitiesService,
|
||||||
|
@IClipboardService private _clipboardService: IClipboardService,
|
||||||
|
@IConfigurationService private _configurationService: IConfigurationService
|
||||||
|
) {
|
||||||
this._callbacks = callbacks;
|
this._callbacks = callbacks;
|
||||||
this._toDispose = [];
|
this._toDispose = [];
|
||||||
this._optionsMaps = {};
|
this._optionsMaps = {};
|
||||||
@@ -120,9 +130,29 @@ export class ConnectionWidget {
|
|||||||
if (this._authTypeSelectBox) {
|
if (this._authTypeSelectBox) {
|
||||||
this.onAuthTypeSelected(this._authTypeSelectBox.value);
|
this.onAuthTypeSelected(this._authTypeSelectBox.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DOM.addDisposableListener(container, 'paste', e => {
|
||||||
|
this._handleClipboard();
|
||||||
|
});
|
||||||
|
|
||||||
DOM.append(container, this._builder.getHTMLElement());
|
DOM.append(container, this._builder.getHTMLElement());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _handleClipboard(): void {
|
||||||
|
if (this._configurationService.getValue<boolean>('connection.parseClipboardForConnectionString')) {
|
||||||
|
let paste = this._clipboardService.readText();
|
||||||
|
this._connectionManagementService.buildConnectionInfo(paste, this._providerName).then(e => {
|
||||||
|
if (e) {
|
||||||
|
let profile = new ConnectionProfile(this._capabilitiesService, this._providerName);
|
||||||
|
profile.options = e.options;
|
||||||
|
if (profile.serverName) {
|
||||||
|
this.initDialog(profile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fillInConnectionForm(): void {
|
private fillInConnectionForm(): void {
|
||||||
let serverNameOption = this._optionsMaps[ConnectionOptionSpecialType.serverName];
|
let serverNameOption = this._optionsMaps[ConnectionOptionSpecialType.serverName];
|
||||||
let serverNameBuilder = DialogHelper.appendRow(this._tableContainer, serverNameOption.displayName, 'connection-label', 'connection-input');
|
let serverNameBuilder = DialogHelper.appendRow(this._tableContainer, serverNameOption.displayName, 'connection-label', 'connection-input');
|
||||||
@@ -130,7 +160,7 @@ export class ConnectionWidget {
|
|||||||
validationOptions: {
|
validationOptions: {
|
||||||
validation: (value: string) => {
|
validation: (value: string) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return ({ type: MessageType.ERROR, content: localize('connectionWidget.missingRequireField', '{0} is required.', serverNameOption.displayName)});
|
return ({ type: MessageType.ERROR, content: localize('connectionWidget.missingRequireField', '{0} is required.', serverNameOption.displayName) });
|
||||||
} else if (startsWith(value, ' ') || endsWith(value, ' ')) {
|
} else if (startsWith(value, ' ') || endsWith(value, ' ')) {
|
||||||
return ({ type: MessageType.WARNING, content: localize('connectionWidget.fieldWillBeTrimmed', '{0} will be trimmed.', serverNameOption.displayName) });
|
return ({ type: MessageType.WARNING, content: localize('connectionWidget.fieldWillBeTrimmed', '{0} will be trimmed.', serverNameOption.displayName) });
|
||||||
}
|
}
|
||||||
@@ -354,6 +384,7 @@ export class ConnectionWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public focusOnOpen(): void {
|
public focusOnOpen(): void {
|
||||||
|
this._handleClipboard();
|
||||||
this._serverNameInputBox.focus();
|
this._serverNameInputBox.focus();
|
||||||
this.focusPasswordIfNeeded();
|
this.focusPasswordIfNeeded();
|
||||||
this.clearValidationMessages();
|
this.clearValidationMessages();
|
||||||
|
|||||||
4
src/sql/sqlops.d.ts
vendored
4
src/sql/sqlops.d.ts
vendored
@@ -327,7 +327,9 @@ declare module 'sqlops' {
|
|||||||
|
|
||||||
rebuildIntelliSenseCache(connectionUri: string): Thenable<void>;
|
rebuildIntelliSenseCache(connectionUri: string): Thenable<void>;
|
||||||
|
|
||||||
getConnectionString(connectionUri: string, includePassword: boolean): Thenable<string> ;
|
getConnectionString(connectionUri: string, includePassword: boolean): Thenable<string>;
|
||||||
|
|
||||||
|
buildConnectionInfo?(connectionString: string): Thenable<ConnectionInfo>;
|
||||||
|
|
||||||
registerOnConnectionComplete(handler: (connSummary: ConnectionInfoSummary) => any): void;
|
registerOnConnectionComplete(handler: (connSummary: ConnectionInfoSummary) => any): void;
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
|||||||
import { Disposable } from 'vs/workbench/api/node/extHostTypes';
|
import { Disposable } from 'vs/workbench/api/node/extHostTypes';
|
||||||
import { SqlMainContext, MainThreadDataProtocolShape, ExtHostDataProtocolShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
import { SqlMainContext, MainThreadDataProtocolShape, ExtHostDataProtocolShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||||
import { DataProviderType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
import { DataProviderType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||||
|
import { TPromise } from 'vs/base/common/winjs.base';
|
||||||
|
|
||||||
export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||||
|
|
||||||
@@ -185,6 +186,15 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
|||||||
return this._resolveProvider<sqlops.ConnectionProvider>(handle).getConnectionString(connectionUri, includePassword);
|
return this._resolveProvider<sqlops.ConnectionProvider>(handle).getConnectionString(connectionUri, includePassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$buildConnectionInfo(handle: number, connectionString: string): Thenable<sqlops.ConnectionInfo> {
|
||||||
|
let provider = this._resolveProvider<sqlops.ConnectionProvider>(handle);
|
||||||
|
if (provider.buildConnectionInfo) {
|
||||||
|
return provider.buildConnectionInfo(connectionString);
|
||||||
|
} else {
|
||||||
|
return TPromise.as(undefined);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$rebuildIntelliSenseCache(handle: number, connectionUri: string): Thenable<void> {
|
$rebuildIntelliSenseCache(handle: number, connectionUri: string): Thenable<void> {
|
||||||
return this._resolveProvider<sqlops.ConnectionProvider>(handle).rebuildIntelliSenseCache(connectionUri);
|
return this._resolveProvider<sqlops.ConnectionProvider>(handle).rebuildIntelliSenseCache(connectionUri);
|
||||||
}
|
}
|
||||||
@@ -617,7 +627,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
|||||||
/**
|
/**
|
||||||
* Get Agent Proxies list
|
* Get Agent Proxies list
|
||||||
*/
|
*/
|
||||||
$getProxies(handle: number, ownerUri: string): Thenable<sqlops.AgentProxiesResult> {
|
$getProxies(handle: number, ownerUri: string): Thenable<sqlops.AgentProxiesResult> {
|
||||||
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).getProxies(ownerUri);
|
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).getProxies(ownerUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import { ISerializationService } from 'sql/services/serialization/serializationS
|
|||||||
import { IFileBrowserService } from 'sql/parts/fileBrowser/common/interfaces';
|
import { IFileBrowserService } from 'sql/parts/fileBrowser/common/interfaces';
|
||||||
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
|
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||||
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
|
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
|
||||||
import severity from 'vs/base/common/severity';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main thread class for handling data protocol management registration.
|
* Main thread class for handling data protocol management registration.
|
||||||
@@ -91,6 +90,9 @@ export class MainThreadDataProtocol implements MainThreadDataProtocolShape {
|
|||||||
getConnectionString(connectionUri: string, includePassword: boolean): Thenable<string> {
|
getConnectionString(connectionUri: string, includePassword: boolean): Thenable<string> {
|
||||||
return self._proxy.$getConnectionString(handle, connectionUri, includePassword);
|
return self._proxy.$getConnectionString(handle, connectionUri, includePassword);
|
||||||
},
|
},
|
||||||
|
buildConnectionInfo(connectionString: string): Thenable<sqlops.ConnectionInfo> {
|
||||||
|
return self._proxy.$buildConnectionInfo(handle, connectionString);
|
||||||
|
},
|
||||||
rebuildIntelliSenseCache(connectionUri: string): Thenable<void> {
|
rebuildIntelliSenseCache(connectionUri: string): Thenable<void> {
|
||||||
return self._proxy.$rebuildIntelliSenseCache(handle, connectionUri);
|
return self._proxy.$rebuildIntelliSenseCache(handle, connectionUri);
|
||||||
}
|
}
|
||||||
@@ -343,7 +345,7 @@ export class MainThreadDataProtocol implements MainThreadDataProtocolShape {
|
|||||||
|
|
||||||
public $registerAgentServicesProvider(providerId: string, handle: number): TPromise<any> {
|
public $registerAgentServicesProvider(providerId: string, handle: number): TPromise<any> {
|
||||||
const self = this;
|
const self = this;
|
||||||
this._jobManagementService.registerProvider(providerId, <sqlops.AgentServicesProvider> {
|
this._jobManagementService.registerProvider(providerId, <sqlops.AgentServicesProvider>{
|
||||||
providerId: providerId,
|
providerId: providerId,
|
||||||
getJobs(connectionUri: string): Thenable<sqlops.AgentJobsResult> {
|
getJobs(connectionUri: string): Thenable<sqlops.AgentJobsResult> {
|
||||||
return self._proxy.$getJobs(handle, connectionUri);
|
return self._proxy.$getJobs(handle, connectionUri);
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import {
|
|||||||
IItemConfig, ModelComponentTypes, IComponentShape, IModelViewDialogDetails, IModelViewTabDetails, IModelViewButtonDetails,
|
IItemConfig, ModelComponentTypes, IComponentShape, IModelViewDialogDetails, IModelViewTabDetails, IModelViewButtonDetails,
|
||||||
IModelViewWizardDetails, IModelViewWizardPageDetails
|
IModelViewWizardDetails, IModelViewWizardPageDetails
|
||||||
} from 'sql/workbench/api/common/sqlExtHostTypes';
|
} from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||||
import { Event, Emitter } from 'vs/base/common/event';
|
|
||||||
|
|
||||||
export abstract class ExtHostAccountManagementShape {
|
export abstract class ExtHostAccountManagementShape {
|
||||||
$autoOAuthCancelled(handle: number): Thenable<void> { throw ni(); }
|
$autoOAuthCancelled(handle: number): Thenable<void> { throw ni(); }
|
||||||
@@ -73,6 +72,13 @@ export abstract class ExtHostDataProtocolShape {
|
|||||||
*/
|
*/
|
||||||
$getConnectionString(handle: number, connectionUri: string, includePassword: boolean): Thenable<string> { throw ni(); }
|
$getConnectionString(handle: number, connectionUri: string, includePassword: boolean): Thenable<string> { throw ni(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize connection string
|
||||||
|
* @param handle the handle to use when looking up a provider
|
||||||
|
* @param connectionString the connection string to serialize
|
||||||
|
*/
|
||||||
|
$buildConnectionInfo(handle: number, connectionString: string): Thenable<sqlops.ConnectionInfo> { throw ni(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifies all listeners on the Extension Host side that a language change occurred
|
* Notifies all listeners on the Extension Host side that a language change occurred
|
||||||
* for a dataprotocol language. The sub-flavor is the specific implementation used for query
|
* for a dataprotocol language. The sub-flavor is the specific implementation used for query
|
||||||
@@ -609,7 +615,7 @@ export interface ExtHostModelViewTreeViewsShape {
|
|||||||
$getChildren(treeViewId: string, treeItemHandle?: string): TPromise<ITreeComponentItem[]>;
|
$getChildren(treeViewId: string, treeItemHandle?: string): TPromise<ITreeComponentItem[]>;
|
||||||
$createTreeView(handle: number, componentId: string, options: { treeDataProvider: vscode.TreeDataProvider<any> }): sqlops.TreeComponentView<any>;
|
$createTreeView(handle: number, componentId: string, options: { treeDataProvider: vscode.TreeDataProvider<any> }): sqlops.TreeComponentView<any>;
|
||||||
$onNodeCheckedChanged(treeViewId: string, treeItemHandle?: string, checked?: boolean): void;
|
$onNodeCheckedChanged(treeViewId: string, treeItemHandle?: string, checked?: boolean): void;
|
||||||
$onNodeSelected(treeViewId: string, nodes: string[]): void;
|
$onNodeSelected(treeViewId: string, nodes: string[]): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExtHostBackgroundTaskManagementShape {
|
export interface ExtHostBackgroundTaskManagementShape {
|
||||||
|
|||||||
@@ -257,4 +257,8 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
|||||||
getConnectionString(ownerUri: string): Thenable<string> {
|
getConnectionString(ownerUri: string): Thenable<string> {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildConnectionInfo(connectionString: string, provider?: string): Thenable<sqlops.ConnectionInfo> {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user