Skip to content
This repository has been archived by the owner on Jul 17, 2019. It is now read-only.

Adopt Multi Root Workspace APIs #9

Open
JamesGiller opened this issue Nov 10, 2017 · 1 comment
Open

Adopt Multi Root Workspace APIs #9

JamesGiller opened this issue Nov 10, 2017 · 1 comment

Comments

@JamesGiller
Copy link
Contributor

Since the latest stable release included support for multi root workspaces, I guess it is important for this extension to follow the guidelines for adapting to the new API.

In particular, I have found references to the now deprecated workspace.rootPath:
master branch

src/catkin.ts
27:  const cwd = typeof uri !== "undefined" ? uri.fsPath : vscode.workspace.rootPath;

src/build.ts
18:  pfs.exists(vscode.workspace.rootPath + "/.vscode/c_cpp_properties.json").then(exists => {
30:  const filename = vscode.workspace.rootPath + "/.vscode/c_cpp_properties.json";

src/extension.ts
39:  baseDir = await utils.findCatkinWorkspace(vscode.workspace.rootPath);

4-catkin-tools-support branch

src/extension.ts
44:  baseDir = vscode.workspace.rootPath;

src/build.ts
18:  pfs.exists(vscode.workspace.rootPath + "/.vscode/c_cpp_properties.json").then(exists => {
30:  const filename = vscode.workspace.rootPath + "/.vscode/c_cpp_properties.json";

Also, for the commands like creating a package/running a build, we should probably ask the user which workspace folder they want to add the package to/run the build in.

Any other ideas, in accordance to the changes as listed in the linked wiki?
I will read further into it.

@ajshort
Copy link
Owner

ajshort commented Nov 19, 2017

I don't think it would be common have more than one ROS workspace open at a time. I think a good solution is to scan all vscode workspace folders for all ROS workspaces, and if there's more than one unique one either:

  1. Show an error.
  2. Show a picker for the user to choose one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants