From 45ef701770f7dca6e9c0c43d77d5c265afe7eb6c Mon Sep 17 00:00:00 2001 From: lgoubet Date: Tue, 17 Sep 2019 15:07:00 +0200 Subject: [PATCH] The navigatable's cache needs to be cleared when we refresh the viewer Change-Id: I7e16183de757efce233ae000d7ac4c0f276ac218 --- .../structuremergeviewer/EMFCompareStructureMergeViewer.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java index 611bb84b2..843d54898 100644 --- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java +++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java @@ -1088,6 +1088,16 @@ public class EMFCompareStructureMergeViewer extends AbstractStructuredViewerWrap } } + @Override + public void refresh() { + super.refresh(); + // Make sure we clear the navigatable's caches + getNavigatable().refresh(); + if (getViewer().getSelection().isEmpty()) { + selectFirstDiffOrDisplayLabelViewer(getCompareConfiguration().getComparison()); + } + } + /** * Set the state of the cascading filter. * -- 2.11.4.GIT