Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 256624

Summary: [UI] Create a Commit History ViewPart
Product: [Modeling] EMF Reporter: Victor Roldan Betancort <vroldanbet>
Component: cdo.uiAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 CC: adietish, ibrahim.sallam, lothar, lu.xingxiao, stepper, vroldanbet
Version: 4.2Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: Power to the People
Bug Depends on: 256649, 391312    
Bug Blocks:    
Attachments:
Description Flags
screenshot of the prototype view
none
prototype code (view part and zest dependencies)
none
latest version (plugin + zest dependencies)
none
latest screenshot
none
latest version (plugin + zest dependencies)
none
latest screenshot
none
Releng patch to add Zest+Sources to the target platform none

Description Victor Roldan Betancort CLA 2008-11-26 08:21:44 EST
Create a history of successful commits to the repository. Ideally, this would show user that performed the commit, timestamp, and commit comments.
Comment 1 Eike Stepper CLA 2008-12-01 08:36:06 EST
Re-assigning to Vik in preparation of his new committer state...
Comment 2 Eike Stepper CLA 2009-11-01 06:00:17 EST
Rebasing all unresolved enhancement requests to 3.0
Comment 3 Lothar Werzinger CLA 2010-01-19 22:58:20 EST
Any progress on this bug?
Comment 4 Eike Stepper CLA 2010-01-20 02:00:15 EST
Andre is starting on the dependency bug 256649 today ;-)
Comment 5 Andre Dietisheim CLA 2010-02-26 14:31:53 EST
I started to implement this view using the zest framework. Very happy with it so far, (GraphNode and Graph) extensibility could be slightly better though. The most labor expensive part is the layout that shall be implemented in its own strategy. I did not find any layout manager yet, that was close enough that I could derive from it.
I expect a first prototype very soon.
Comment 6 Andre Dietisheim CLA 2010-03-05 07:17:37 EST
Created attachment 161114 [details]
screenshot of the prototype view

I'm pretty there with the algorythm. 
The screenshot shows a branch tree with branch points (red figures).
I did not spend a lot of time on the visuals and the bendpoints are not yet there. I guess the arrows will be dropped, too etc.
Comment 7 Victor Roldan Betancort CLA 2010-03-05 12:35:59 EST
very nice, André!
Comment 8 Eike Stepper CLA 2010-03-05 12:42:45 EST
Indeed André, go on like that! ;-)
Comment 9 Andre Dietisheim CLA 2010-03-07 18:52:50 EST
Created attachment 161247 [details]
prototype code (view part and zest dependencies)

thanks for the very encouraging words! :-)

I cleaned the code and compressed what's needed. 
The view part does not query CDO for the appropriate infos yet (branch points, commit infos). It creates the zest nodes and connections manually. I concentrated on the layout algorythm so far and I did not invest a lot into the visuals.
The layout algorythm's implemented in the BranchTreeLayoutAlgorythm class. The logic that climbs recursively through the nodes and sub-branches is in the class Branch. It's layout code is delegated to the BranchLayoutStrategy. The current implementation provides a vertical layout, a further (layout strategy-) sub class could implement a horizontal layout. 
There are still some bugs left, but it looks like the core works :-)
Of course there's a lot of room for enhancements.
Comment 10 Andre Dietisheim CLA 2010-03-08 20:45:56 EST
Created attachment 161389 [details]
latest version (plugin + zest dependencies)

I fixed some layout bugs, commented, refactored etc. I still expect minor bugs in the horizontal padding between branches. I guess the main algorythm's ready now and I'll most probably start with real data very soon.
Comment 11 Andre Dietisheim CLA 2010-03-08 20:49:26 EST
Created attachment 161390 [details]
latest screenshot
Comment 12 Eike Stepper CLA 2010-03-09 00:33:12 EST
Looks awesome! I'm really hoping that I'll find time todfay to look at the code.
Comment 13 Andre Dietisheim CLA 2010-03-09 18:58:59 EST
Created attachment 161552 [details]
latest version (plugin + zest dependencies)

found and fixed another bug (when unifying branch-bounds). Screenshot does not show any anomalies now - but I guess there still are ;-)
Comment 14 Andre Dietisheim CLA 2010-03-09 18:59:39 EST
Created attachment 161553 [details]
latest screenshot
Comment 15 Eike Stepper CLA 2010-03-10 02:09:20 EST
Created attachment 161569 [details]
Releng patch to add Zest+Sources to the target platform

After applying the patch right-click local.mspec and click "Import...". Then rebuild the project. Please do not include the dependencies in the zip anymore ;-)
Comment 16 Eike Stepper CLA 2010-03-10 02:29:20 EST
Hi Andre, Please contact me via Skype so that we can review the code together and put it into CVS.
Comment 17 Andre Dietisheim CLA 2010-03-19 21:08:46 EDT
committed to HEAD (some days ago)
Comment 18 Andre Dietisheim CLA 2010-03-19 21:36:41 EDT
I'm currently moving apartement so I do not find as much time as I'd like to. Eike's not very fund of using zest, but I still believe that using it gives us  advantages. Ian and Eike are going to chat about that at EclipseCon.

After implementing the algorithm in a first step, I switched to real data (CDOBranch etc.) afterwards. I had to implement my own methods to fit the graph into the available view bounds and it pretty much works now. 
What I further discovered using real data is that the differences in timestamps are not homogeneous enough. If I'd use the original timestamp to position the nodes on the y-axis I'd have a almost 'unreadable' graph. Certain areas would be very compressed whereas other parts would be terribly stretched. I'll have to find a way to 'exagerate' short connections (short timestamp deltas) and underemphasize long connections.
Comment 19 Andre Dietisheim CLA 2010-03-19 21:39:39 EDT
What's still not started are bendpoints on the connection that links the branch basepoint to its branch point. 
Furthermore commit infos are not displayed either.
I postponed both tasks as I thought that the basic layout capabilites are more critical.
Comment 20 Eike Stepper CLA 2010-06-29 04:51:15 EDT
Rebasing all outstanding enhancements requests to version 4.0
Comment 21 Eike Stepper CLA 2011-06-23 03:59:03 EDT
Moving all open enhancement requests to 4.1
Comment 22 Eike Stepper CLA 2012-08-14 22:57:50 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 23 Eike Stepper CLA 2012-10-05 07:25:50 EDT
Taking over...
Comment 24 Eike Stepper CLA 2012-10-05 07:44:50 EDT
I added the class CDOCommitHistory which is mostly an IContainer of CDOCommitInfos. This container populates itself asynchronously if loadCommitInfos(count) is called. The history is used in the new CDOHistoryPage which displays in the GenericHistoryView for CDOSessions, CDOViews and CDOObjects. It's also used in the SelectBranchPointDialog/CreateBranchDialog. A history can be obtained from the CDOCommitInfoManager. In a separate bugzilla I'll provide special per-Object histories...

commit bd3e3935ef223f341b10072f13427d5e124ff760
Comment 25 Eike Stepper CLA 2013-06-27 03:33:06 EDT
Available in R20130613-1157 (4.2)