Vscode-project-manager: Support save *Workspaces* as projects

Created on 3 Nov 2017  路  17Comments  路  Source: alefragnani/vscode-project-manager

The idea is to be able to save Workspaces as projects, to listed in List Projects to Open command.

depends on enhancement multi-root sponsor wanted

Most helpful comment

Yes, that鈥檚 the plan 馃槵

All 17 comments

+1 for this request. It is not entirely clear to me what differentiates projects and workspaces?

Hi @andig ,

At the beginning, there was no Workspace, just Project. And a Project was nothing more than a Folder in your file system. In fact, both names (Project and Folder) was being used in the UI, which may lead to cause this confusion.

With the multi-root support, the VS Code team created the Workspace concept, which is just a way to call a Multi Folder Project, because you can add multiples folders in the same window. The oficial info is here: https://code.visualstudio.com/docs/editor/multi-root-workspaces.

Hope this helps

@alefragnani it seems to me that workspaces and projects fulfill the same purpose. It would be nice if quick-switching between workspaces (which are project in Sublime Text) and giving those workspaces meaningful names were possible.

To that end- would it be a good idea if this extension used workspaces as underlying object instead of custom projects?

As you may notice, there is no API for that, and that's why it has a depends on label referencing an issue in VS Code repo. I will only support it when the API is released.

About _changing_ how the extension works, I don't see that happening, unless the VS Code team releases enough APIs that would give me as freedom as I have using my custom file. I don't see that happening also.

Of course, the oficial API is just _an easy way_ to do things. I could add workspaces _manually_ in the projects.json file and allow you to switch between them. I also could change the extension to use _any folder_ while opening projects (instead of the first, as reported on the other issue). The question is, why I would add this on my own, instead of waiting for an oficial API? 馃槃

Got it, thank you for taking the time to explain.

The question is, why I would add this on my own, instead of waiting for an oficial API? 馃槃

I guess you wouldn't, neither would I 馃憤

This discrepancy between project folders and workspaces creates quite a bit of confusion and inconvenience while using the Project Manager extension.

You see, some of my projects are good old "project folders", and some are converted to workspaces.

The problem is that when I switch from a workspace project to some other "folder-based" project (via this extension) and return back, I am not getting my open files, etc, since I was in the workspace project but returned to the folder project, and these two have different sets of opened files, for example.

So, basically, the use and benefits of the extension are severely limited as soon as workpace projects are being used.

Hi @vvs ,

I would ask you to upvote the VS Code issue referenced above, which asks for an API to access the Workspaces. Without it, there is not _stable_ way to add workspaces as projects in the extension.

Unfortunately, there is no ETA for that issue, yet.

Any update on this?

Nothing yet, unfortunately. The VS Code issue that it depends on (release of a public API) isn't planned also, so we are out of luck.

As I commented here, I could make this _manually_, without dependency for any API, but for that, it would require investing more time in development. Last week I decided to "re-focus" on some of my extensions, and I'll start to plan milestones for each of them. But this "re-focus" will be based on community feedback/support. You are welcome to visit my Patreon page and participate 馃憤

To be honest all I want at this point is a UI to pick from WorkSpaces. Project Manager was a good bridge before multi-root workspaces.

A UI for WorkSpaces ought to be in VS Code core, short of that it is maddening that there isn't even an API to enumerate the workspaces properly for an extension like PM to then provide a fuller featured UI.

@jb510 I'm simply doing File->Open Recent-><workspace>

@jb510 I'm simply doing File->Open Recent-><workspace>

Thanks @andig but that doesn't work when you have 50 projects.

I'm trying https://marketplace.visualstudio.com/items?itemName=sadesyllas.vscode-workspace-switcher but I don't love the UX. I keep my workspace files in my project folder root, or more often in a sub-folder /project_name/project_code/**.

Workspace Switcher works better if the vscode workspace files are above the projects, or in their own directory.

Now that microsoft/vscode#37421 is closed and in the last release, is this a possibility?

Yes, that鈥檚 the plan 馃槵

Per microsoft/vscode/issues/76469, it'll be a public API soon :+1:

The wait is almost over...

Meanwhile, take a look at the gif that is already available in README file. You may notice two different icons in Favorites projects. The one with a _dot_ represents a Workspace project.

Stay tuned.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frontcraft picture frontcraft  路  4Comments

Gama11 picture Gama11  路  6Comments

jrial picture jrial  路  4Comments

mt-webdev picture mt-webdev  路  3Comments

codeshark1 picture codeshark1  路  5Comments