Files
azuredatastudio/extensions/data-workspace/src/dataworkspace.d.ts
Alan Ren 1054164533 data workspace review feedback implementation (#12489)
* add a view to handle no workspace scenario

* text update

* project type filter improvement

* fix the project level context menu issue

* update strings
2020-09-21 10:22:21 -07:00

81 lines
2.1 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'dataworkspace' {
import * as vscode from 'vscode';
export const enum extension {
name = 'Microsoft.data-workspace'
}
/**
* dataworkspace extension
*/
export interface IExtension {
/**
* register a project provider
* @param provider new project provider
* @requires a disposable object, upon disposal, the provider will be unregistered.
*/
registerProjectProvider(provider: IProjectProvider): vscode.Disposable;
}
/**
* Defines the capabilities of project provider
*/
export interface IProjectProvider {
/**
* Gets the tree data provider for the given project file
* @param projectFile The Uri of the project file
*/
getProjectTreeDataProvider(projectFile: vscode.Uri): Promise<vscode.TreeDataProvider<any>>;
/**
* Notify the project provider extension that the specified project file has been removed from the data workspace
* @param projectFile The Uri of the project file
*/
RemoveProject(projectFile: vscode.Uri): Promise<void>;
/**
* Gets the supported project types
*/
readonly supportedProjectTypes: IProjectType[];
}
/**
* Defines the project type
*/
export interface IProjectType {
/**
* display name of the project type
*/
readonly displayName: string;
/**
* project file extension, e.g. sqlproj
*/
readonly projectFileExtension: string;
/**
* Gets the icon path of the project type
*/
readonly icon: string | vscode.Uri | { light: string | vscode.Uri, dark: string | vscode.Uri }
}
/**
* Represents the item for the workspace tree
*/
export interface WorkspaceTreeItem {
/**
* Gets the tree data provider
*/
treeDataProvider: vscode.TreeDataProvider<any>;
/**
* Gets the raw element returned by the tree data provider
*/
element: any;
}
}