* Configure high level edge.
*
* @param edge the edge
*/
private void configureHighLevelEdge(Edge edge) {
Graph2D graph = (Graph2D) edge.getGraph();
DependencyGraph rootGraph = (DependencyGraph) graph.getHierarchyManager().getRootGraph();
Class<? extends FamixAssociation> associationType = rootGraph.getEdgeType(edge);
EdgeRealizer er = graph.getRealizer(edge);
EdgeRealizer newEdgeRealizer = null;
if (associationType.equals(FamixInvocation.class)) {
newEdgeRealizer = new DefaultFamixEdgeRealizer(er);
} else if (associationType.equals(FamixInheritance.class)) {
newEdgeRealizer = new DeltaEdgeRealizer(er);
} else if (associationType.equals(FamixSubtyping.class)) {
newEdgeRealizer = new DashedDeltaEdgeRealizer(er);
} else if (associationType.equals(FamixCastTo.class)) {
newEdgeRealizer = new DefaultFamixEdgeRealizer(er);
} else if (associationType.equals(FamixCheckInstanceOf.class)) {
newEdgeRealizer = new DefaultFamixEdgeRealizer(er);
} else if (associationType.equals(FamixAccess.class)) {
newEdgeRealizer = new DefaultFamixEdgeRealizer(er);
} else {
sLogger.warn("Edgetype of " + associationType + " currently not supported - using default");
newEdgeRealizer = new DefaultFamixEdgeRealizer(er);
}
List<Edge> lowLevelEdges = rootGraph.getLowLevelEdges(edge);
int nrLowLevelEdges = 1;
if (lowLevelEdges != null) {
nrLowLevelEdges = lowLevelEdges.size();
}
((IFamixEdgeRealizer) newEdgeRealizer).initAttributes(associationType, nrLowLevelEdges);
graph.setRealizer(edge, newEdgeRealizer);
}