Skip to content

Commit

Permalink
Clean a bit TerminalBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Oct 11, 2023
1 parent e498675 commit cb17626
Show file tree
Hide file tree
Showing 7 changed files with 292 additions and 194 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.jline.terminal.Attributes;
import org.jline.terminal.Size;
import org.jline.terminal.Terminal;
import org.jline.terminal.TerminalBuilder;
import org.jline.terminal.impl.PosixPtyTerminal;
import org.jline.terminal.impl.PosixSysTerminal;
import org.jline.terminal.spi.Pty;
Expand All @@ -35,7 +36,7 @@ public FfmTerminalProvider() {

@Override
public String name() {
return "ffm";
return TerminalBuilder.PROP_PROVIDER_FFM;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.jline.terminal.Attributes;
import org.jline.terminal.Size;
import org.jline.terminal.Terminal;
import org.jline.terminal.TerminalBuilder;
import org.jline.terminal.impl.PosixPtyTerminal;
import org.jline.terminal.impl.PosixSysTerminal;
import org.jline.terminal.impl.jansi.freebsd.FreeBsdNativePty;
Expand Down Expand Up @@ -80,7 +81,7 @@ public static boolean isAtLeast(int major, int minor) {

@Override
public String name() {
return "jansi";
return TerminalBuilder.PROP_PROVIDER_JANSI;
}

public Pty current(SystemStream systemStream) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.jline.terminal.Attributes;
import org.jline.terminal.Size;
import org.jline.terminal.Terminal;
import org.jline.terminal.TerminalBuilder;
import org.jline.terminal.impl.PosixPtyTerminal;
import org.jline.terminal.impl.PosixSysTerminal;
import org.jline.terminal.impl.jna.win.JnaWinSysTerminal;
Expand All @@ -27,7 +28,7 @@
public class JnaTerminalProvider implements TerminalProvider {
@Override
public String name() {
return "jna";
return TerminalBuilder.PROP_PROVIDER_JNA;
}

public Pty current(SystemStream systemStream) throws IOException {
Expand Down
Loading

0 comments on commit cb17626

Please sign in to comment.