if ( monitor.isCanceled() ) {
throw new InterruptedException();
}
monitor.subTask( "Building RETE Tree" );
final ReteooVisitor visitor = new ReteooVisitor( newDiagram );
visitor.visitReteooRuleBase( ruleBase );
monitor.worked( 30 );
if ( monitor.isCanceled() ) {
throw new InterruptedException();
}
monitor.subTask( "Calculating RETE Tree Layout" );
BaseVertex rootVertex = visitor.getRootVertex();
RowList rowList = ReteooLayoutFactory.calculateReteRows( rootVertex );
ReteooLayoutFactory.layoutRowList( newDiagram,
rowList );
zeroBaseDiagram( newDiagram );
monitor.worked( 20 );