Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Fasani2018-08-30 14:41:09 +0000
committerMaxime Porhel2018-08-30 15:20:47 +0000
commitfca72ec510d6153e265823f65cb0e93ab11e8681 (patch)
treebde4b7d401b1985b682ed342f7dc9d25382fc739
parent4a7656f8cc74ccb8e8b561a8a7592aee6432a7aa (diff)
downloadorg.eclipse.sirius-fca72ec510d6153e265823f65cb0e93ab11e8681.tar.gz
org.eclipse.sirius-fca72ec510d6153e265823f65cb0e93ab11e8681.tar.xz
org.eclipse.sirius-fca72ec510d6153e265823f65cb0e93ab11e8681.zip
[525261] Make AirDResourceImpl::useIDAttributes return false
The cache used to get an element from its ID is idToEObjectMap. This map is updated in attachedHelper and detachedHelper and should be always up to date. If this.getEObject(String uriFragment) is called and uriFragment corresponds to an object that is not in the resource then, if useIDAttributes=true, the whole resource content is iterated. To avoid that, useIDAttributes return false. Bug:525261 Change-Id: I4910c5075066a1f8998e9be4722058bd877c967f Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/resource/AirDResourceImpl.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/resource/AirDResourceImpl.java b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/resource/AirDResourceImpl.java
index 4a069f242f..cd240cb126 100644
--- a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/resource/AirDResourceImpl.java
+++ b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/resource/AirDResourceImpl.java
@@ -78,7 +78,12 @@ public class AirDResourceImpl extends XMIResourceImpl implements DResource, Aird
@Override
protected boolean useIDAttributes() {
- return true;
+ // The cache used to get an element from its ID is idToEObjectMap.
+ // This map is updated in attachedHelper and detachedHelper and should be always up to date.
+ // If this.getEObject(String uriFragment) is called and uriFragment corresponds to an object that is not in the
+ // resource then, if useIDAttributes=true, the whole resource content is iterated.
+ // To avoid that, useIDAttributes return false.
+ return false;
}
/**

Back to the top