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

Workbench editor associations should be a generic editor concept or move to custom editors entirely #117207

Closed
bpasero opened this issue Feb 22, 2021 · 2 comments
Assignees
Labels
custom-editors Custom editor API (webview based editors) debt Code quality issues

Comments

@bpasero
Copy link
Member

bpasero commented Feb 22, 2021

While working on #116856 I noticed a weird relationship between the IEditorService' responsibility of registerCustomEditorViewTypesHandler, the fact that editorOpenWith.ts manages the workbench.editorAssociations setting and the truth that only custom editors and notebooks seem to pick up on the setting.

In #116856 I have moved the handling of workbench.editorAssociations into vs/workbench/browser/editor.ts as an editor associations factory because I felt the editor service was the wrong place for it.

However, if the only client of this setting is the custom editor service, I would suggest to move it somewhere there. And if not, I would suggest to move code of custom editor handling into workbench core. Specifically CustomEditorInfo and selectorMatches etc.

I think my preference would be to move the factory code into the custom editor contrib and let notebooks use it from there. If you feel strong about moving it back into a service, feel free to add it to custom editor service.

@bpasero bpasero added debt Code quality issues custom-editors Custom editor API (webview based editors) labels Feb 22, 2021
@lramos15
Copy link
Member

lramos15 commented Apr 21, 2021

I have moved this code into the override service (190e902) as that is the only time it would need to be respected. Let me know if that's sufficient for you.

@bpasero
Copy link
Member Author

bpasero commented Apr 22, 2021

@lramos15 yeah feel free to close this if now the editor override service owns everything override related end to end. I think that is the case now.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
custom-editors Custom editor API (webview based editors) debt Code quality issues
Projects
None yet
Development

No branches or pull requests

4 participants