or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

ast-browser.mdconsole-application.mdindex.mdobject-inspector.mdsystem-integration.mdtext-editing.md
tile.json

tessl/maven-org-codehaus-groovy--groovy-console

A Swing-based interactive console for evaluating Groovy expressions and scripts with syntax highlighting, code completion, and an integrated AST browser.

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
mavenpkg:maven/org.codehaus.groovy/groovy-console@3.0.x

To install, run

npx @tessl/cli install tessl/maven-org-codehaus-groovy--groovy-console@3.0.0

index.mddocs/

Groovy Console

A 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.

Package Information

  • Package Name: groovy-console
  • Package Type: maven
  • Language: Groovy/Java
  • Installation: Add dependency org.codehaus.groovy:groovy-console:3.0.25

Core Imports

import groovy.console.ui.Console
import groovy.console.ui.ObjectBrowser
import groovy.console.ui.AstBrowser

Legacy 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

Basic Usage

// 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)

Architecture

The Groovy Console is built around several key components:

  • Console Application: Main interactive development environment (Console class)
  • Text Editor: Advanced Groovy code editor with syntax highlighting and smart features
  • AST Browser: Abstract Syntax Tree visualization and analysis tools
  • Object Inspector: Runtime object introspection and property browsing
  • Platform Integration: Native UI adaptations for Windows, macOS, and Linux
  • Ivy Integration: Optional dependency management through Apache Ivy

Capabilities

Console Application

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)
}

Console Application

Text Editing

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)
}

Text Editing

AST Browser

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
}

AST Browser

Object Inspector

Runtime object inspection and property browsing tools for debugging and exploration.

class ObjectBrowser {
    static void main(String[] args)
    static void inspect(Object objectUnderInspection)
}

Object Inspector

System Integration

System output capture, preferences management, and platform-specific features.

class SystemOutputInterceptor extends FilterOutputStream {
    SystemOutputInterceptor(OutputStream out)
}

class ConsolePreferences {
    ConsolePreferences()
}

System Integration