DESCRIPTION

[sync] Simplify operations on change actions

Simplify operations when repository changed occurs. Also use
IndexDiffChangedListener for retrieving information about changed
resource (in this case break point add/remove events are not
propagated).

Bug: 358898
Change-Id: I6ae88da36dffaa913dc37525aec5ad8dca240fe0
Signed-off-by: Leslie Stephenson xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2011-10-30 21:33:25.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/1855/ 

-------------------------------------
author: Leslie Stephenson
date: 2011-10-30 21:35:39.000000000

Patch Set 1:

This is continuation of review I8ace9413981f38435ce34cf540933aaddc654d6b with was merged by mistake.

Comparing to latest patch from review I8ace941 I replaced IResourceChangeListener by IndexDiffChangeListener which don't propagate break point add/remove events. Only resource change events are propagated.

-------------------------------------
author: Brenden Conley
date: 2011-10-30 21:48:50.000000000

Patch Set 1: Build Successful

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1855/ : SUCCESS

-------------------------------------
author: Jaylon Avila
date: 2011-10-30 23:02:58.000000000

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

(2 inline comments)

Do you get an NPE when you shut down, Dariusz?

I am also seeing two entries in the view if I rename an untracked file. This behaviour doesn't seem to be exhibited in the current master.

Caused by: java.lang.NullPointerException
	at org.eclipse.egit.core.synchronize.GitSubscriberMergeContext.dispose(GitSubscriberMergeContext.java:104)
	at org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant.dispose(ModelSynchronizeParticipant.java:253)
	at org.eclipse.team.internal.ui.synchronize.SynchronizeManager.dispose(SynchronizeManager.java:574)
	at org.eclipse.team.internal.ui.TeamUIPlugin.stop(TeamUIPlugin.java:250)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:771)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:764)

Line:104, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSubscriberMergeContext.java -> This seems to be causing NPEs on shutdown for me.

Line:134, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSubscriberMergeContext.java -> Instead of using the array of ResourceTraversals, perhaps we could instead use the collection of changed file resources from the diff data if available (check for null return)? This would significantly reduce the number of resources that need to be iterated over.

Right now the refresh operation for me takes about 200ms when saving a file in the JGit repository. If the refresh is only on the one target file then the time is reduced to less than 10ms.

-------------------------------------
author: Leslie Stephenson
date: 2011-10-31 09:25:26.000000000

Patch Set 1: (2 inline comments)

No I didn't spot this NPE but I'll fix it in next patch set

Line:104, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSubscriberMergeContext.java -> Done

Line:134, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSubscriberMergeContext.java -> Done

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