Glamorous Toolkit meets Lepiter: knowledge management + multi-language notebooks. Read more.

Analyzing Java systems

Java is supported in two distinct ways: through the external jdt2famix parser, and through the internal Java parser.

Importing Java with jdt2famix via an MSE file

jdt2famix is a project implemented in Java based on the JDT Core project. The project is used from the command line to produce an intermediary file that can be loaded in Glamorous Toolkit.

Please for follow the instructions from jdt2famix to produce an MSE file. MSE is a file format for exchanging models. The MSE produced by jdt2famix contains a serialization of the model for the Java code.

Once an MSE model exists, you can load it into Glamorous Toolkit like this:

model := MooseModel new importMSEFromFile: '/PATH/TO/FILE.mse' asFileReference

Parsing Java

Glamorous Toolkit ships with a built in parser and abstract syntax tree implementation for Java.

javaFile := 'PATH/TO/' asFileReference.
JavaParser parse: javaFile contents