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

Enable workspace file extension customization #12420

Merged
merged 6 commits into from
Jul 26, 2023

Conversation

msujew
Copy link
Member

@msujew msujew commented Apr 14, 2023

What it does

As of now, only .theia-workspace and .code-workspace files are supported when selecting/creating workspace files. This change allows to easily customize the workspace file extension and also to exclude .code-workspace files.

How to test

  1. Change the WorkspaceFileService#getWorkspaceFileTypes method to return a different array.
  2. Assert that services that interact with workspace files adapt as expected.

Review checklist

Reminder for reviewers

@msujew msujew added the workspace issues related to the workspace label Apr 14, 2023
@vince-fugnitto vince-fugnitto modified the milestone: 1.37.0 Apr 27, 2023
@tsmaeder
Copy link
Contributor

@msujew what problem is this solving? As far as I know we can't load any other types of workspace file anyway, right?

@msujew
Copy link
Member Author

msujew commented Jun 1, 2023

@tsmaeder The reasoning behind this PR isn't to change the workspace file format, but to allow adopters to specifiy their own file extensions. Right now, it's hard coded to be either .theia-workspace or .code-workspace. End-users of adopter IDEs usually don't care that their IDE is built on top of Theia and they expect everything to be branded towards the actual IDE.

See also this question we had on the discourse forum.

Copy link
Contributor

@tsmaeder tsmaeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked through the code and it seems O.K. I'm just wondering whether it would make more sense to model this as "a list of extensions, one of which is the default" instead of "the default extension plus possibly VS Code".

@msujew msujew force-pushed the msujew/workspace-file-extension branch from f0e6505 to c7813a9 Compare June 15, 2023 12:07
@msujew
Copy link
Member Author

msujew commented Jun 20, 2023

@tsmaeder Thanks for the feedback. I've adapted the PR to include a simple array of workspace file options, with the first one just being the default.

Copy link
Contributor

@tsmaeder tsmaeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some people are never satisfied ;-) Just one more suggestion.

Copy link
Contributor

@tsmaeder tsmaeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now.

@msujew msujew force-pushed the msujew/workspace-file-extension branch from 0b75251 to c02d5a3 Compare July 26, 2023 09:21
@msujew msujew merged commit 86567e3 into master Jul 26, 2023
@msujew msujew deleted the msujew/workspace-file-extension branch July 26, 2023 10:07
@github-actions github-actions bot added this to the 1.40.0 milestone Jul 26, 2023
@paul-marechal
Copy link
Member

I cancelled an old pending review and GH decided to publish it... Don't mind me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workspace issues related to the workspace
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants