aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/revplot
Commit message (Collapse)AuthorAgeFilesLines
* Fix javadoc in org.eclipse.jgit patch and revplot packageMatthias Sohn2017-12-193-9/+23
| | | | Change-Id: I6f1aba98bf7034cb51494c546806cf1b72dd1473 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Enable and fix warnings about redundant specification of type argumentsDavid Pursehouse2017-02-202-4/+4
| | | | | | | | | | Since the introduction of generic type parameter inference in Java 7, it's not necessary to explicitly specify the type of generic parameters. Enable the warning in Eclipse, and fix all occurrences. Change-Id: I9158caf1beca5e4980b6240ac401f3868520aad0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable and fix 'Should be tagged with @Override' warningDavid Pursehouse2017-02-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Set missingOverrideAnnotation=warning in Eclipse compiler preferences which enables the warning: The method <method> of type <type> should be tagged with @Override since it actually overrides a superclass method Justification for this warning is described in: http://stackoverflow.com/a/94411/381622 Enabling this causes in excess of 1000 warnings across the entire code-base. They are very easy to fix automatically with Eclipse's "Quick Fix" tool. Fix all of them except 2 which cause compilation failure when the project is built with mvn; add TODO comments on those for further investigation. Change-Id: I5772061041fd361fe93137fd8b0ad356e748a29c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Organize importsDavid Pursehouse2016-11-141-1/+1
| | | | | Change-Id: I7c545d06b1bced678c020fab9af1382bc4416b6e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Use baseline instead of centerline in PlotRendererMichael Keppler2014-11-291-4/+4
| | | | | | | | | | | | | | | | | | If the text extent height of a to be rendered plot line is odd, then the SWTPlotRenderer cannot calculate the correct Y position for drawing the label and draws the label with a 1 pixel offset. SWT text drawing uses the baseline as Y coordinate. Due to the given centerline API in the AbstractPlotRenderer the overall calculation of the baseline for SWT is effectively (height / 2) * 2, thereby rounding all odd heights downward to the next even number. This change pushes the division by 2 from the caller into the implementations of drawText. A corresponding change will be pushed in the egit repository. Bug: 450813 Change-Id: I66f4e71873bb8e6f936fde573bbe4c35fe23a022 Signed-off-by: Michael Keppler <michael.keppler@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Drop warnings about unchecked casts in a few stable select placesRobin Rosenberg2014-09-043-2/+5
| | | | Change-Id: Ie163a4940f0d13bbdefd8c4643c0944c71800544
* PlotCommitList: Close plot lanes at root commitsKonrad Kügler2014-09-021-5/+5
| | | | | Bug: 443006 Change-Id: I40b1eb044fa2d9e6c5d4b956c17e32ca6c1bd39f Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* Improve layout of branches in the commit graphKonrad Kügler2014-05-223-95/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim of this change is to place all commits of a branch on the same lane and commits of other (side) branches on different lanes. The algorithm treats first parents of a commit specially by placing them on the same lane as the commit itself. When a commit is the first parent of multiple children it could be placed on any of these children's lanes. In this case it is placed on the longest child lane, as this is usually the lane of the branch the commit actually was made on. Other (non-first) parents are placed on new lanes. This creates a layout that should make it easier to see branches and merges and follow linear branch histories. This differs from the previous approach, which sometimes plotted the commits of a side branch on the same lane as the base branch commits and further commits on the base branch appeared on a different lane. This made the base branch appear as if it was the side branch and the side branch appears to be the base branch. In addition to lane assignment, also the plotting code changed to start drawing a branch lane from the commit where it forks out. Previously it started only when the first commit on the branch appeared. Active lanes are continued with every commit that is processed. Previously lanes were only continued when the next commit on the lane was encountered. This could produce (temporarily) dangling commits if the next commit on the lane was not processed yet. CQ: 8299 Bug: 419359 Bug: 434945 Change-Id: Ibe547aa24b5948ae264f7d0f56a492a4ef335608 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* PlotCommitList: Remove handling of children that have no lane yetKonrad Kügler2014-05-221-14/+1
| | | | | | | | | | | | | | | | | | Child commits always have a lane assigned when their parents are processed, so this code is no longer necessary. Children only assign themselves to parents in PlotCommitList.setupChildren(), which is called from enter(), when the child is processed. If the child leaves enter() it should always have a lane assigned. As a result of this, when processing a parent, all its known children already have lanes assigned. If the underlying RevWalk emits a parent before one of its children (which it should not do), the parent does not know of the child emitted later, because setupChildren() has not been called for the child yet. So even in this case, no child without a lane is encountered when processing a (parent) commit. Change-Id: I982adc5c114370ecfd699d96221a76463de900ca Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* PlotCommitList: Refactor lane creation and position allocationKonrad Kügler2014-05-221-20/+39
| | | | | | | | | This also properly removes the newly determinded lane position from the freePositions set in handleBlockedLanes(). closeLane() does only recycle active lanes, to avoid recycling lanes twice. Change-Id: Icd019fcf7974441ed05686bb61d6de4e8bf4ab7c Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* AbstractPlotRenderer: Make private methods static where applicableKonrad Kügler2014-05-031-3/+3
| | | | Change-Id: Iaf02502b02b2420c059f04bbe09254941301c727 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* PlotLane: Use identity hashCode and equalsKonrad Kügler2014-05-032-9/+0
| | | | | | | Using the lane position and other data for equals/hashCode is not useful. Change-Id: I7af151d8a84544a77a486474c8ac71dd80090c66 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* Fix text alignment in history plot rendererRüdiger Herrmann2014-03-131-2/+2
| | | | | | | | | | When more than one lane is drawn, some commits are vertically misaligned (off by two pixels). This change fixes the alignment. Bug: 426047 Change-Id: Icbe7ce9f5a6b281b2aaab66e4d76dfc1010b2fb5 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de> Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Attempt to fix graph layout when new heads are introducedRobin Rosenberg2013-09-261-1/+5
| | | | | | | | | | | Sometime the new commit is no allocated onto a new lane leading to the commit being drawn on the wrong branch and something that looks like a merge. The drawback is that this also changes existing valid graphs. Bug: 368927 Change-Id: Ic8a8247c8a53be802c1be83850ed766b902ca646
* Add Javadoc description for packagesRobin Stocker2012-10-311-0/+4
| | | | | | | | | These appear as descriptions in the index, see here (currently empty): http://download.eclipse.org/jgit/docs/latest/apidocs/ Change-Id: If7996deef30ae688bade8b3ad6b19547ca3d8b50 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Fix PlotCommit for commits with duplicate parentsRobin Rosenberg2012-08-051-3/+7
| | | | | | | | | | | | | | | | JGit allows to create commits which have duplicate parents: e.g. a commit X has first parent Y and second parent Y. Such commits are not handled correctly by PlotCommit leading to wrong display of the history in EGit. In such cases there is a never ending passing line drawn beside all commits younger than the commit with duplicate parents. This commit fixes this by explicitly checking for duplicate parents. In a different commit we should fix JGit not to create commits with duplicate parents. I think native git also doesn't allow such commits, although history display in native git (gitk, git log --graph) is not damaged by such commits. Change-Id: Ie3019ef613a507023958bea27b1badc3b8950279
* Add lazy loading of body for tags to PlotWalkStefan Lay2012-06-041-0/+5
| | | | | | | This change is required by egit's lazy loading of the body in the history view when the walk is started with setRetainBody(false). Change-Id: I9291ba8c34c8744bc009b1bd302ed28bfa4e9476 Signed-off-by: Stefan Lay <stefan.lay@sap.com>
* Remove 4 unboxed warningsKevin Sawicki2012-05-101-2/+2
| | | | | | | Use Integer.intValue to explicitly convert to an int Change-Id: I1135ed01af4e274b26d6b07d1a50f48ef0a30d91 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove 86 boxing warningsKevin Sawicki2012-05-081-1/+1
| | | | | | | | Use Integer, Character, and Long valueOf methods when passing parameters to MessageFormat and other places that expect objects instead of primitives Change-Id: I5942fbdbca6a378136c00d951ce61167f2366ca4
* Move JGitText to an internal packageRobin Rosenberg2012-03-122-2/+2
| | | | Change-Id: I763590a45d75f00a09097ab6f89581a3bbd3c797
* Merge branch 'stable-1.2'Matthias Sohn2011-12-101-0/+2
|\ | | | | | | | | | | | | | | | | | | | | * stable-1.2: Fix version.sh Throw API exception when MergeCommand hits checkout conflicts Add methods for configuring platform emulation Fix history rendering not to occupy too many lanes Fix History rendering Change-Id: If71cc760423ae2b76c7435ca4830edc1745556de Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Fix history rendering not to occupy too many lanesChristian Halstrick2011-12-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | There was a bug in history rendering which caused jgit to use too many lanes in case lanes get repositioned. Looking at commit 90c11cbaeb83ee9b02238cbd2c0e5bcf68068772 in JGit was one example. Vadim Dmitriev found the problem and the solution. Bug: 365460 Change-Id: I6024265b7a593dcfd4fc612d0baf6652a0092ff4 Also-by: Vadim Dmitriev <dmgloss@mail.ru> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
| * Fix History renderingChristian Halstrick2011-12-041-30/+42
| | | | | | | | | | | | | | | | | | There was the possibility that during history rendering we draw a lane "trough" a passed commit. Vadim Dmitriev found that out in bug 335818. I added the needed check to that block of code where it was missing. Bug: 335818 Change-Id: Ic944193b2aca55ff3eb0235d46afa60b7896aa0f Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* | [findBugs] Implement Serializable interface in PlotLaneKevin Sawicki2011-12-081-1/+5
| | | | | | | | | | | | This class is referenced by PlotCommit which is Serializable Change-Id: If79b6a593dc53fbb7c4f0a69a9d0dca02a8cb63c
* | Fix History renderingChristian Halstrick2011-12-021-30/+42
|/ | | | | | | | | There was the possibility that during history rendering we draw a lane "trough" a passed commit. Vadim Dmitriev found that out in bug 335818. I added the needed check to that block of code where it was missing. Bug: 335818 Change-Id: Ic944193b2aca55ff3eb0235d46afa60b7896aa0f Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* Enable PlotWalk to show additional refsStefan Lay2011-07-011-0/+23
| | | | Change-Id: Ic85f8859571dc2aef7f146ce56a6c9b8ec142e60 Signed-off-by: Stefan Lay <stefan.lay@sap.com>
* Avoid NullPointerException in PlotCommitMathias Kinzler2011-03-142-5/+4
| | | | | | Bug: 339289 Change-Id: Idf36f080ae6638c2bdbe11d69a4ad870851622b1 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
* Fix potential NullPointerException in PlotCommitMathias Kinzler2011-02-221-0/+3
| | | | | Change-Id: Ib7f661a259561251e74337fa233036e041c42423 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
* Rename PlotWalk.getTags() to getRefs()Roberto Tyley2011-01-261-2/+2
| | | | | Change-Id: I170685e70d9ac09a010df69d26ec1c38bde60174 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* Provide access to the Refs of a PlotCommitRoberto Tyley2011-01-261-0/+23
| | | | | | | | This information is generally useful - have followed the accessor pattern of 'children' and 'parents' Change-Id: I79b3ddd6f390152aa49e6b7a4c72a4aca0d6bc72 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* Ensure stable tag sort in PlotWalkShawn O. Pearce2010-12-031-2/+19
| | | | | | | | | | | Because tags are more interesting here than local or remote branch heads, tags get sorted earlier in the array than heads or remotes do. Bug: 324939 Change-Id: Ifc3863461654df7f34fdecbd2abe1f4b5d2ffb8e Signed-off-by: Shawn O. Pearce <spearce@spearce.org> CC: Mathias Kinzler <mathias.kinzler@sap.com> CC: Stefan Lay <stefan.lay@sap.com>
* Fix PlotCommitList to set lanes on child-less commitsChristian Halstrick2010-09-141-15/+79
| | | | | | | | | | | | | | | | | | | In PlotCommitList.enter() commits are positioned on lanes for visual presentation. This implementation was buggy: commits without children (often the starting points for the RevWalk) are not positioned on separate lanes. The problem was that when handling commits with multiple children (that's where branches fork out) it was not handled that some of the children may not have been positioned on a lane yet. I fixed that and added a number of tests which specifically test the layout of commits on lanes. Bug: 300282 Bug: 320263 Change-Id: I267b97ecccb5251cec54cec90207e075ab50503e Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix tag sorting in PlotWalkShawn O. Pearce2010-07-282-14/+17
| | | | | | | | | | | | | By deferring tag sorting until the commit is produced by the walker we can avoid an infinite loop that was triggered by trying to sort tags while allocating a commit. This also avoids needing to look at commits which aren't going to be produced in the result. Bug: 321103 Change-Id: I25acc739db2ec0221a50b72c2d2aa618a9a75f37 Reviewed-by: Mathias Kinzler <mathias.kinzler@sap.com> Reviewed-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Stack Overflow in EGit History View Mathias Kinzler2010-07-281-2/+3
| | | | | | | | | | | This is caused by a recursion in PlotWalk.getTags(). As a hotfix, the sort was simply removed. The sort must be re-implemented so that parseAny() is not called again (currently, this happens in the PlotRefComparator). Change-Id: I060d26fda8a75ac803acaf89cfb7d3b4317328f3 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* Use RevTag/RevCommit to sort in a PlotWalkShawn O. Pearce2010-06-231-9/+14
| | | | | | | | | | | | | | We already have these objects parsed and cached in our object pool. We shouldn't be looking them up via the legacy mapObject API, but instead can use the pool and the faster parsing routines available through the RevWalk that we extend. While we are here fixing the code, lets also correct the tag date sorting to accept tags that have no tagger identity, because they were created before Git knew how to store that field. Change-Id: Id49a11f6d9c050c82b876e5e11058840c894b2d7 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Remove unused parent field in PlotLaneRobin Rosenberg2010-06-132-4/+0
| | | Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* Externalize strings from JGitSasa Zivkov2010-05-192-2/+5
| | | | | | | | | | | | | | | The strings are externalized into the root resource bundles. The resource bundles are stored under the new "resources" source folder to get proper maven build. Strings from tests are, in general, not externalized. Only in cases where it was necessary to make the test pass the strings were externalized. This was typically necessary in cases where e.getMessage() was used in assert and the exception message was slightly changed due to reuse of the externalized strings. Change-Id: Ic0f29c80b9a54fcec8320d8539a3e112852a1f7b Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
* Remove trailing whitespace at end of lineAlex Blewitt2009-10-315-18/+18
| | | | | | | | | As discussed on the egit-dev mailing list, we prefer not to have trailing whitespace in our source code. Correct all currently offending lines by trimming them. Change-Id: I002b1d1980071084c0bc53242c8f5900970e6845 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Make it possible to clear a PlotCommitListJonas Fonseca2009-10-011-2/+10
| | | | | | | | | | | This allows SwingGraphPanes to be reused by simply clearing and re-filling. Requires RevObjectList initialization to not call clear() from its constructor, because this will lead PlotCommitList.clear() to be called before all variables have been initialized. Change-Id: I14a07124441b58cd88c67da088ba52ef9c30b043 Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Initial JGit contribution to eclipse.orgGit Development Community2009-09-295-0/+846
Per CQ 3448 this is the initial contribution of the JGit project to eclipse.org. It is derived from the historical JGit repository at commit 3a2dd9921c8a08740a9e02c421469e5b1a9e47cb. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>