diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java index c5ff66669f..2c72772f3f 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007-2016, 2018-2021 Eike Stepper (Loehne, Germany) and others. + * Copyright (c) 2007-2016, 2018-2022 Eike Stepper (Loehne, Germany) 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 @@ -164,6 +164,20 @@ public class CDOResourceImpl extends CDOResourceLeafImpl implements InternalCDOR private EList<Diagnostic> warnings; /** + * The storage for the default save options. + * + * @ADDED + */ + private Map<Object, Object> defaultSaveOptions; + + /** + * The storage for the default load options. + * + * @ADDED + */ + private Map<Object, Object> defaultLoadOptions; + + /** * @ADDED */ private transient CDOViewProvider viewProvider; @@ -1607,6 +1621,12 @@ public class CDOResourceImpl extends CDOResourceLeafImpl implements InternalCDOR EObject container = cdoObject.eContainer(); if (container != null) { + // Do not attach if container's notifications are muted. See bug 580354. + if (!container.eDeliver()) + { + return; + } + CDOObject cdoContainer = FSMUtil.adapt(container, transaction); if (FSMUtil.isTransient(cdoContainer)) { @@ -1836,7 +1856,7 @@ public class CDOResourceImpl extends CDOResourceLeafImpl implements InternalCDOR @Override public String getPublicId() { - throw new UnsupportedOperationException(); + return null; } /** @@ -1845,7 +1865,7 @@ public class CDOResourceImpl extends CDOResourceLeafImpl implements InternalCDOR @Override public String getSystemId() { - throw new UnsupportedOperationException(); + return null; } /** @@ -1861,18 +1881,28 @@ public class CDOResourceImpl extends CDOResourceLeafImpl implements InternalCDOR * @since 4.4 */ @Override - public Map<Object, Object> getDefaultLoadOptions() + public synchronized Map<Object, Object> getDefaultLoadOptions() { - throw new UnsupportedOperationException(); + if (defaultLoadOptions == null) + { + defaultLoadOptions = new HashMap<>(); + } + + return defaultLoadOptions; } /** * @since 4.4 */ @Override - public Map<Object, Object> getDefaultSaveOptions() + public synchronized Map<Object, Object> getDefaultSaveOptions() { - throw new UnsupportedOperationException(); + if (defaultSaveOptions == null) + { + defaultSaveOptions = new HashMap<>(); + } + + return defaultSaveOptions; } /** |