diff options
| author | Pierre-Charles David | 2014-08-29 09:19:08 +0000 |
|---|---|---|
| committer | Maxime PORHEL | 2014-09-03 08:11:53 +0000 |
| commit | b0db82260a3846ca89eb22f60ed46c8393510e50 (patch) | |
| tree | 8b90d5098b65489d7d2cfb9ef4a594fce11177aa | |
| parent | a4ba105590228efbe30bfa9bde4509a23b061865 (diff) | |
| download | org.eclipse.sirius-b0db82260a3846ca89eb22f60ed46c8393510e50.tar.gz org.eclipse.sirius-b0db82260a3846ca89eb22f60ed46c8393510e50.tar.xz org.eclipse.sirius-b0db82260a3846ca89eb22f60ed46c8393510e50.zip | |
[442337] Make sure the RepresentationChangeAdapter is installed after the cross-referencer
The RepresentationChangeAdapter triggers a refresh of the UI when
representations are added or removed, but the UI uses
DialectManager.getRepresentations() to find the representations to show.
The new (faster) implementation of that method relies on the
cross-referencer being up-to-date, so we must make sure the
RepresentationChangeAdapter is installed after it for the UI to
correctly reflect the changes.
Bug: 442337
Change-Id: Id2c38330853b52967c0fdf9f4ddb8afb5462ff67
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
| -rw-r--r-- | plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/session/danalysis/DAnalysisSessionImpl.java | 11 |
1 files changed, 8 insertions, 3 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 ff32599393..2e7eebf642 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 @@ -229,9 +229,6 @@ public class DAnalysisSessionImpl extends DAnalysisSessionEObjectImpl implements this.controlledResourcesDetector = new ControlledResourcesDetector(this); super.getAnalyses().add(mainDAnalysis); super.getResources().add(sessionResource); - for (DAnalysis analysis : allAnalyses()) { - addAdaptersOnAnalysis(analysis); - } setAnalysisSelector(DAnalysisSelectorService.getSelector(this)); setResourceCollector(new LocalResourceCollector(getTransactionalEditingDomain().getResourceSet())); } @@ -460,6 +457,14 @@ public class DAnalysisSessionImpl extends DAnalysisSessionEObjectImpl implements getEventBroker().addLocalTrigger(SessionEventBrokerImpl.asFilter(danglingRemovalPredicate), danglingRemovalTrigger); addRefreshEditorsListener(); + /* + * Make sure these adapters are added after the rest, and in particular + * after the semantic cross-referencer, so that they can rely on an + * up-to-date cross-referencer when invoked. + */ + for (DAnalysis analysis : allAnalyses()) { + addAdaptersOnAnalysis(analysis); + } } /** |
