class Console
extends Object
implements CaretListener, HyperlinkListener, ComponentListener, FocusListener
Groovy Swing console. Allows user to interactively enter and execute Groovy.
| Type | Name and description |
|---|---|
static String |
DEFAULT_SCRIPT_NAME_STARTPrefix used for generated script names inside the console. |
Closure |
afterExecutionOptional hook invoked after script execution completes. |
boolean |
autoClearOutputWhether output is cleared before each run. |
Action |
autoClearOutputActionAction that toggles automatic output clearing. |
CompilerConfiguration |
baseConfigBase compiler configuration used to seed new scripts. |
Closure |
beforeExecutionOptional hook invoked before script execution starts. |
Component |
blankPlaceholder component shown when output is detached. |
static boolean |
captureStdErrWhether stderr is redirected into the console output pane. |
static boolean |
captureStdOutWhether stdout is redirected into the console output pane. |
int |
colNumCurrent one-based caret column. |
Style |
commandStyleStyle used for echoed commands in the output pane. |
CompilerConfiguration |
configCompiler configuration for the current script shell. |
static Object |
consoleControllersActive console controllers sharing the global stream interceptors. |
ConsolePreferences |
consolePreferencesLazily created preferences dialog controller. |
Component |
copyFromComponentLast focused text component used by copy/select-all actions. |
File |
currentClasspathDirInitial directory for classpath directory selection dialogs. |
File |
currentClasspathJarDirInitial directory for classpath jar selection dialogs. |
File |
currentFileChooserDirInitial directory for file open/save dialogs. |
String |
currentThemeName of the currently selected theme mode. |
int |
cursorPosCurrent caret offset in the input document. |
boolean |
detachedOutputWhether output is shown in a detached window. |
Action |
detachedOutputActionAction that toggles detached output mode. |
boolean |
dirtyWhether the current editor contents differ from the saved script. |
RootPaneContainer |
frameMain console frame or dialog. |
static Object |
frameConsoleDelegatesDefault Swing delegates used to build the console frame and menu bar. |
boolean |
fullStackTracesWhether full stack traces are shown for execution failures. |
Action |
fullStackTracesActionAction that toggles full stack trace output. |
static Object |
groovyFileFilterFile filter used for Groovy script open/save dialogs. |
Action |
hideOutputWindowAction1Menu action variant that hides the detached output window. |
Action |
hideOutputWindowAction2Toolbar action variant that hides the detached output window. |
Action |
hideOutputWindowAction3Popup action variant that hides the detached output window. |
Action |
hideOutputWindowAction4Shortcut action variant that hides the detached output window. |
List |
historyExecution history records kept for navigation and result lookup. |
int |
historyIndexIndex of the currently selected history record. |
Style |
hyperlinkStyleStyle used for clickable error links. |
JTextPane |
inputAreaRaw text component used for script editing. |
int |
inputAreaContentHashHash of the last script text scheduled for execution. |
ConsoleTextEditor |
inputEditorStyled text editor used for script input. |
Action |
interruptActionAction that interrupts the active script thread. |
boolean |
loopModeWhether unchanged scripts are rerun after a delay. |
Action |
loopModeActionAction that toggles loop mode. |
int |
maxHistoryMaximum number of history entries retained by the console. |
int |
maxOutputCharsMaximum number of characters retained in the output pane. |
Action |
nextHistoryActionAction that moves to the next history entry. |
boolean |
orientationVerticalWhether the split pane stacks input and output vertically. |
Action |
orientationVerticalActionAction that toggles the split-pane orientation. |
int |
origDividerSizeDivider size to restore when output is no longer detached. |
JTextPane |
outputAreaOutput text pane used for results and errors. |
PrintWriter |
outputPrintWriterOptional writer that mirrors output to a log file. |
Style |
outputStyleStyle used for regular output text. |
Component |
outputWindowDetached output window component. |
HistoryRecord |
pendingRecordPending editor state kept while navigating command history. |
static Object |
prefsUser preferences backing console settings. |
Action |
prevHistoryActionAction that moves to the previous history entry. |
Style |
promptStyleStyle used for prompt text in the output pane. |
Style |
resultStyleStyle used for evaluated result text. |
Element |
rootElementRoot document element for row calculations. |
int |
rowNumCurrent one-based caret row. |
JLabel |
rowNumAndColNumFooter label showing the caret row and column. |
Thread |
runThreadBackground thread currently compiling or running a script. |
Action |
saveActionAction that saves the current script. |
boolean |
saveOnRunWhether the current script is saved before it is run. |
Action |
saveOnRunActionAction that toggles saving before each run. |
boolean |
scaleIconsWithFont |
String |
scriptArgsSpace-separated arguments passed to script execution. |
Object |
scriptFileCurrent script file or generated script identifier. |
int |
scriptNameCounterCounter used for generated script names. |
boolean |
scriptRunningWhether a script is currently being compiled or executed. |
Component |
scrollAreaScroll container that wraps the output area. |
Action |
selectPreviousWordActionAction that selects the previous word in the editor. |
Action |
selectWordActionAction that selects the next word in the editor. |
Action |
setScriptArgsActionAction that edits the configured script arguments. |
GroovyShell |
shellShell used to compile and run scripts. |
Action |
showOutputWindowActionAction that shows the detached output window. |
boolean |
showScriptInOutputWhether executed script text is echoed into the output pane. |
Action |
showScriptInOutputActionAction that toggles script echoing in the output pane. |
boolean |
showToolbarWhether the toolbar is visible. |
Action |
showToolbarActionAction that toggles toolbar visibility. |
static boolean |
smartHighlighterWhether the smart syntax highlighter is enabled by default. |
JSplitPane |
splitPaneSplit pane separating input and output. |
boolean |
stackOverFlowErrorWhether the last failure was a stack overflow. |
Style |
stacktraceStyleStyle used for stack traces and error text. |
JLabel |
statusLabelStatus label shown in the footer. |
SwingBuilder |
swingSwing builder used to create and wire the console UI. |
SystemOutputInterceptor |
systemErrorInterceptorInterceptor that captures stderr. |
SystemOutputInterceptor |
systemOutInterceptorInterceptor that captures stdout. |
int |
textSelectionEndSelection end cached from the caret listener. |
int |
textSelectionStartSelection start cached from the caret listener. |
boolean |
threadInterruptWhether the @ThreadInterrupt transform is applied to scripts. |
Action |
threadInterruptActionAction that toggles thread interruption support. |
Component |
toolbarToolbar component shown above the editor. |
boolean |
useScriptClassLoaderForScriptExecutionWhether script execution uses the shell class loader as context loader. |
boolean |
visualizeScriptResultsWhether non-null results are transformed for visual display. |
Action |
visualizeScriptResultsActionAction that toggles result visualization. |
| Constructor and description |
|---|
Console(Binding binding)Creates a console backed by a fresh binding. |
Console(ClassLoader parent, Binding binding, CompilerConfiguration baseConfig)Creates a console with the supplied parent loader, binding, and base compiler configuration. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
addClasspathDir(EventObject evt)Adds a directory to the shell classpath. |
|
void |
addClasspathJar(EventObject evt)Adds jar files to the shell classpath. |
|
void |
addToHistory(Object record)Adds a history record and trims the list to the configured maximum size. |
|
void |
appendOutput(String text, AttributeSet style)Appends plain text to the output pane. |
|
void |
appendOutput(Window window, AttributeSet style)Appends a window description to the output pane. |
|
void |
appendOutput(Object object, AttributeSet style)Appends an object's string form to the output pane. |
|
void |
appendOutput(Component component, AttributeSet style)Appends an embedded component to the output pane. |
|
void |
appendOutput(Icon icon, AttributeSet style)Appends an embedded icon to the output pane. |
|
void |
appendOutputLines(Object text, Object style)Appends text and preserves compact line spacing in the output pane. |
|
void |
appendOutputNl(Object text, Object style)Appends text to the output pane, forcing a preceding line break. |
|
void |
appendStacktrace(Object text)Appends a stack trace, hyperlinking script line references when possible. |
|
void |
applyIconSize(int size)Applies a toolbar icon size and refreshes the toolbar. |
|
Object |
askToInterruptScript()Prompts to interrupt the running script before exiting. |
|
boolean |
askToSaveFile()Prompts to save unsaved changes before an operation proceeds. |
|
void |
autoClearOutput(EventObject evt)Toggles whether output is cleared before each run or compile. |
|
void |
beep()Emits the platform default warning beep. |
|
void |
bindResults()Refreshes the shell bindings that expose the last result and result history. |
|
static void |
captureStdErr(EventObject evt)Toggles whether stderr is captured by all console windows. |
|
static void |
captureStdOut(EventObject evt)Toggles whether stdout is captured by all console windows. |
|
void |
caretUpdate(CaretEvent e)Updates cached selection bounds and the row/column display. |
|
void |
clearContext(EventObject evt)Clears the shell binding and starts a fresh script context. |
|
void |
clearOutput(EventObject evt)Clears all text from the output pane. |
|
void |
closeOutputPrintWriter()Closes the optional output log writer. |
|
void |
comment(EventObject evt)Comments or uncomments the current line selection. |
|
void |
compileAsJava(EventObject evt)Compiles the current editor contents as Java source. |
|
Object |
compileFinishNormal()Reports successful compilation without execution. |
|
void |
compileScript(EventObject evt, Console.SourceType st)Compiles the current editor contents without running them. |
|
void |
componentHidden(ComponentEvent e)No-op component listener implementation. |
|
void |
componentMoved(ComponentEvent e)No-op component listener implementation. |
|
void |
componentResized(ComponentEvent e)Persists component dimensions when the editor or frame is resized. |
|
void |
componentShown(ComponentEvent e)No-op component listener implementation. |
|
void |
copy(EventObject evt)Copies the current selection from the focused text component. |
|
void |
createOutputPrintWriter(File outputFile)Opens the configured output log file in append mode. |
|
void |
cut(EventObject evt)Cuts the current editor selection. |
|
void |
cycleTheme(EventObject evt)Advances to the next available theme mode. |
|
void |
darkTheme(EventObject evt)Switches the console to the bundled dark theme. |
|
void |
detachedOutput(EventObject evt)Toggles whether output is shown in a detached window. |
|
void |
doInterrupt(EventObject evt)Interrupts the currently running script thread, if any. |
|
int |
dot(CaretEvent e) |
|
boolean |
exit(EventObject evt)Closes this console after offering to interrupt and save. |
|
void |
exitDesktop(EventObject evt, Object quitResponse)Handles desktop quit requests by delegating to exit. |
|
void |
fileNewFile(EventObject evt)Resets the editor to a new unsaved script. |
|
void |
fileNewWindow(EventObject evt)Opens another console window seeded with the current binding variables. |
|
void |
fileOpen(EventObject evt)Prompts for a script file and loads it into the editor. |
|
boolean |
fileSave(EventObject evt)Saves the current script, prompting for a file when needed. |
|
boolean |
fileSaveAs(EventObject evt)Saves the current script under a newly selected file name. |
|
void |
find(EventObject evt)Shows the find dialog. |
|
void |
findNext(EventObject evt)Repeats the previous find operation in the forward direction. |
|
void |
findPrevious(EventObject evt)Repeats the previous find operation in the reverse direction. |
|
Object |
finishException(Throwable t, boolean executing)Reports a compilation or execution failure in the output pane. |
|
Object |
finishNormal(Object result, Long elapsedTime)Reports successful execution and publishes the resulting value. |
|
void |
focusGained(FocusEvent e)Tracks the last focused text component for copy and select-all actions. |
|
void |
focusLost(FocusEvent e)No-op focus listener implementation. |
|
void |
fullStackTraces(EventObject evt)Toggles whether full stack traces are reported for failures. |
|
int |
getConsoleId()Returns the identifier used by output interceptors for this console. |
|
int |
getCurrentIconSize()Returns the current toolbar icon size. |
|
Object |
getLastResult()Returns the most recent non-null result from execution history. |
|
static Icon |
getNodeIcon()Returns the icon used for AST and object browser tree nodes. |
|
void |
hideAndClearOutputWindow(EventObject evt)Clears and then hides the detached output window. |
|
void |
hideOutputWindow(EventObject evt)Hides the detached output window when detached mode is enabled. |
|
void |
historyNext(EventObject evt)Moves forward in command history. |
|
void |
historyPrev(EventObject evt)Moves backward in command history. |
|
void |
hyperlinkUpdate(HyperlinkEvent e)Highlights the source line referenced by an activated output hyperlink. |
|
void |
insertString(Document doc, int offset, String text, AttributeSet attributeSet, boolean outputToFile)Inserts text into a document and optionally mirrors it to the output log file. |
|
void |
inspectAst(EventObject evt)Opens the AST browser for the current editor contents. |
|
void |
inspectCst(EventObject evt)Opens the CST viewer for the current editor contents. |
|
void |
inspectLast(EventObject evt)Opens the object browser for the last non-null result. |
|
void |
inspectTokens(EventObject evt)Opens the lexer token inspector for the current editor contents. |
|
void |
inspectVariables(EventObject evt)Opens the object browser for the current shell variables. |
|
void |
installInterceptor()Starts interceptors that route standard output and error into the console. |
|
void |
invokeTextAction(Object evt, Object closure, Object area)Invokes a text action against the active source component when present. |
|
boolean |
isScaleIconsWithFont()Returns whether toolbar icons follow the editor font size. |
|
void |
largeIcons(EventObject evt)Switches toolbar icons to the large preset. |
|
void |
largerFont(EventObject evt)Increases the editor font size. |
|
void |
lightTheme(EventObject evt)Switches the console to the bundled light theme. |
|
void |
listClasspath(EventObject evt)Displays the current shell classpath in a dialog. |
|
int |
loadMaxOutputChars()Loads the configured output size limit, honoring the system property override. |
|
void |
loadScriptFile(File file)Loads the supplied script file into the editor. |
|
void |
loopMode(EventObject evt)Toggles whether the console reruns unchanged scripts after a delay. |
|
static void |
main(Object args)Launches the console application from the command line. |
|
int |
mark(CaretEvent e) |
|
void |
newScript(ClassLoader parent, Binding binding)Recreates the Groovy shell for a new script context. |
|
void |
normalIcons(EventObject evt)Switches toolbar icons to the normal preset. |
|
static boolean |
notifySystemErr(int consoleId, String str)Routes captured stderr to the owning console or every console window. |
|
static boolean |
notifySystemOut(int consoleId, String str)Routes captured stdout to the owning console or every console window. |
|
void |
orientationVertical(EventObject evt)Toggles the input/output split orientation. |
|
static int |
outputFontSizeFor(int inputFontSize)HTMLEditorKit scales FontSize values up by ~4/3 (pt→px at 96/72); compensate so the output pane visually matches the input pane. |
|
void |
paste(EventObject evt)Pastes clipboard text into the input editor. |
|
void |
preferences(EventObject evt)Shows the console preferences dialog. |
|
void |
print(EventObject evt)Prints the input editor contents. |
|
void |
reapplyTheme()Reapplies the current theme and retints console components. |
|
void |
redo(EventObject evt)Redoes the most recently undone edit in the input editor. |
|
void |
reloadThemes()Reloads theme definitions and reapplies the active theme. |
|
void |
replace(EventObject evt)Shows the replace dialog. |
|
void |
run()Builds and shows the console UI using default delegates. |
|
void |
run(Map defaults)Builds and shows the console UI using the supplied Swing delegates. |
|
void |
runJava(EventObject evt)Compiles and runs the current editor contents as Java source. |
|
void |
runScript(EventObject evt, Console.SourceType st)Compiles and runs the current editor contents. |
|
void |
runSelectedJava(EventObject evt)Compiles and runs the current selection as Java source. |
|
void |
runSelectedScript(EventObject evt, Console.SourceType st)Compiles and runs only the current editor selection. |
|
void |
saveOnRun(EventObject evt)Toggles whether scripts are saved before they run. |
|
void |
scaleIconsWithFont(EventObject evt)Toggles whether toolbar icons track the editor font size. |
|
void |
selectAll(EventObject evt)Selects all text in the focused text component. |
|
void |
selectBlock(EventObject evt)Expands the selection from word to line to surrounding block. |
|
Object |
selectFilename(Object name)Opens a file chooser and returns the selected script file. |
|
void |
setDirty(boolean newDirty)Marks the editor dirty state and refreshes save affordances. |
|
void |
setOutputPreferences(boolean useOutputFile, File outputFile)Updates output mirroring preferences and recreates the log writer if needed. |
|
void |
setRowNumAndColNum()Updates the cached caret row and column display. |
|
void |
setScaleIconsWithFont(boolean enabled)Persists whether toolbar icons track the editor font size. |
|
void |
setScriptArgs(EventObject evt)Prompts for space-separated script arguments used by future runs. |
|
void |
setVariable(String name, Object value)Adds a variable to the shell binding. |
|
void |
showAbout(EventObject evt)Shows the about dialog for the console. |
|
void |
showCompilingMessage()Shows the standard script-compiling status message. |
|
void |
showExecutingMessage()Shows the standard script-executing status message. |
|
void |
showMessage(String message)Updates the status bar with the supplied message. |
|
void |
showOutputWindow(EventObject evt)Shows the detached output window when detached mode is enabled. |
|
void |
showScriptInOutput(EventObject evt)Toggles whether executed source text is echoed to the output pane. |
|
void |
showToolbar(EventObject evt)Toggles toolbar visibility and persists the selection. |
|
void |
smallIcons(EventObject evt)Switches toolbar icons to the small preset. |
|
void |
smallerFont(EventObject evt)Decreases the editor font size. |
|
void |
smartHighlighter(EventObject evt)Switches between smart and regex-based syntax highlighters. |
|
void |
systemTheme(EventObject evt)Switches the console to follow the operating system theme. |
|
void |
threadInterruption(EventObject evt)Toggles the @ThreadInterrupt transform for future scripts. |
|
void |
undo(EventObject evt)Undoes the most recent edit in the input editor. |
|
void |
updateTitle()Updates the main window title to reflect the current script and dirty state. |
|
void |
visualizeScriptResults(EventObject evt)Toggles whether results are transformed before display. |
Console window icon resource.
Prefix used for generated script names inside the console.
Optional hook invoked after script execution completes.
Whether output is cleared before each run.
Action that toggles automatic output clearing.
Base compiler configuration used to seed new scripts.
Optional hook invoked before script execution starts.
Placeholder component shown when output is detached.
Whether stderr is redirected into the console output pane.
Whether stdout is redirected into the console output pane.
Current one-based caret column.
Style used for echoed commands in the output pane.
Compiler configuration for the current script shell.
Active console controllers sharing the global stream interceptors.
Lazily created preferences dialog controller.
Last focused text component used by copy/select-all actions.
Initial directory for classpath directory selection dialogs.
Initial directory for classpath jar selection dialogs.
Initial directory for file open/save dialogs.
Name of the currently selected theme mode.
Current caret offset in the input document.
Whether output is shown in a detached window.
Action that toggles detached output mode.
Whether the current editor contents differ from the saved script.
Main console frame or dialog.
Default Swing delegates used to build the console frame and menu bar.
Whether full stack traces are shown for execution failures.
Action that toggles full stack trace output.
File filter used for Groovy script open/save dialogs.
Menu action variant that hides the detached output window.
Toolbar action variant that hides the detached output window.
Popup action variant that hides the detached output window.
Shortcut action variant that hides the detached output window.
Execution history records kept for navigation and result lookup.
Index of the currently selected history record.
Style used for clickable error links.
Raw text component used for script editing.
Hash of the last script text scheduled for execution.
Styled text editor used for script input.
Action that interrupts the active script thread.
Whether unchanged scripts are rerun after a delay.
Action that toggles loop mode.
Maximum number of history entries retained by the console.
Maximum number of characters retained in the output pane.
Action that moves to the next history entry.
Whether the split pane stacks input and output vertically.
Action that toggles the split-pane orientation.
Divider size to restore when output is no longer detached.
Output text pane used for results and errors.
Optional writer that mirrors output to a log file.
Style used for regular output text.
Detached output window component.
Pending editor state kept while navigating command history.
User preferences backing console settings.
Action that moves to the previous history entry.
Style used for prompt text in the output pane.
Style used for evaluated result text.
Root document element for row calculations.
Current one-based caret row.
Footer label showing the caret row and column.
Background thread currently compiling or running a script.
Action that saves the current script.
Whether the current script is saved before it is run.
Action that toggles saving before each run.
Space-separated arguments passed to script execution.
Current script file or generated script identifier.
Counter used for generated script names.
Whether a script is currently being compiled or executed.
Scroll container that wraps the output area.
Action that selects the previous word in the editor.
Action that selects the next word in the editor.
Action that edits the configured script arguments.
Shell used to compile and run scripts.
Action that shows the detached output window.
Whether executed script text is echoed into the output pane.
Action that toggles script echoing in the output pane.
Whether the toolbar is visible.
Action that toggles toolbar visibility.
Whether the smart syntax highlighter is enabled by default.
Split pane separating input and output.
Whether the last failure was a stack overflow.
Style used for stack traces and error text.
Status label shown in the footer.
Swing builder used to create and wire the console UI.
Interceptor that captures stderr.
Interceptor that captures stdout.
Selection end cached from the caret listener.
Selection start cached from the caret listener.
Whether the @ThreadInterrupt transform is applied to scripts.
Action that toggles thread interruption support.
Toolbar component shown above the editor.
Whether script execution uses the shell class loader as context loader.
Whether non-null results are transformed for visual display.
Action that toggles result visualization.
Creates a console backed by a fresh binding.
Creates a console with the supplied parent loader, binding, and base compiler configuration.
Adds a directory to the shell classpath.
Adds jar files to the shell classpath.
Adds a history record and trims the list to the configured maximum size.
Appends plain text to the output pane.
Appends a window description to the output pane.
Appends an object's string form to the output pane.
Appends an embedded component to the output pane.
Appends an embedded icon to the output pane.
Appends text and preserves compact line spacing in the output pane.
Appends text to the output pane, forcing a preceding line break.
Appends a stack trace, hyperlinking script line references when possible.
Applies a toolbar icon size and refreshes the toolbar.
Prompts to interrupt the running script before exiting.
Prompts to save unsaved changes before an operation proceeds.
Toggles whether output is cleared before each run or compile.
Emits the platform default warning beep.
Refreshes the shell bindings that expose the last result and result history.
Toggles whether stderr is captured by all console windows.
Toggles whether stdout is captured by all console windows.
Updates cached selection bounds and the row/column display.
Clears the shell binding and starts a fresh script context.
Clears all text from the output pane.
Closes the optional output log writer.
Comments or uncomments the current line selection.
Compiles the current editor contents as Java source.
Reports successful compilation without execution.
Compiles the current editor contents without running them.
No-op component listener implementation.
No-op component listener implementation.
Persists component dimensions when the editor or frame is resized.
No-op component listener implementation.
Copies the current selection from the focused text component.
Opens the configured output log file in append mode.
Cuts the current editor selection.
Advances to the next available theme mode.
Switches the console to the bundled dark theme.
Toggles whether output is shown in a detached window.
Interrupts the currently running script thread, if any.
Closes this console after offering to interrupt and save.
Handles desktop quit requests by delegating to exit.
Resets the editor to a new unsaved script.
Opens another console window seeded with the current binding variables.
Prompts for a script file and loads it into the editor.
Saves the current script, prompting for a file when needed.
Saves the current script under a newly selected file name.
Shows the find dialog.
Repeats the previous find operation in the forward direction.
Repeats the previous find operation in the reverse direction.
Reports a compilation or execution failure in the output pane.
Reports successful execution and publishes the resulting value.
Tracks the last focused text component for copy and select-all actions.
No-op focus listener implementation.
Toggles whether full stack traces are reported for failures.
Returns the identifier used by output interceptors for this console.
Returns the current toolbar icon size.
Returns the most recent non-null result from execution history.
Returns the icon used for AST and object browser tree nodes.
Clears and then hides the detached output window.
Hides the detached output window when detached mode is enabled.
Moves forward in command history.
Moves backward in command history.
Highlights the source line referenced by an activated output hyperlink.
Inserts text into a document and optionally mirrors it to the output log file.
Opens the AST browser for the current editor contents.
Opens the CST viewer for the current editor contents.
Opens the object browser for the last non-null result.
Opens the lexer token inspector for the current editor contents.
Opens the object browser for the current shell variables.
Starts interceptors that route standard output and error into the console.
Invokes a text action against the active source component when present.
Returns whether toolbar icons follow the editor font size.
Switches toolbar icons to the large preset.
Increases the editor font size.
Switches the console to the bundled light theme.
Displays the current shell classpath in a dialog.
Loads the configured output size limit, honoring the system property override.
Loads the supplied script file into the editor.
Toggles whether the console reruns unchanged scripts after a delay.
Launches the console application from the command line.
Recreates the Groovy shell for a new script context.
Switches toolbar icons to the normal preset.
Routes captured stderr to the owning console or every console window.
Routes captured stdout to the owning console or every console window.
Toggles the input/output split orientation.
HTMLEditorKit scales FontSize values up by ~4/3 (pt→px at 96/72); compensate so the output pane visually matches the input pane.
Pastes clipboard text into the input editor.
Shows the console preferences dialog.
Prints the input editor contents.
Reapplies the current theme and retints console components.
Redoes the most recently undone edit in the input editor.
Reloads theme definitions and reapplies the active theme.
Shows the replace dialog.
Builds and shows the console UI using default delegates.
Builds and shows the console UI using the supplied Swing delegates.
Compiles and runs the current editor contents as Java source.
Compiles and runs the current editor contents.
Compiles and runs the current selection as Java source.
Compiles and runs only the current editor selection.
Toggles whether scripts are saved before they run.
Toggles whether toolbar icons track the editor font size.
Selects all text in the focused text component.
Expands the selection from word to line to surrounding block.
Marks the editor dirty state and refreshes save affordances.
Updates output mirroring preferences and recreates the log writer if needed.
Updates the cached caret row and column display.
Persists whether toolbar icons track the editor font size.
Prompts for space-separated script arguments used by future runs.
Shows the about dialog for the console.
Shows the standard script-compiling status message.
Shows the standard script-executing status message.
Updates the status bar with the supplied message.
Shows the detached output window when detached mode is enabled.
Toggles whether executed source text is echoed to the output pane.
Toggles toolbar visibility and persists the selection.
Switches toolbar icons to the small preset.
Decreases the editor font size.
Switches between smart and regex-based syntax highlighters.
Switches the console to follow the operating system theme.
Toggles the @ThreadInterrupt transform for future scripts.
Undoes the most recent edit in the input editor.
Updates the main window title to reflect the current script and dirty state.
Toggles whether results are transformed before display.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.