Search in sources :

Example 1 with TraverseDirection

use of org.eclipse.n4js.flowgraphs.analysis.TraverseDirection in project n4js by eclipse.

the class FlowgraphsXpectMethod method performBranchAnalysis.

private AllBranchPrintVisitor performBranchAnalysis(IEObjectCoveringRegion offset, String directionName, IEObjectCoveringRegion referenceOffset) {
    EObjectCoveringRegion offsetImpl = (EObjectCoveringRegion) offset;
    EObjectCoveringRegion referenceOffsetImpl = (EObjectCoveringRegion) referenceOffset;
    ControlFlowElement startCFE = getCFEWithReference(offsetImpl, referenceOffsetImpl);
    ControlFlowElement referenceCFE = getCFE(referenceOffset);
    TraverseDirection direction = getDirection(directionName);
    ControlFlowElement container = FGUtils.getCFContainer(referenceCFE);
    AllBranchPrintVisitor appw = new AllBranchPrintVisitor(container, startCFE, direction);
    getFlowAnalyzer(referenceCFE).accept(appw);
    return appw;
}
Also used : AllBranchPrintVisitor(org.eclipse.n4js.flowgraphs.analysers.AllBranchPrintVisitor) IEObjectCoveringRegion(org.eclipse.n4js.xpect.common.N4JSOffsetAdapter.IEObjectCoveringRegion) EObjectCoveringRegion(org.eclipse.n4js.xpect.common.N4JSOffsetAdapter.EObjectCoveringRegion) TraverseDirection(org.eclipse.n4js.flowgraphs.analysis.TraverseDirection) ControlFlowElement(org.eclipse.n4js.n4JS.ControlFlowElement)

Aggregations

AllBranchPrintVisitor (org.eclipse.n4js.flowgraphs.analysers.AllBranchPrintVisitor)1 TraverseDirection (org.eclipse.n4js.flowgraphs.analysis.TraverseDirection)1 ControlFlowElement (org.eclipse.n4js.n4JS.ControlFlowElement)1 EObjectCoveringRegion (org.eclipse.n4js.xpect.common.N4JSOffsetAdapter.EObjectCoveringRegion)1 IEObjectCoveringRegion (org.eclipse.n4js.xpect.common.N4JSOffsetAdapter.IEObjectCoveringRegion)1