Skip to content

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

Closed

Description

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.

Activity

  1. added
    debt
    custom-editors
    on Feb 22, 2021
  2. lramos15 commented on Apr 21, 2021

    @lramos15
    Member

    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.

  3. bpasero commented on Apr 22, 2021

    @bpasero
    ContributorAuthor

    Logan Ramos (@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.

  4. locked and limited conversation to collaborators on Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

custom-editorsdebt

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions