DESCRIPTION

[syncView] Simplify operations on change actions

Simplify operations when repository changed and resource changed events
occurs.

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


COMMENTS

author: Leslie Stephenson
date: 2011-10-25 14:29:36.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2011-10-25 14:29:45.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2011-10-25 14:40:56.000000000

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

Build Unstable 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1809/ : UNSTABLE

-------------------------------------
author: Jaylon Avila
date: 2011-10-25 15:15:25.000000000

Patch Set 2: (1 inline comment)

Breakpoint toggling is still being considered for me. I am not sure what you want to do here, Dariusz. This problem can be tackled here in this change or there can be a new change for addressing this problem. Right now the commit message indicates that this change is just for refactoring the code around, which you have done to my understanding.

GitResourceVariantTreeSubscriber(Subscriber).refresh(ResourceTraversal[], IProgressMonitor) line: 463	
	GitSubscriberMergeContext.handleResourceChange(GitResourceVariantTreeSubscriber, RepositoryMapping, IResource) line: 152	
	GitSubscriberMergeContext.access$1(GitSubscriberMergeContext, GitResourceVariantTreeSubscriber, RepositoryMapping, IResource) line: 140	
	GitSubscriberMergeContext$2.resourceChanged(IResourceChangeEvent) line: 76	
	NotificationManager$1.run() line: 291	
	SafeRunner.run(ISafeRunnable) line: 42	
	NotificationManager.notify(ResourceChangeListenerList$ListenerEntry[], IResourceChangeEvent, boolean) line: 285	
	NotificationManager.broadcastChanges(ElementTree, ResourceChangeEvent, boolean) line: 149	
	Workspace.broadcastPostChange() line: 395	
	Workspace.endOperation(ISchedulingRule, boolean, IProgressMonitor) line: 1530	
	Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 2353	
	JavaLineBreakpoint(Breakpoint).run(ISchedulingRule, IWorkspaceRunnable) line: 335	
	JavaLineBreakpoint.<init>(IResource, String, int, int, int, int, boolean, Map, String) line: 153	
	JavaLineBreakpoint.<init>(IResource, String, int, int, int, int, boolean, Map) line: 132	
	JDIDebugModel.createLineBreakpoint(IResource, String, int, int, int, int, boolean, Map) line: 274	
	ToggleBreakpointAdapter$2.run(IProgressMonitor) line: 267	
	Worker.run() line: 54

Line:71, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSubscriberMergeContext.java -> If you check the documentation of getAffectedChildren(), sending in a mask value of ADDED | CHANGED | REMOVED essentially makes a  call to getAffectedChildren() and getAffectedChildren(int) identical. Perhaps your intent was to make this more explicit to people reading the code?

-------------------------------------
author: Jaylon Avila
date: 2011-10-25 15:18:07.000000000

Patch Set 2:

I should also mention that the new NPE introduced by the first patch set can no longer be reproduced.

-------------------------------------
author: Leslie Stephenson
date: 2011-10-25 15:31:53.000000000

Patch Set 2:

OK, I can now reproduce this issue with brake points, but currently I can't see any way to ignore resource changed event caused by brake point add/removal. Remy, maybe you have some ideas ?

-------------------------------------
author: Jaylon Avila
date: 2011-10-25 17:15:54.000000000

Patch Set 2:

From a given resource's resource delta, you can invoke getFlags() to determine if the change is of the type IResourceDelta.MARKERS.

-------------------------------------
author: Leslie Stephenson
date: 2011-10-25 18:33:33.000000000

Patch Set 2: (1 inline comment)

Thank you Remy for this hint! Now it should ignore change events caused by break point's

Line:71, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSubscriberMergeContext.java -> No I don't intent to be more explicit here, just think that braeakpoint events will be filtered out by this mask.

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