setupChildren(currCommit); final int nChildren = currCommit.getChildCount(); if (nChildren == 0) { currCommit.lane = nextFreeLane(); } else if (nChildren == 1 && currCommit.children[0].getParentCount() < 2) { @SuppressWarnings("unchecked") final PlotCommit<L> c = currCommit.children[i]; if (c.getParent(0) == currCommit) { Integer len = laneLength.get(c.lane); PlotCommit firstParent = (PlotCommit) c.getParent(0); if (firstParent.lane != null && firstParent.lane != c.lane) closeLane(c.lane); if (currCommit.getParentCount() == 0) closeLane(currCommit.lane);
void addChild(PlotCommit c) { final int cnt = children.length; if (cnt == 0) children = new PlotCommit[] { c }; else if (cnt == 1) { if (!c.getId().equals(children[0].getId())) children = new PlotCommit[] { children[0], c }; } else { for (PlotCommit pc : children) if (c.getId().equals(pc.getId())) return; final PlotCommit[] n = new PlotCommit[cnt + 1]; System.arraycopy(children, 0, n, 0, cnt); n[cnt] = c; children = n; } }
/** {@inheritDoc} */ @Override protected RevCommit createCommit(AnyObjectId id) { return new PlotCommit(id); }
private void setupChildren(PlotCommit<L> currCommit) { final int nParents = currCommit.getParentCount(); for (int i = 0; i < nParents; i++) ((PlotCommit) currCommit.getParent(i)).addChild(currCommit); }
boolean childIsMerge = child.getParent(0) != currCommit; if (childIsMerge) { PlotLane laneToUse = currCommit.lane; laneToUse = handleMerge(index, currCommit, childOnLane, child, laneToUse); child.addMergingLane(laneToUse); } else { currCommit.addForkingOffLane(laneToUse);
monitor.setTaskName(UIText.CommitMessageViewer_FormattingMessageTaskName); final StringBuilder d = new StringBuilder(); final PersonIdent author = commit.getAuthorIdent(); final PersonIdent committer = commit.getCommitterIdent(); d.append(UIText.CommitMessageViewer_commit); d.append(SPACE); d.append(commit.getId().name()); d.append(LF); for (int i = 0; i < commit.getParentCount(); i++) { final SWTCommit p = (SWTCommit)commit.getParent(i); p.parseBody(); d.append(UIText.CommitMessageViewer_parent); for (int i = 0; i < commit.getChildCount(); i++) { final SWTCommit p = (SWTCommit)commit.getChild(i); p.parseBody(); d.append(UIText.CommitMessageViewer_child); String msg = commit.getFullMessage(); Pattern p = Pattern.compile("\n([A-Z](?:[A-Za-z]+-)+by: [^\n]+)"); //$NON-NLS-1$ if (fill) {
protected void paintCommit(PlotCommit<TLane> commit, int h) { final int dotSize = computeDotSize(h); final TLane myLane = commit.getLane(); final int myLaneX = laneC(myLane); final TColor myColor = laneColor(myLane); final int dotY = (h - dotSize) / 2; final int nParent = commit.getParentCount(); if (nParent > 0) { drawLine(myColor, myLaneX, h, myLaneX, (h + dotSize) / 2, if (commit.getChildCount() > 0) { for (int i = 0; i < commit.forkingOffLanes.length; i++) { final TLane childLane = (TLane) commit.forkingOffLanes[i]; int nonForkingChildren = commit.getChildCount() - commit.forkingOffLanes.length; if (nonForkingChildren > 0) if (commit.has(RevFlag.UNINTERESTING)) drawBoundaryDot(dotX, dotY, dotSize, dotSize); else final String msg = commit.getShortMessage(); drawText(msg, textx + dotSize, h);
void addPassingLane(PlotLane c) { passingLanes = addLane(c, passingLanes); }
PersonIdent authorFor(PlotCommit<SwingLane> c) { if (c != lastCommit) { lastCommit = c; lastAuthor = c.getAuthorIdent(); } return lastAuthor; } }
GitTraceLocation.getTrace().traceEntry( GitTraceLocation.HISTORYVIEW.getLocation()); if (commit.getParentCount() > 1) { d.append(UIText.CommitMessageViewer_CanNotRenderDiffMessage); return;
currCommit.addForkingOffLane(laneToUse); closeLane(laneToUse); } else {
protected void paintCommit(PlotCommit<TLane> commit, int h) { final int dotSize = computeDotSize(h); final TLane myLane = commit.getLane(); final int myLaneX = laneC(myLane); final TColor myColor = laneColor(myLane); final int dotY = (h - dotSize) / 2; final int nParent = commit.getParentCount(); if (nParent > 0) { drawLine(myColor, myLaneX, h, myLaneX, (h + dotSize) / 2, if (commit.getChildCount() > 0) { for (int i = 0; i < commit.forkingOffLanes.length; i++) { final TLane childLane = (TLane) commit.forkingOffLanes[i]; int nonForkingChildren = commit.getChildCount() - commit.forkingOffLanes.length; if (nonForkingChildren > 0) if (commit.has(RevFlag.UNINTERESTING)) drawBoundaryDot(dotX, dotY, dotSize, dotSize); else final String msg = commit.getShortMessage(); drawText(msg, textx + dotSize, h);
private void setupChildren(PlotCommit<L> currCommit) { final int nParents = currCommit.getParentCount(); for (int i = 0; i < nParents; i++) ((PlotCommit) currCommit.getParent(i)).addChild(currCommit); }
boolean childIsMerge = child.getParent(0) != currCommit; if (childIsMerge) { PlotLane laneToUse = currCommit.lane; laneToUse = handleMerge(index, currCommit, childOnLane, child, laneToUse); child.addMergingLane(laneToUse); } else { currCommit.addForkingOffLane(laneToUse);
void addForkingOffLane(PlotLane f) { forkingOffLanes = addLane(f, forkingOffLanes); }
PersonIdent authorFor(final PlotCommit<SwingLane> c) { if (c != lastCommit) { lastCommit = c; lastAuthor = c.getAuthorIdent(); } return lastAuthor; } }
currCommit.addForkingOffLane(laneToUse); closeLane(laneToUse); } else {
protected void paintCommit(final PlotCommit<TLane> commit, final int h) { final int dotSize = computeDotSize(h); final TLane myLane = commit.getLane(); final int myLaneX = laneC(myLane); final TColor myColor = laneColor(myLane); final int dotY = (h - dotSize) / 2; final int nParent = commit.getParentCount(); if (nParent > 0) { drawLine(myColor, myLaneX, h, myLaneX, (h + dotSize) / 2, if (commit.getChildCount() > 0) { for (int i = 0; i < commit.forkingOffLanes.length; i++) { final TLane childLane = (TLane) commit.forkingOffLanes[i]; int nonForkingChildren = commit.getChildCount() - commit.forkingOffLanes.length; if (nonForkingChildren > 0) if (commit.has(RevFlag.UNINTERESTING)) drawBoundaryDot(dotX, dotY, dotSize, dotSize); else final String msg = commit.getShortMessage(); drawText(msg, textx + dotSize, h);
setupChildren(currCommit); final int nChildren = currCommit.getChildCount(); if (nChildren == 0) { currCommit.lane = nextFreeLane(); } else if (nChildren == 1 && currCommit.children[0].getParentCount() < 2) { @SuppressWarnings("unchecked") final PlotCommit<L> c = currCommit.children[i]; if (c.getParent(0) == currCommit) { Integer len = laneLength.get(c.lane); PlotCommit firstParent = (PlotCommit) c.getParent(0); if (firstParent.lane != null && firstParent.lane != c.lane) closeLane(c.lane); if (currCommit.getParentCount() == 0) closeLane(currCommit.lane);
private void setupChildren(final PlotCommit<L> currCommit) { final int nParents = currCommit.getParentCount(); for (int i = 0; i < nParents; i++) ((PlotCommit) currCommit.getParent(i)).addChild(currCommit); }