Task contribution (#742)

* work in progress

* set up necessary code. need to work on getting it working

* formatting

* work in progress

* work in progress

* formatting

* work in progress

* work in progress

* work in progress

* formatting

* needs a lot of work regarding how we do actions vs how extensions do actions

* formatting

* use connection profile for actions

* change action to be
This commit is contained in:
Anthony Dresser
2018-02-27 11:40:13 -08:00
committed by GitHub
parent 5adab4fafb
commit 3432dac261
23 changed files with 518 additions and 323 deletions

35
src/sql/sqlops.d.ts vendored
View File

@@ -114,6 +114,20 @@ declare module 'sqlops' {
options: { [name: string]: any };
}
export interface IConnectionProfile extends ConnectionInfo {
serverName: string;
databaseName: string;
userName: string;
password: string;
authenticationType: string;
savePassword: boolean;
groupFullName: string;
groupId: string;
providerName: string;
saveProfile: boolean;
id: string;
}
export interface ConnectionInfoSummary {
/**
@@ -1492,4 +1506,25 @@ declare module 'sqlops' {
title: string
): ModalDialog;
}
export namespace tasks {
export interface ITaskHandler {
(profile: IConnectionProfile, ...args: any[]): any;
}
/**
* Registers a task that can be invoked via a keyboard shortcut,
* a menu item, an action, or directly.
*
* Registering a task with an existing task identifier twice
* will cause an error.
*
* @param task A unique identifier for the task.
* @param callback A task handler function.
* @param thisArg The `this` context used when invoking the handler function.
* @return Disposable which unregisters this task on disposal.
*/
export function registerTask(task: string, callback: ITaskHandler, thisArg?: any): vscode.Disposable;
}
}