| |
---|
| | import com.mxgraph.model.mxICell; |
---|
| | import com.mxgraph.util.mxPoint; |
---|
| | |
---|
| | public class CollaborationLayout implements IObjectLayout { |
---|
| | private static final int angleStep = 15; |
---|
| | private static final int angleStep = 30; |
---|
| | private mxPoint coordinatorPoint = new mxPoint(0, 100); |
---|
| | private double step; |
---|
| | private double padding; |
---|
| | |
---|
| |
---|
| | idx = references.indexOf(r); |
---|
| | if (idx < 0) { |
---|
| | references.add(r); |
---|
| | idx = references.indexOf(r); |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | } else if (a.getAliasType() == AliasType.CONSTRACTOR_INVOCATION) { |
---|
| | MethodInvocation c = (MethodInvocation) a.getOccurrencePoint().getStatement(); |
---|
| | String srcObjId = a.getMethodExecution().getThisObjId(); |
---|
| |
---|
| | idx = references.indexOf(r); |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | } else if (a.getAliasType() == AliasType.FORMAL_PARAMETER) { |
---|
| | MethodExecution methodExec = a.getOccurrencePoint().getMethodExecution(); |
---|
| | if (methodExec.isStatic()) { |
---|
| | // For calls to a static method. |
---|
| | String dstClassName = methodExec.getThisClassName(); |
---|
| | String srcClassName = methodExec.getCallerMethodExecution().getThisClassName(); |
---|
| | String dstObjId = methodExec.getThisObjId() + ":" + dstClassName; |
---|
| | String srcObjId = null; |
---|
| | if (!methodExec.getCallerMethodExecution().isStatic()) { |
---|
| | srcObjId = methodExec.getCallerMethodExecution().getThisObjId(); |
---|
| | } else { |
---|
| | srcObjId = methodExec.getCallerMethodExecution().getThisObjId() + ":" + srcClassName; |
---|
| | } |
---|
| | Reference r = new Reference(srcObjId, dstObjId, srcClassName, dstClassName); |
---|
| | idx = references.indexOf(r); |
---|
| | if (idx < 0) { |
---|
| | references.add(r); |
---|
| | idx = references.indexOf(r); |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | if (idx >= 0) { |
---|
| | Reference r = references.get(idx); |
---|
| | List<Integer> rHIstory = referenceHistory.get(r); |
---|
| |
---|
| | |