git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 11, 2009, 23:35 UTC
Message-ID
<1234395307-6754-1-git-send-email-spearce@spearce.org>
From: Rob Clevenger <r...@google.com>

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 <r...@google.com>
Signed-off-by: Shawn O. Pearce <sop@google.com>
---
 .../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
Message 1 of 1 in “Make the Eclipse plugin resource locking more friendly”
  1. Make the Eclipse plugin resource locking more friendlyShawn O. Pearce, Feb 11, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.