From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg@dewire.com>
Cc: git@vger.kernel.org, Rob Clevenger <"r..."@google.com>,
"Shawn O. Pearce" <sop@google.com>
Subject: [JGIT PATCH] Make the Eclipse plugin resource locking more friendly
Date: Wed, 11 Feb 2009 15:35:07 -0800 [thread overview]
Message-ID: <1234395307-6754-1-git-send-email-spearce@spearce.org> (raw)
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
reply other threads:[~2009-02-11 23:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1234395307-6754-1-git-send-email-spearce@spearce.org \
--to=spearce@spearce.org \
--cc="r..."@google.com \
--cc=git@vger.kernel.org \
--cc=robin.rosenberg@dewire.com \
--cc=sop@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).