diff --git a/src/org/ntlab/deltaViewer/CollaborationViewer.java b/src/org/ntlab/deltaViewer/CollaborationViewer.java index 1db4730..19f68a0 100644 --- a/src/org/ntlab/deltaViewer/CollaborationViewer.java +++ b/src/org/ntlab/deltaViewer/CollaborationViewer.java @@ -185,7 +185,16 @@ tgtObjId = calledMethodExec.getArguments().get(0).getId(); ObjectVertex tgtObjectVertex = objectToVertexMap.get(tgtObjId); - createObjectRefrence(srcClassName, srcObjId, tgtObjId); + if (!methodExecToVertexMap.containsKey(calledMethodExec)) { + createMethodExecutionVertex(calledMethodExec.getThisObjId(), methodInvStatement.getCallerSideMethodName(), calledMethodExec); + update(); + moveArgumentObjectVertex(calledMethodExec, tgtObjectVertex, methodExecToVertexMap.get(calledMethodExec)); + update(); + createObjectRefrence(srcClassName, srcObjId, tgtObjId); + removeCalledMethodExecutionVertex(null, prevMethodExec, calledMethodExec); + } else { + createObjectRefrence(srcClassName, srcObjId, tgtObjId); + } if (methodExecToVertexMap.containsKey(prevMethodExec)) { if (methodExecToVertexMap.get(prevMethodExec).getLocals().contains(tgtObjectVertex)) { methodExecToVertexMap.get(prevMethodExec).getLocals().remove(tgtObjectVertex);