Skip to content

Redesign ExtensionService to use granular feature interfaces #313

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

Open
daviwil opened this issue Dec 8, 2016 · 0 comments
Open

Redesign ExtensionService to use granular feature interfaces #313

daviwil opened this issue Dec 8, 2016 · 0 comments
Labels
Issue-Enhancement A feature request (enhancement).

Comments

@daviwil
Copy link
Contributor

daviwil commented Dec 8, 2016

Right now all editor features are exposed through a monolithic interface IEditorOperations. I think it would be better to go with a model that depends on more granular interfaces like IEditorWindowFeature which can be registered with the ExtensionService at runtime to light up that feature in the $psEditor API.

An editor integration may not want or need to expose all of the possible $psEditor features (like the $psEditor.Window section). If the editor did not register the feature interface of a particular part of the API, we would throw a NotImplementedException when the methods of that API are called. To allow callers to know whether the API is supported or not, we could provide an object on $psEditor which indicates which high-level parts of the API are supported.

This will also help with registering editor-specific feature APIs. For instance, if there are APIs which are only relevant to the VS Code editor, a feature interface could be registered for that only when the PSES language server is launched from VS Code. For any other editor, those APIs wouldn't be visible to the PowerShell session (only exposed via a "note property" added at runtime). Any developer interacting the EditorObject at runtime via C# could be able to query for the VS Code feature interface to see if those APIs are available.

Still thinking this through...

@daviwil daviwil added the Issue-Enhancement A feature request (enhancement). label Dec 8, 2016
@daviwil daviwil added this to the 0.10.0 milestone Dec 8, 2016
@daviwil daviwil self-assigned this Dec 8, 2016
@daviwil daviwil modified the milestones: 0.10.0, April 2017 Mar 14, 2017
@daviwil daviwil modified the milestones: June 2017, Backlog Oct 27, 2017
@andyleejordan andyleejordan removed this from the Backlog milestone Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

2 participants