diff options
author | Eike Stepper | 2012-10-13 10:21:32 +0000 |
---|---|---|
committer | Eike Stepper | 2012-10-13 10:21:32 +0000 |
commit | 3085422f491b7cd52653fb1ab8f2b202a7bd5bbf (patch) | |
tree | 736a0954bcbc4135380fb9452d3409d1a75d8e8f /plugins/org.eclipse.emf.cdo.ui | |
parent | fd2e0b58ed8c9b644104bbb79e9354018376ed10 (diff) | |
download | cdo-3085422f491b7cd52653fb1ab8f2b202a7bd5bbf.tar.gz cdo-3085422f491b7cd52653fb1ab8f2b202a7bd5bbf.tar.xz cdo-3085422f491b7cd52653fb1ab8f2b202a7bd5bbf.zip |
[391503] [UI] Render a CDOCommitInfo graph into the history page
https://bugs.eclipse.org/bugs/show_bug.cgi?id=391503
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java | 28 | ||||
-rw-r--r-- | plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/NetRenderer.java | 7 |
2 files changed, 9 insertions, 26 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java index 4274bbde65..703af68712 100644 --- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java +++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java @@ -245,19 +245,9 @@ public class Net } } - if (lastSegment.getLastCommitTime() < visualTime) + if (bestSegment == null && lastSegment.getLastCommitTime() < visualTime) { - if (bestSegment == null) - { - bestSegment = lastSegment; - } - - // // If the last segment of this track ends before the branch's last commit there's enough room for a new - // // segment in this track - // if (bestSegment == null || lastSegment.getLastCommitTime() < bestSegment.getLastCommitTime()) - // { - // bestSegment = lastSegment; - // } + bestSegment = lastSegment; } } } @@ -290,14 +280,6 @@ public class Net if (firstSegment.getFirstVisualTime() > branch.getFirstCommitTime()) { bestSegment = firstSegment; - - // // If the first segment of this track starts after the branch's first commit there's enough room for a - // new - // // segment in this track - // if (bestSegment == null || firstSegment.getFirstVisualTime() > bestSegment.getFirstVisualTime()) - // { - // bestSegment = firstSegment; - // } } } } @@ -368,9 +350,9 @@ public class Net { throw new IllegalStateException("No segment"); } - + Commit commit = new Commit(commitInfo, segment); - + if (firstCommit == null) { firstCommit = commit; @@ -388,7 +370,7 @@ public class Net lastCommit = commit; } } - + commits.put(commitInfo, commit); ++commitCounter; return commit; diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/NetRenderer.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/NetRenderer.java index e6454c1e5e..344d4797ad 100644 --- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/NetRenderer.java +++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/NetRenderer.java @@ -126,7 +126,7 @@ public class NetRenderer implements Listener switch (event.type) { case SWT.MeasureItem: - event.width = handlePaintEvent(event, true); + event.width = handlePaintEvent(event, true) + TRACK_OFFSET; break; case SWT.PaintItem: @@ -199,13 +199,14 @@ public class NetRenderer implements Listener if (image != null) { Rectangle bounds = image.getBounds(); + x += 2; if (!justMeasureWidth) { gc.drawImage(image, bounds.x, bounds.y, bounds.width, bounds.height, // - cellX + x, cellY + 1, bounds.width, bounds.height); + cellX + x - TRACK_OFFSET, cellY + 1, bounds.width, bounds.height); } - x += bounds.width + TRACK_OFFSET; + x += bounds.width; } } |