mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 09:59:47 -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
@@ -11,6 +11,7 @@ import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import { Disposable } from 'vs/workbench/api/node/extHostTypes';
|
||||
import { SqlMainContext, MainThreadDataProtocolShape, ExtHostDataProtocolShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import { DataProviderType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
|
||||
export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
|
||||
@@ -185,6 +186,15 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
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> {
|
||||
return this._resolveProvider<sqlops.ConnectionProvider>(handle).rebuildIntelliSenseCache(connectionUri);
|
||||
}
|
||||
@@ -617,7 +627,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import { ISerializationService } from 'sql/services/serialization/serializationS
|
||||
import { IFileBrowserService } from 'sql/parts/fileBrowser/common/interfaces';
|
||||
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
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.
|
||||
@@ -91,6 +90,9 @@ export class MainThreadDataProtocol implements MainThreadDataProtocolShape {
|
||||
getConnectionString(connectionUri: string, includePassword: boolean): Thenable<string> {
|
||||
return self._proxy.$getConnectionString(handle, connectionUri, includePassword);
|
||||
},
|
||||
buildConnectionInfo(connectionString: string): Thenable<sqlops.ConnectionInfo> {
|
||||
return self._proxy.$buildConnectionInfo(handle, connectionString);
|
||||
},
|
||||
rebuildIntelliSenseCache(connectionUri: string): Thenable<void> {
|
||||
return self._proxy.$rebuildIntelliSenseCache(handle, connectionUri);
|
||||
}
|
||||
@@ -343,7 +345,7 @@ export class MainThreadDataProtocol implements MainThreadDataProtocolShape {
|
||||
|
||||
public $registerAgentServicesProvider(providerId: string, handle: number): TPromise<any> {
|
||||
const self = this;
|
||||
this._jobManagementService.registerProvider(providerId, <sqlops.AgentServicesProvider> {
|
||||
this._jobManagementService.registerProvider(providerId, <sqlops.AgentServicesProvider>{
|
||||
providerId: providerId,
|
||||
getJobs(connectionUri: string): Thenable<sqlops.AgentJobsResult> {
|
||||
return self._proxy.$getJobs(handle, connectionUri);
|
||||
|
||||
@@ -22,7 +22,6 @@ import {
|
||||
IItemConfig, ModelComponentTypes, IComponentShape, IModelViewDialogDetails, IModelViewTabDetails, IModelViewButtonDetails,
|
||||
IModelViewWizardDetails, IModelViewWizardPageDetails
|
||||
} from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
export abstract class ExtHostAccountManagementShape {
|
||||
$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(); }
|
||||
|
||||
/**
|
||||
* 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
|
||||
* 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[]>;
|
||||
$createTreeView(handle: number, componentId: string, options: { treeDataProvider: vscode.TreeDataProvider<any> }): sqlops.TreeComponentView<any>;
|
||||
$onNodeCheckedChanged(treeViewId: string, treeItemHandle?: string, checked?: boolean): void;
|
||||
$onNodeSelected(treeViewId: string, nodes: string[]): void;
|
||||
$onNodeSelected(treeViewId: string, nodes: string[]): void;
|
||||
}
|
||||
|
||||
export interface ExtHostBackgroundTaskManagementShape {
|
||||
|
||||
Reference in New Issue
Block a user