Bytecode Visualizer

Inspect, understand and debug Java bytecode, no matter if you have the corresponding source.

Sourcecode Visualizer

Draws a control flow graph alongside of Java source code.

Control Flow Graph Factory

Eclipse plugin for generating, editing and exporting control flow graphs.

Abstract Syntax Tree

Abstract Syntax Tree is a view in the Dr. Garbage tool suite to represent the the abstract syntactic structure of a selected java class file.

General

In the Abstract Syntax Tree (AST) each node denotes a construct occuring in the source code. It can be used to analyse the structure of java methods.

The AST view can be opened via:

Window > Show View > Other ... > Dr. Garbage > Abstract Syntax Tree

Features

  • show/hide nodes depending on their type
  • collapse subtrees
  • generate AST graphs directly from ASTView

Examples

screenshot

The source code of the class in the above screenshot:

package test;

public class TestClass {
    int testabc (int a, int b) {
        if (a > b)
            return a + b;
        else
            return a + 2;
    }
}

Hide Nodes

screenshot

Click on the button corresponding to the type of nodes you want to hide (left to right: package declarations, package imports, javadoc, fields)

Refresh AST

The AST will refresh automatically when you save your java file. However, all subtrees will collapse in the view

Generate AST graphs

right-click on the subtree of which you want to create and select Generate AST tree Graph from the context menu.

MethodDeclaration: int testabc()

Graph of MethodDeclaration: int testabc()