Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support save *Workspaces* as projects #151

Closed
alefragnani opened this issue Nov 2, 2017 · 17 comments
Closed

Support save *Workspaces* as projects #151

alefragnani opened this issue Nov 2, 2017 · 17 comments
Assignees
Labels
depends on Depends on issues from VS Code enhancement multi-root sponsor wanted Depends on sponsorship (PayPal / Patreon)
Milestone

Comments

@alefragnani
Copy link
Owner

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

@alefragnani alefragnani added multi-root depends on Depends on issues from VS Code enhancement labels Nov 2, 2017
@alefragnani
Copy link
Owner Author

Depends on microsoft/vscode#37421

@andig
Copy link

andig commented Dec 11, 2017

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

@alefragnani
Copy link
Owner Author

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

@andig
Copy link

andig commented Dec 11, 2017

@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?

@alefragnani
Copy link
Owner Author

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? 😄

@andig
Copy link

andig commented Dec 12, 2017

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 👍

@vvs
Copy link

vvs commented Jun 18, 2018

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.

@alefragnani
Copy link
Owner Author

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.

@ferreteleco
Copy link

Any update on this?

@alefragnani
Copy link
Owner Author

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 👍

@jb510
Copy link

jb510 commented Jan 14, 2019

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.

@andig
Copy link

andig commented Jan 14, 2019

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

@jb510
Copy link

jb510 commented Feb 7, 2019

@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.

@aLagoG
Copy link

aLagoG commented May 17, 2019

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

@alefragnani
Copy link
Owner Author

Yes, that’s the plan 😬

@curtisbelt
Copy link

Per microsoft/vscode/issues/76469, it'll be a public API soon 👍

@alefragnani alefragnani added this to the 10.8.0 milestone Sep 25, 2019
alefragnani added a commit that referenced this issue Sep 25, 2019
@alefragnani
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends on Depends on issues from VS Code enhancement multi-root sponsor wanted Depends on sponsorship (PayPal / Patreon)
Projects
None yet
Development

No branches or pull requests

7 participants