Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael LANOE2015-03-19 08:14:36 +0000
committerLaurent Redor2015-03-19 08:44:09 +0000
commit8e8e1ac2397afaa634773377db8fdabbb4aed681 (patch)
tree1fea77602890a263a210c93576347805c5a65c9d
parentb9cd47cc3afa75deb0ee4bb2c63446126d688666 (diff)
downloadorg.eclipse.sirius-8e8e1ac2397afaa634773377db8fdabbb4aed681.tar.gz
org.eclipse.sirius-8e8e1ac2397afaa634773377db8fdabbb4aed681.tar.xz
org.eclipse.sirius-8e8e1ac2397afaa634773377db8fdabbb4aed681.zip
[452962] Fix regression due to commit 81a8b1f
Fix regression due to commit 81a8b1f44c065dd8dfd198e33d66e4eca395c04d. The representation list under semantic element of the "Model Explorer" was not updated after copying a new representation. In this case, the semantic cross referencer was added after the RepresentationsChangeAdapter on referenced DAnalysis. Bug: 452962 Change-Id: I8ecc9d68d0469e02d18338b6901543d75616b140 Signed-off-by: Mickael LANOE <mickael.lanoe@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/session/danalysis/DAnalysisSessionImpl.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/session/danalysis/DAnalysisSessionImpl.java b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/session/danalysis/DAnalysisSessionImpl.java
index 834123c64b..e1c9e5de7b 100644
--- a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/session/danalysis/DAnalysisSessionImpl.java
+++ b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/session/danalysis/DAnalysisSessionImpl.java
@@ -362,15 +362,19 @@ public class DAnalysisSessionImpl extends DAnalysisSessionEObjectImpl implements
@Override
public void addReferencedAnalysis(final DAnalysis newAnalysis, final Collection<DAnalysis> referencers) {
if (referencers != null && !referencers.isEmpty()) {
+ // Install the cross referencer as soon as possible
+ registerResourceInCrossReferencer(newAnalysis.eResource());
+
for (DAnalysis referencer : referencers) {
referencer.getReferencedAnalysis().add(newAnalysis);
}
+
addAdaptersOnAnalysis(newAnalysis);
- registerResourceInCrossReferencer(newAnalysis.eResource());
for (DAnalysis dAnalysis : new DAnalysisQuery(newAnalysis).getAllReferencedAnalyses()) {
- addAdaptersOnAnalysis(dAnalysis);
registerResourceInCrossReferencer(dAnalysis.eResource());
+ addAdaptersOnAnalysis(dAnalysis);
}
+
notifyListeners(SessionListener.REPRESENTATION_CHANGE);
} else {
throw new IllegalStateException("Cant add a referenced analysis if no parent analysis exists");

Back to the top