summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2012-03-29 11:13:56 (EDT)
committer Dani Megert2012-03-29 11:13:56 (EDT)
commit17da73ea2b32b4aa573c39fa8a80c03f2ddfdefb (patch)
treef887ffd0ff3bb36f120371e866d08a3cc19d86e0
parent1607e13426ba2abc67ae4017efab88bcb93d9733 (diff)
downloadeclipse.platform.team-17da73ea2b32b4aa573c39fa8a80c03f2ddfdefb.zip
eclipse.platform.team-17da73ea2b32b4aa573c39fa8a80c03f2ddfdefb.tar.gz
eclipse.platform.team-17da73ea2b32b4aa573c39fa8a80c03f2ddfdefb.tar.bz2
inefficient for inaccessible projects
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java
index d7798cd..cb3ad2c 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -488,7 +488,7 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
*/
final public static RepositoryProvider getProvider(IProject project) {
try {
- if(project.isAccessible()) {
+ if (project.isAccessible()) {
//-----------------------------
//First, look for the session property
@@ -525,13 +525,14 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
}
}
}
+ markAsUnshared(project);
}
} catch(CoreException e) {
if (!isAcceptableException(e)) {
TeamPlugin.log(e);
}
+ markAsUnshared(project);
}
- markAsUnshared(project);
return null;
}
@@ -555,7 +556,7 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
*/
final public static RepositoryProvider getProvider(IProject project, String id) {
try {
- if(project.isAccessible()) {
+ if (project.isAccessible()) {
// Look for an existing provider first to avoid accessing persistent properties
RepositoryProvider provider = lookupProviderProp(project); //throws core, we will reuse the catching already here
if(provider != null) {
@@ -598,13 +599,14 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
return (RepositoryProvider)project.getNature(id);
}
}
+ markAsUnshared(project);
}
} catch(CoreException e) {
if (!isAcceptableException(e)) {
TeamPlugin.log(e);
}
+ markAsUnshared(project);
}
- markAsUnshared(project);
return null;
}