Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon McDuff2008-10-17 08:40:45 -0400
committerSimon McDuff2008-10-17 08:40:45 -0400
commit45b973468ba4acab26aa5c280d8f34808fc54e77 (patch)
treeea4ac3e23fc271c70ed6c840b982493cf0f7e3fd /plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util
parentaadfca0299b6ee19f98c4f50694c4d4ada5ef452 (diff)
downloadcdo-45b973468ba4acab26aa5c280d8f34808fc54e77.tar.gz
cdo-45b973468ba4acab26aa5c280d8f34808fc54e77.tar.xz
cdo-45b973468ba4acab26aa5c280d8f34808fc54e77.zip
[250064] CDOPackageRegistryImpl should offer delegation
https://bugs.eclipse.org/bugs/show_bug.cgi?id=250064
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util')
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CDOViewSetPackageRegistryImpl.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CDOViewSetPackageRegistryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CDOViewSetPackageRegistryImpl.java
index cc9042384a..c3a1c904d6 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CDOViewSetPackageRegistryImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CDOViewSetPackageRegistryImpl.java
@@ -25,35 +25,31 @@ public class CDOViewSetPackageRegistryImpl extends EPackageRegistryImpl
private CDOViewSet viewSet;
- public CDOViewSetPackageRegistryImpl(CDOViewSet viewSet)
+ public CDOViewSetPackageRegistryImpl(CDOViewSet viewSet, EPackage.Registry delegateRegistry)
{
+ super(delegateRegistry);
this.viewSet = viewSet;
}
@Override
- public synchronized EPackage getEPackage(String nsURI)
+ protected EPackage delegatedGetEPackage(String nsURI)
{
- EPackage ePackage = super.getEPackage(nsURI);
- if (ePackage == null)
+ for (CDOView view : viewSet.getViews())
{
- for (CDOView view : viewSet.getViews())
+ EPackage ePackage = view.getSession().getPackageRegistry().getEPackage(nsURI);
+ if (ePackage != null)
{
- ePackage = view.getSession().getPackageRegistry().getEPackage(nsURI);
- if (ePackage != null)
- {
- break;
- }
+ return ePackage;
}
}
- return ePackage;
+ return super.delegatedGetEPackage(nsURI);
}
@Override
public Object put(String key, Object value)
{
super.put(key, value);
-
for (CDOView view : viewSet.getViews())
{
view.getSession().getPackageRegistry().put(key, value);

Back to the top