Class TerminalCapabilities
java.lang.Object
org.ek9lang.compiler.common.TerminalCapabilities
The colour, Unicode and emoji capabilities of the terminal this process writes to, detected once (and again by
resetTestMode()) - see TerminalColors, THE formatting functions that read it.
There is exactly one: PROCESS. Tests that force a mode (forcePlainTextMode(),
forceColorMode()) change it for the whole process and restore it with resetTestMode(); such
tests run isolated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TerminalCapabilitiesTHE terminal capabilities of this process. -
Method Summary
Modifier and TypeMethodDescriptionvoidForce full color/emoji mode for testing.voidForce plain text mode for testing (no colors, no unicode, no emoji).booleanbooleanbooleanvoidReset to auto-detection mode after testing.
-
Field Details
-
PROCESS
THE terminal capabilities of this process. The terminal is one fact for the run, so this is the one documented process-wide holder (Steve, 2026-10-28, no static methods: the state stays process-wide, the behaviour is held as instances): everyTerminalColorsreads it, and a test that forces a mode changes it for all of them.
-
-
Method Details
-
forcePlainTextMode
public void forcePlainTextMode()Force plain text mode for testing (no colors, no unicode, no emoji). CallresetTestMode()after test to restore auto-detection. -
forceColorMode
public void forceColorMode()Force full color/emoji mode for testing. CallresetTestMode()after test to restore auto-detection. -
resetTestMode
public void resetTestMode()Reset to auto-detection mode after testing. -
isColorsSupported
public boolean isColorsSupported() -
isUnicodeSupported
public boolean isUnicodeSupported() -
isEmojiSupported
public boolean isEmojiSupported()
-