PowerShell / PowerShell/PowerShellEditorServices

Redesign ExtensionService to use granular feature interfaces

Ouverte
#313 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Issue-Enhancement
Langage dominant
C#
Étoiles
767
Forks
266
Merge moyen
3 j 16 h
PR mergées (30 j)
1

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par lire ExtensionService, IEditorOperations, IEditorWindowFeature et EditorObject afin de comprendre l’API actuelle de l’éditeur et le modèle d’enregistrement. L’issue est terminée lorsque les fonctionnalités granulaires peuvent être enregistrées indépendamment, que les API non prises en charge sont gérées comme décrit et que les appelants peuvent interroger les fonctionnalités de haut niveau prises en charge.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
csharp, powershell
Domaine
api, developer-experience
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
20/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.