A Swing-based interactive console for evaluating Groovy expressions and scripts with syntax highlighting, code completion, and an integrated AST browser.
npx @tessl/cli install tessl/maven-org-codehaus-groovy--groovy-console@3.0.0A Swing-based interactive console for evaluating Groovy expressions and scripts with syntax highlighting, code completion, and an integrated AST browser. The Groovy Console provides a comprehensive development environment for writing, executing, and debugging Groovy scripts with real-time visual feedback and extensive analysis tools.
org.codehaus.groovy:groovy-console:3.0.25import groovy.console.ui.Console
import groovy.console.ui.ObjectBrowser
import groovy.console.ui.AstBrowserLegacy API (Deprecated): The groovy.ui.* package provides identical functionality but is deprecated:
import groovy.ui.Console // @Deprecated - use groovy.console.ui.Console
import groovy.inspect.swingui.ObjectBrowser
import groovy.inspect.swingui.AstBrowser// Launch console programmatically
def console = new groovy.console.ui.Console()
console.run()
// With custom binding
def binding = new Binding()
binding.setVariable('myVar', 'Hello World')
def console = new groovy.console.ui.Console(binding)
console.run([title: 'My Groovy Console'])
// Inspect objects at runtime
groovy.console.ui.ObjectBrowser.inspect(myObject)The Groovy Console is built around several key components:
Console class)Interactive Groovy development environment with script execution, file management, and integrated debugging tools.
class Console {
Console()
Console(Binding binding)
Console(ClassLoader parent, Binding binding, CompilerConfiguration baseConfig)
static void main(String[] args)
void run()
void run(Map defaults)
void run(JApplet applet)
}Advanced text editor with Groovy syntax highlighting, auto-completion, find/replace, and smart editing features.
class ConsoleTextEditor extends JScrollPane {
ConsoleTextEditor()
TextEditor getTextEditor()
void setShowLineNumbers(boolean showLineNumbers)
void setEditable(boolean editable)
boolean clipBoardAvailable()
Action getUndoAction()
Action getRedoAction()
Action getPrintAction()
void enableHighLighter(Class clazz)
}Abstract Syntax Tree visualization and analysis tools for understanding code structure and compilation phases.
class AstBrowser {
AstBrowser(inputArea, rootElement, classLoader)
void refresh()
static void main(String[] args)
}
enum CompilePhaseAdapter {
INITIALIZATION,
PARSING,
CONVERSION,
SEMANTIC_ANALYSIS,
CANONICALIZATION,
INSTRUCTION_SELECTION,
CLASS_GENERATION,
OUTPUT,
FINALIZATION
}Runtime object inspection and property browsing tools for debugging and exploration.
class ObjectBrowser {
static void main(String[] args)
static void inspect(Object objectUnderInspection)
}System output capture, preferences management, and platform-specific features.
class SystemOutputInterceptor extends FilterOutputStream {
SystemOutputInterceptor(OutputStream out)
}
class ConsolePreferences {
ConsolePreferences()
}