Open
Description
Right now as far as I can tell there isn't a great way to tell if the editor supports a specific request. For example, if a consumer of the $psEditor
API wants to request editor context with $psEditor.GetEditorContext()
the only way to know if the editor supports it is to try and possibly fail.
Making things a little more complicated is every request can act a little differently. For instance, powerShell/showChoicePrompt
just returns null
, where as powerShell/getEditorContext
will throw a NullReferenceException
.
We should have an API where the editor explicitly states which requests they support. That way an extension module can send only the requests they know will work.