Add support for non-process-based terminals #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tried to keep the API changes limited, though I did have to break it in some places, hence the version bump included. The change now allows the view be provided with an implementation of the new
Pty
interface, and it will display it as such, whether it is process-based (as before) or in-process. The existing implementations were moved to new classesGenericTerminal<? extends Pty>
fromTerminal
andExternalProcessPty
for the actual existing process launching.Terminal
remains as a specialization ofGenericTerminal<ExternalProcessPty>
with the same API.I have successfully used it with a Linux-specific in-memory
openpty()
based system, though didn't drop that implementation in to this PR as it would drag in a boatload of dependencies. I did include an exampleFileCapturePty
implementation though.It is conceivable to break the API more to get a cleaner API, though I wasn't sure which was preferred, so went the less invasive route. Feedback is much appreciated.