Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-03-18 15:37:43 +0000
committerJean Michel-Lemieux2002-03-18 15:37:43 +0000
commitccab7db537c35e90edefb7561025b6044ee6116a (patch)
tree38fc75c4bc124bc8d51791744879fd43934bf634
parentd4590510ac21f724f1b2d982b60ba74ec3644f58 (diff)
downloadeclipse.platform.team-ccab7db537c35e90edefb7561025b6044ee6116a.tar.gz
eclipse.platform.team-ccab7db537c35e90edefb7561025b6044ee6116a.tar.xz
eclipse.platform.team-ccab7db537c35e90edefb7561025b6044ee6116a.zip
Fixed but in getProvider(). It wasn't returning the right provider instance.
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProviderType.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProviderType.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProviderType.java
index c9160441c..864cc7fa0 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProviderType.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProviderType.java
@@ -69,7 +69,10 @@ abstract public class RepositoryProviderType {
final public static RepositoryProvider getProvider(IProject project) {
RepositoryProviderType[] allTypes = getAllProviderTypes();
for (int i = 0; i < allTypes.length; i++) {
- return allTypes[i].getInstance(project);
+ RepositoryProvider provider = allTypes[i].getInstance(project);
+ if(provider!=null) {
+ return provider;
+ }
}
return null;
}
@@ -94,7 +97,7 @@ abstract public class RepositoryProviderType {
final public RepositoryProvider getInstance(IProject project) {
String id = getID();
try {
- if(project.isOpen()) {
+ if(project.exists() && project.isOpen()) {
return (RepositoryProvider)project.getNature(id);
}
} catch(ClassCastException e) {

Back to the top