Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-04-05 06:58:46 -0400
committerEike Stepper2012-04-05 06:58:46 -0400
commitde10035304bf740ab429b333252f0208a948a130 (patch)
tree25db9a4dfe2beed50b9ab50f47147f64a3f019fe
parentbdcd537febaf76681e369172cec3454b63432e11 (diff)
downloadcdo-de10035304bf740ab429b333252f0208a948a130.tar.gz
cdo-de10035304bf740ab429b333252f0208a948a130.tar.xz
cdo-de10035304bf740ab429b333252f0208a948a130.zip
[375387] CDOURIHandler doesn't supports connection aware URI
https://bugs.eclipse.org/bugs/show_bug.cgi?id=375387
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOURIHandler.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOURIHandler.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOURIHandler.java
index 8d032e9cdb..4de09eb79f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOURIHandler.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOURIHandler.java
@@ -16,6 +16,8 @@ import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
import org.eclipse.emf.cdo.eresource.CDOResourceNode;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.view.CDOViewProvider;
+import org.eclipse.emf.cdo.view.CDOViewProviderRegistry;
import org.eclipse.net4j.util.io.IOUtil;
@@ -54,8 +56,14 @@ public class CDOURIHandler implements URIHandler
public boolean canHandle(URI uri)
{
- return CDO_URI_SCHEME.equals(uri.scheme())
- && view.getSession().getRepositoryInfo().getUUID().equals(CDOURIUtil.extractRepositoryUUID(uri));
+ if (CDO_URI_SCHEME.equals(uri.scheme()))
+ {
+ String uuid = view.getSession().getRepositoryInfo().getUUID();
+ return uuid.equals(CDOURIUtil.extractRepositoryUUID(uri));
+ }
+
+ CDOViewProvider[] viewProviders = CDOViewProviderRegistry.INSTANCE.getViewProviders(uri);
+ return viewProviders.length != 0;
}
public boolean exists(URI uri, Map<?, ?> options)

Back to the top