Commit 7a0844e5 authored by Carlos Galindo's avatar Carlos Galindo
Browse files

Add tree linking for primitive type declarations.

parent 396b28c6
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -168,8 +168,11 @@ public class ExpressionObjectTreeFinder {
    protected void markTransference(Pair<VariableAction, String> sourcePair, VariableAction targetAction, String targetMember) {
        VariableAction sourceAction = sourcePair.a;
        String sourceMember = sourcePair.b;
        if (targetAction.hasObjectTree())
        if (targetAction.hasObjectTree()) {
            ObjectTree.copyTargetTreeToSource(sourceAction.getObjectTree(), targetAction.getObjectTree(), sourceMember, targetMember);
            sourceAction.setPDGTreeConnectionTo(targetAction, sourceMember, targetMember);
        } else {
            sourceAction.setPDGValueConnection(sourceMember);
        }
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -362,7 +362,7 @@ public class VariableVisitor extends GraphNodeContentVisitor<VariableVisitor.Act

    @Override
    public void visit(VariableDeclarator n, Action arg) {
        if (n.getType().isClassOrInterfaceType() && n.getInitializer().isPresent()) {
        if (n.getInitializer().isPresent()) {
            groupActionsByRoot(graphNode);
            new ExpressionObjectTreeFinder(graphNode).handleVariableDeclarator(n);
        }