DESCRIPTION

[historyView] Use single resource manager

GitHistoryPage now manages a single ResourceManager
instance that is passed to all downstream objects to
be used for creating colors.

This removes the need for downstream objects to worry
about managing and disposing of colors and instead
ensures that all colors are properly disposed of only
when the history view itself is disposed.

Bug: 381338
Change-Id: Iee8a9011375c3c78c7a7f7264a1ea1284f51fae6

COMMENTS

author: Brenden Conley
date: 2012-06-06 15:13:40.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/egit-stable.gerrit/40/ 

-------------------------------------
author: Brenden Conley
date: 2012-06-06 15:26:27.000000000

Patch Set 1: Verified

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit-stable.gerrit/40/ : SUCCESS

-------------------------------------
author: Danika Greer
date: 2012-06-06 16:12:01.000000000

Patch Set 1: Verified; Looks good to me, but someone else must approve; IP review completed

Couldn't reproduce the bug with this and code looks good to me. Good work.

-------------------------------------
author: Sebastian Porter
date: 2012-06-08 08:54:13.000000000

Patch Set 1: I would prefer that you didn't submit this

The fix makes sure that no colors are disposed (which by itself is a good thing) but it does not fix the underlying problem that one job continues to draw even though it got cancelled. It will just continue to draw only to be replaced by the already scheduled new job.

Besides that, the changes are quite big for RC3/RC4. I would only submit them to 'master' together with improved job cancelling.

For 2.0 I would simply abort drawing when one of the colors is disposed. This also saves CPU cycles.

Possible fix/workaround) in CommitGraphTable.doPaint(Event):
if (c instanceof SWTCommit) {
  SWTLane lane = ((SWTCommit)c).getLane();
  if (lane !=null && lane.color != null
      && lane.color.isDisposed())
    return;
  }
}

I can provide the change, if others agree with this.

-------------------------------------
author: Carlie Harper
date: 2012-06-08 14:56:24.000000000

Patch Set 1: I would prefer that you didn't submit this

I think Dani's points are very valid.

I would favor to use Dani's workaround for 2.0.

-------------------------------------
