Skip to content

Conversation

@daviwil
Copy link
Contributor

@daviwil daviwil commented Jun 5, 2017

This change is a fairly large refactoring of our PSHost implementation
to remove the ConsoleService and IConsoleHost types and instead use two
different PSHostUserInterface implementations. Here's a detailed
breakdown of the changes:

  • Centralized host UI behavior in EditorServicesPSHostUserInterface
    abstract class. This class now exposes overridable abstract methods
    that simplify PSHostUserInterface implementations that will be used
    with the EditorServicesPSHost.

  • Removed the ConsoleService class and put its behavior and abstractions
    into EditorServicesPSHostUserInterface.

  • Created TerminalPSHostUserInterface for the integrated terminal host
    experience.

  • Created ProtocolPSHostUserInterface for the protocol-based host
    experience.

  • Removed the concept of a "prompt handler context" because each host
    implementation will have a single way to deal with input and choice
    prompts.

  • Lifted direct management of the console interface out of the
    LanguageServer and DebugAdapter classes, now managed in the
    EditorServicesHost.

  • Disabled the ConsoleServiceTests until we decide how to test for
    this behavior at the level of the EditorServicesPSHostUserInterface.

@daviwil daviwil added this to the 1.3.0 milestone Jun 5, 2017
daviwil added 3 commits June 5, 2017 12:28
This change is a fairly large refactoring of our PSHost implementation
to remove the ConsoleService and IConsoleHost types and instead use two
different PSHostUserInterface implementations.  Here's a detailed
breakdown of the changes:

- Centralized host UI behavior in EditorServicesPSHostUserInterface
  abstract class.  This class now exposes overridable abstract methods
  that simplify PSHostUserInterface implementations that will be used
  with the EditorServicesPSHost.

- Removed the ConsoleService class and put its behavior and abstractions
  into EditorServicesPSHostUserInterface.

- Created TerminalPSHostUserInterface for the integrated terminal host
  experience.

- Created ProtocolPSHostUserInterface for the protocol-based host
  experience.

- Removed the concept of a "prompt handler context" because each host
  implementation will have a single way to deal with input and choice
  prompts.

- Lifted direct management of the console interface out of the
  LanguageServer and DebugAdapter classes, now managed in the
  EditorServicesHost.

- Disabled the ConsoleServiceTests until we decide how to test for
  this behavior at the level of the EditorServicesPSHostUserInterface.
Since we've finally removed the last usages of the static Logger class,
we can now remove it from the codebase.  All logging needs should be
served by ILogger instances going forward.
@daviwil daviwil force-pushed the split-pshost-implementations branch from 2911688 to d10c0cc Compare June 5, 2017 19:28
@daviwil daviwil merged commit 0aefab6 into PowerShell:master Jun 5, 2017
@daviwil daviwil deleted the split-pshost-implementations branch June 5, 2017 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants