add existing project to workspace feature (#12249)

* add existing project to workspace feature

* update file name

* new test and use URI

* handle workspace with no folder

* add more validation

* and more tests

* use forward slash
This commit is contained in:
Alan Ren
2020-09-14 15:43:29 -07:00
committed by GitHub
parent 7a524d7a35
commit 23c16ebfb3
13 changed files with 530 additions and 30 deletions

View File

@@ -45,13 +45,19 @@ export interface IWorkspaceService {
/**
* Gets the project files in current workspace
*/
getProjectsInWorkspace(): Promise<string[]>;
getProjectsInWorkspace(): Promise<vscode.Uri[]>;
/**
* Gets the project provider by project file
* @param projectFilePath The full path of the project file
* @param projectFileUri The Uri of the project file
*/
getProjectProvider(projectFilePath: string): Promise<IProjectProvider | undefined>;
getProjectProvider(projectFileUri: vscode.Uri): Promise<IProjectProvider | undefined>;
/**
* Adds the projects to workspace, if a project is not in the workspace folder, its containing folder will be added to the workspace
* @param projectFiles the list of project files to be added, the project file should be absolute path.
*/
addProjectsToWorkspace(projectFiles: vscode.Uri[]): Promise<void>;
}
/**