}
private mxCell createCell(mxCell neighborCell, Revision rev, boolean collapseRevisions) {
mxCell result;
List<Revision> prevList = (neighborCell == null) ? null : ((Node)neighborCell.getValue()).revisions;
Revision prevRev = (prevList == null) ? null : prevList.get(prevList.size() - 1);
int thisOrder = revisionOrder.get(rev);
int prevOrder = (prevRev == null) ? -100 : revisionOrder.get(prevRev);
if (collapseRevisions && prevRev != currentRevision && rev != currentRevision
&& prevRev != null && !linkedRevisions.containsKey(prevRev) && !prevRev.isDeleted()
&& !linkedRevisions.containsKey(rev) && !rev.isDeleted() && (thisOrder - prevOrder) == 1
&& (prevOrder == 0 || revisions.get(prevOrder - 1).getRevisionNumber() < prevRev.getRevisionNumber())
&& (thisOrder == (revisions.size() - 1) || revisions.get(thisOrder + 1).getRevisionNumber() > rev.getRevisionNumber())) {
prevList.add(rev);
result = neighborCell;
} else {
List<Revision> nodeRevisions = new ArrayList<Revision>();
nodeRevisions.add(rev);
result = new mxCell(new Node(nodeRevisions), new mxGeometry(), null);
result.setVertex(true);
result.setConnectable(true);
result.setStyle(SVNRevisionGraph.REVISION_STYLE + ";"
+ mxConstants.STYLE_STROKEWIDTH + "=" + ((rev == currentRevision) ? "3" : "1") + ";"
+ mxConstants.STYLE_DASHED + "=" + rev.isDeleted());
addCell(result);
if (prevRev != null && !prevRev.isDeleted()) {
createEdge(neighborCell, result, false);
}
}
cellMap.put(rev, result);
return result;