Skip to content

Commit

Permalink
Revert "Experiments with ignoring duplicate removeAdapter events #26"
Browse files Browse the repository at this point in the history
This reverts commit 1d9b398 because the
Base index internals cannot be overridden appropriately.
  • Loading branch information
ujhelyiz committed Aug 16, 2019
1 parent 1d9b398 commit 514176a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import org.eclipse.viatra.query.runtime.base.api.BaseIndexOptions;
import org.eclipse.viatra.query.runtime.base.api.filters.IBaseIndexObjectFilter;
import org.eclipse.viatra.query.runtime.base.api.filters.IBaseIndexResourceFilter;
import org.eclipse.viatra.query.runtime.base.core.NavigationHelperContentAdapter;
import org.eclipse.viatra.query.runtime.base.core.NavigationHelperImpl;
import org.eclipse.viatra.query.runtime.base.core.V4MDNavigationHelperContentAdapter;
import org.eclipse.viatra.query.runtime.base.exception.ViatraBaseException;

import com.nomagic.uml2.ext.jmi.EventSupport;
Expand Down Expand Up @@ -53,7 +53,20 @@ public void error(Object message) {
public MagicDrawProjectNavigationHelper(Notifier emfRoot, BaseIndexOptions options, EventSupport eventSupport, Logger logger) {
super(emfRoot, options, new WrappedLogger(logger));
this.logger = logger;
this.contentAdapter = new V4MDNavigationHelperContentAdapter(this);
// 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<Notifier> getModelRoots() {
Expand Down

This file was deleted.

0 comments on commit 514176a

Please sign in to comment.