Tag Archives: roassal

Getting AST Visual in 3 min

There was one announce about C# tool to see ASTs and Alexandre Bergel shows that within minutes you could get the same in Pharo with roassal :). Here is what he is saying:

I am not sure to what syntax visualization is useful for, but indeed, this is easy in Roassal. Assuming a class MyVisitor, that simples collect the nodes of the AST.

| ast visitor g |
“We get the nodes from the AST”
ast := RBParser parseMethod: (ArrayTest>>#testReplaceFromToWithStartingAt) getSource.
visitor := MyVisitor new.
ast acceptVisitor: visitor.”Visualization”
g := RTGraphBuilder new.
g node
if: #isMessage shape: (RTEllipse new size: 10; color: Color red ) + (RTLabel new text: #selector);
if: #isReturn shape: (RTEllipse new size: 10; color: Color red );
if: #isBlock shape: (RTBox new size: 10; color: Color blue );
shape: (RTEllipse new size: 10; color: Color gray ).
g layout use: RTTreeLayout new.
g edge connectTo: #parent.g addAll: visitor nodes.

g applyLayout.
g view

Screen Shot 2014-04-05 at 9.56.35 PM
Tagged , ,

Scripting charts with GraphEt

GraphET is a great library to draw charts, graphs and histograms. It is built on top of Roassal, to let the user enjoy all the different interaction with the visualization. It is developed by Daniel Aviv Notario.

GraphET may be loaded using the following incantation:

Gofer new smalltalkhubUser: ‘ObjectProfile’
project: ‘GraphET’;
package: ‘ConfigurationOfGraphET’;
(Smalltalk at: #ConfigurationOfGraphET) loadDevelopment


Tagged , ,

PDFExporter for ROASSAL

Jamir announced a pdf exporter for ROASSAL. Here is the announce.

I’m currently working on a PDF exporter for
Roassal http://objectprofile.com/#/pages/products/roassal/overview.html

There is still a lot to do and many bugs to squash:

If you want to try it you can get it here:

RoassalPdfExporter http://www.smalltalkhub.com/#!/~Jamir/RoassalPdfExporter/

You’ll also need: Artefact http://www.smalltalkhub.com/#!/~RMoD/Artefact
and Roassal http://www.smalltalkhub.com/#!/~ObjectProfile/Roassal

In order to get the PDF file, click on ‘export’ and then on double click in ‘export as PDF’ . And a new file named ‘test.pdf’ will be created on the root of your Pharo directory.

There are still some missing shapes like arrows and new lines in text, and
there will be bugs. Your feedback is much appreciated!

Best regards.


Tagged ,