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

View File

@@ -9,11 +9,12 @@ import {
createExtHostContextProxyIdentifier as createExtId,
ProxyIdentifier
} from 'vs/workbench/services/thread/common/threadService';
import { TPromise } from 'vs/base/common/winjs.base';
import { IDisposable } from 'vs/base/common/lifecycle';
import * as sqlops from 'sqlops';
import { TPromise } from 'vs/base/common/winjs.base';
import { IDisposable } from 'vs/base/common/lifecycle';
import { ITaskHandlerDescription } from 'sql/platform/tasks/common/tasks';
export abstract class ExtHostAccountManagementShape {
$autoOAuthCancelled(handle: number): Thenable<void> { throw ni(); }
@@ -421,6 +422,7 @@ export const SqlMainContext = {
MainThreadSerializationProvider: createMainId<MainThreadSerializationProviderShape>('MainThreadSerializationProvider'),
MainThreadResourceProvider: createMainId<MainThreadResourceProviderShape>('MainThreadResourceProvider'),
MainThreadModalDialog: createMainId<MainThreadModalDialogShape>('MainThreadModalDialog'),
MainThreadTasks: createMainId<MainThreadTasksShape>('MainThreadTasks'),
MainThreadDashboardWebview: createMainId<MainThreadDashboardWebviewShape>('MainThreadDashboardWebview')
};
@@ -432,6 +434,7 @@ export const SqlExtHostContext = {
ExtHostSerializationProvider: createExtId<ExtHostSerializationProviderShape>('ExtHostSerializationProvider'),
ExtHostResourceProvider: createExtId<ExtHostResourceProviderShape>('ExtHostResourceProvider'),
ExtHostModalDialogs: createExtId<ExtHostModalDialogsShape>('ExtHostModalDialogs'),
ExtHostTasks: createExtId<ExtHostTasksShape>('ExtHostTasks'),
ExtHostDashboardWebviews: createExtId<ExtHostDashboardWebviewsShape>('ExtHostDashboardWebviews')
};
@@ -449,6 +452,16 @@ export interface ExtHostModalDialogsShape {
$onClosed(handle: number): void;
}
export interface ExtHostTasksShape {
$executeContributedTask<T>(id: string, ...args: any[]): Thenable<T>;
$getContributedTaskHandlerDescriptions(): TPromise<{ [id: string]: string | ITaskHandlerDescription }>;
}
export interface MainThreadTasksShape extends IDisposable {
$registerTask(id: string): TPromise<any>;
$unregisterTask(id: string): TPromise<any>;
}
export interface ExtHostDashboardWebviewsShape {
$registerProvider(widgetId: string, handler: (webview: sqlops.DashboardWebview) => void): void;
$onMessage(handle: number, message: any): void;