From fedc121713e53d2922de018e9ac469b39f633fc4 Mon Sep 17 00:00:00 2001 From: Zoltan Ujhelyi Date: Wed, 6 Mar 2019 14:40:40 +0100 Subject: [PATCH] Partially reverts 9a82bf569d4173d25bb958023b3c1cdb2347dea9 #25 Ignoring events while MagicDraw says we should not listen to them makes us not index newly added project usages in local projects until restartig MagicDraw. --- .../MagicDrawProjectNavigationHelper.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/com.incquerylabs.v4md/src/main/com/incquerylabs/v4md/internal/MagicDrawProjectNavigationHelper.java b/com.incquerylabs.v4md/src/main/com/incquerylabs/v4md/internal/MagicDrawProjectNavigationHelper.java index 9bee28d..4ded690 100644 --- a/com.incquerylabs.v4md/src/main/com/incquerylabs/v4md/internal/MagicDrawProjectNavigationHelper.java +++ b/com.incquerylabs.v4md/src/main/com/incquerylabs/v4md/internal/MagicDrawProjectNavigationHelper.java @@ -31,16 +31,20 @@ public class MagicDrawProjectNavigationHelper extends NavigationHelperImpl { public MagicDrawProjectNavigationHelper(Notifier emfRoot, BaseIndexOptions options, EventSupport eventSupport, Logger logger) { super(emfRoot, options, logger); this.logger = logger; - this.contentAdapter = new NavigationHelperContentAdapter(this) { - - @Override - public void notifyChanged(Notification notification) { - if (eventSupport.isEnableEventFiring()) { - super.notifyChanged(notification); - } - } - - }; + // TODO While this change helps avoiding some duplicate notifications, it causes + // a regression when adding a new project usage to a local project: when the + // usage is added, event firing is turned off, resulting in the added profile + // not available in the index of the project +// this.contentAdapter = new NavigationHelperContentAdapter(this) { +// +// @Override +// public void notifyChanged(Notification notification) { +// if (eventSupport.isEnableEventFiring()) { +// super.notifyChanged(notification); +// } +// } +// +// }; } Set getModelRoots() {