use of org.eclipse.n4js.flowgraphs.analysers.AllNodesAndEdgesPrintVisitor in project n4js by eclipse.
the class FlowgraphsXpectMethod method allEdges.
/**
* This xpect method can evaluate all edges of the containing function.
*/
@ParameterParser(syntax = "('from' arg1=OFFSET)?")
@Xpect
public void allEdges(@N4JSCommaSeparatedValuesExpectation IN4JSCommaSeparatedValuesExpectation expectation, IEObjectCoveringRegion offset) {
ControlFlowElement cfe = null;
if (offset != null) {
cfe = getCFE(offset);
}
cfe = FGUtils.getCFContainer(cfe);
AllNodesAndEdgesPrintVisitor anaepw = new AllNodesAndEdgesPrintVisitor(cfe);
getFlowAnalyzer(cfe).accept(anaepw);
List<String> pathStrings = anaepw.getAllEdgeStrings();
expectation.assertEquals(pathStrings);
}
Aggregations