final CompoundDirectedGraph graph = mapDiagramToGraph();
graph.setDefaultPadding(new Insets(PADDING));
CompoundDirectedGraphLayout layout = new CompoundDirectedGraphLayout();
int direction = PreferenceManager.getInstance().loadPreferenceAsInt(PreferencesConstants.EDITOR_LAYOUT_ORIENTATION);
graph.setDirection(direction);
layout.visit(graph);
mapGraphCoordinatesToDiagram(graph);
}
private Diagram mapGraphCoordinatesToDiagram(CompoundDirectedGraph graph) {