DORMANTno replies

[JGIT PATCH] Make the Eclipse plugin resource locking more friendly

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:46:09
Subsystem: the rest · Maintainer: Linus Torvalds

From: Rob Clevenger <redacted>

Using the default rule factory instead of the pessimistic one
makes it less likely that the UI will freeze in a modal dialog
while Eclipse goes off and does builds.

Signed-off-by: Rob Clevenger <redacted>
Signed-off-by: Shawn O. Pearce <redacted>
---
 .../src/org/spearce/egit/core/GitProvider.java     |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/org.spearce.egit.core/src/org/spearce/egit/core/GitProvider.java b/org.spearce.egit.core/src/org/spearce/egit/core/GitProvider.java
index a16aca9..c7baf65 100644
--- a/org.spearce.egit.core/src/org/spearce/egit/core/GitProvider.java
+++ b/org.spearce.egit.core/src/org/spearce/egit/core/GitProvider.java
@@ -8,7 +8,9 @@
  *******************************************************************************/
 package org.spearce.egit.core;
 
+import org.eclipse.core.resources.IResourceRuleFactory;
 import org.eclipse.core.resources.team.IMoveDeleteHook;
+import org.eclipse.core.resources.team.ResourceRuleFactory;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.team.core.RepositoryProvider;
 import org.eclipse.team.core.history.IFileHistoryProvider;
@@ -25,6 +27,8 @@
 
 	private GitFileHistoryProvider historyProvider;
 
+	private final IResourceRuleFactory resourceRuleFactory = new GitResourceRuleFactory();
+
 	public String getID() {
 		return getClass().getName();
 	}
@@ -70,4 +74,14 @@ public synchronized IFileHistoryProvider getFileHistoryProvider() {
 		}
 		return historyProvider;
 	}
+
+	@Override
+	public IResourceRuleFactory getRuleFactory() {
+		return resourceRuleFactory;
+	}
+
+	private static class GitResourceRuleFactory extends ResourceRuleFactory {
+		// Use the default rule factory instead of the
+		// pessimistic one by default.
+	}
 }
-- 
1.6.2.rc0.204.gf6b427
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help