if ( isNewDiagram ) {
diagram.removeAll();
}
// Update connection router according to new model size
ConnectionRouter router;
if ( (isNewDiagram && newGraph.getChildren().size() < SIMPLE_ROUTER_MIN_NODES) || (!isNewDiagram && getModel().getChildren().size() < SIMPLE_ROUTER_MIN_NODES) ) {
router = new ShortestPathConnectionRouter( (IFigure) rootEditPart.getContentPane().getChildren().get( 0 ) );
} else {
router = ConnectionRouter.NULL;
}