Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2021-04-19 05:13:19 +0000
committerEike Stepper2021-04-19 05:13:19 +0000
commit49be6aed097552f54b7ce8df4a4837310d8c1757 (patch)
tree93b544c4eca8239ed33ae27acbb09572847dff5d
parenta22ad147b75234d606bcc9c81f279fb6bf50b1b5 (diff)
downloadcdo-49be6aed097552f54b7ce8df4a4837310d8c1757.tar.gz
cdo-49be6aed097552f54b7ce8df4a4837310d8c1757.tar.xz
cdo-49be6aed097552f54b7ce8df4a4837310d8c1757.zip
[572246] CDO interferes with Oomph setup
https://bugs.eclipse.org/bugs/show_bug.cgi?id=572246
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/bundle/OM.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/bundle/OM.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/bundle/OM.java
index 6330a7be33..10f2e3e745 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/bundle/OM.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/bundle/OM.java
@@ -60,6 +60,8 @@ public abstract class OM
*/
public static final class Activator extends OSGiActivator
{
+ private static final boolean disableURIHandlerRegistry = OMPlatform.INSTANCE.isProperty("org.eclipse.emf.cdo.common.disableURIHandlerRegistry");
+
public Activator()
{
super(BUNDLE);
@@ -70,18 +72,20 @@ public abstract class OM
{
super.doStart();
- try
- {
- List<URIHandler> defaultHandlers = new ArrayList<>();
- defaultHandlers.add(URIHandlerRegistryImpl.INSTANCE);
- defaultHandlers.addAll(URIHandler.DEFAULT_HANDLERS);
-
- Field field = ReflectUtil.getField(URIHandler.class, "DEFAULT_HANDLERS");
- ReflectUtil.setValue(field, null, Collections.unmodifiableList(defaultHandlers), true);
- }
- catch (Throwable t)
+ if (!disableURIHandlerRegistry)
{
- LOG.error(t);
+ try
+ {
+ List<URIHandler> defaultHandlers = new ArrayList<>(URIHandler.DEFAULT_HANDLERS);
+ defaultHandlers.add(4, URIHandlerRegistryImpl.INSTANCE); // Add our registry before EMF's catch-all handler.
+
+ Field field = ReflectUtil.getField(URIHandler.class, "DEFAULT_HANDLERS");
+ ReflectUtil.setValue(field, null, Collections.unmodifiableList(defaultHandlers), true);
+ }
+ catch (Throwable t)
+ {
+ LOG.error(t);
+ }
}
}
}

Back to the top