diff options
author | Eike Stepper | 2021-11-22 12:06:53 +0000 |
---|---|---|
committer | Eike Stepper | 2021-11-22 12:25:12 +0000 |
commit | 26e66189ae8cd796bb519a3c3da156d5f8e0f19c (patch) | |
tree | 4175c420fb940c52263df91655a071a2a0a9a27a /plugins | |
parent | 8b42bdc9c6ccb4bd65c67ec30084c8b805fe477f (diff) | |
download | org.eclipse.papyrus-26e66189ae8cd796bb519a3c3da156d5f8e0f19c.tar.gz org.eclipse.papyrus-26e66189ae8cd796bb519a3c3da156d5f8e0f19c.tar.xz org.eclipse.papyrus-26e66189ae8cd796bb519a3c3da156d5f8e0f19c.zip |
Bug 577392: Add ModelSet.isShardingSupported() so that CDOAwareModelSet can disable it
Change-Id: I5df453171494c19cf9c2bd63dc5ea060e59c1f66
Signed-off-by: Eike Stepper <stepper@esc-net.de>
Diffstat (limited to 'plugins')
4 files changed, 16 insertions, 10 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF index da8f35a1809..3b762ceda49 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF @@ -31,7 +31,7 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.6.0,4.0.0)", org.eclipse.uml2.types;bundle-version="[2.5.0,3.0.0)" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.3.0.qualifier Bundle-Name: %pluginName Bundle-Localization: plugin Bundle-Activator: org.eclipse.papyrus.infra.core.Activator diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/pom.xml b/plugins/infra/core/org.eclipse.papyrus.infra.core/pom.xml index 2f6fa33960c..905303f7a81 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core/pom.xml +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/pom.xml @@ -9,6 +9,6 @@ <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.papyrus.infra.core</artifactId> - <version>4.2.0-SNAPSHOT</version> + <version>4.3.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
\ No newline at end of file diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java index e8ae69d5bea..6b43b97a8b2 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java @@ -153,6 +153,10 @@ public class ModelSet extends ResourceSetImpl { this.eAdapters.add(new ResourceAddRemoveTracker()); } + public boolean isShardingSupported() { + return true; + } + /** * Register the specified model under its associated key. The key is defined * in the model itself. It is usually the model type from @@ -858,7 +862,7 @@ public class ModelSet extends ResourceSetImpl { /** * This allows to delete a resource from the uri. - * + * * @param uri * The uri of the resource to delete. * @return <code>true</code> if the resource is deleted, <code>false</code> otherwise. @@ -1310,10 +1314,10 @@ public class ModelSet extends ResourceSetImpl { /** * Obtains the model that should persist an {@code object}. - * + * * @param object * an object to be persisted as a new root of a managed EMF {@code Resource} - * + * * @return the model that is best suited to persist the {@code object}, or {@code null} if none * @since 2.0 */ diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/CoreMultiDiagramEditor.java b/plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/CoreMultiDiagramEditor.java index 935794df58d..036ddaa5522 100644 --- a/plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/CoreMultiDiagramEditor.java +++ b/plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/CoreMultiDiagramEditor.java @@ -639,12 +639,14 @@ public class CoreMultiDiagramEditor extends AbstractMultiPageSashEditor implemen resourceSet = servicesRegistry.getService(ModelSet.class); - // Install shard resource handling - new ShardResourceLocator(resourceSet); + if (resourceSet.isShardingSupported()) { + // Install shard resource handling + new ShardResourceLocator(resourceSet); - // Resolve a possible shard URI - uri = EditorUtils.resolveShardRoot( - ICrossReferenceIndex.getInstance(resourceSet), uri); + // Resolve a possible shard URI + uri = EditorUtils.resolveShardRoot( + ICrossReferenceIndex.getInstance(resourceSet), uri); + } // Load it up resourceSet.loadModels(uri); |