X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui.swt%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fswt%2FGraphExplorerImpl.java;fp=bundles%2Forg.simantics.browsing.ui.swt%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fswt%2FGraphExplorerImpl.java;h=e90ae5eeecf78dee9d9bd0f6a74084e116d83af9;hb=68f350c72673e7052ccadf3b352bc01d232a5f85;hp=df4860d42145551c2fd59c428ae7c749763a5a3d;hpb=6315b7acae51d83b0ffc3052b69c945a8d2ef916;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl.java b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl.java index df4860d42..e90ae5eee 100644 --- a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl.java +++ b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl.java @@ -173,6 +173,8 @@ import org.simantics.utils.ui.SWTUtils; import org.simantics.utils.ui.jface.BasePostSelectionProvider; import org.simantics.utils.ui.widgets.VetoingEventHandler; import org.simantics.utils.ui.workbench.WorkbenchUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import gnu.trove.map.hash.THashMap; import gnu.trove.procedure.TObjectProcedure; @@ -185,6 +187,8 @@ import gnu.trove.set.hash.THashSet; */ class GraphExplorerImpl extends GraphExplorerImplBase implements Listener, GraphExplorer /*, IPostSelectionProvider*/ { + private static final Logger LOGGER = LoggerFactory.getLogger(GraphExplorerImpl.class); + private static class GraphExplorerPostSelectionProvider implements IPostSelectionProvider { private GraphExplorerImpl ge; @@ -1553,10 +1557,14 @@ class GraphExplorerImpl extends GraphExplorerImplBase implements Listener, Graph OpenStrategy os = new OpenStrategy(tree); os.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> { - resetSelectionFromWidget(); + ISelection s = resetSelectionFromWidget(); + if (s != null) { + LOGGER.trace("Fire selection change: {}", s); + selectionProvider.fireSelection(s); + } })); os.addPostSelectionListener(SelectionListener.widgetSelectedAdapter(e -> { - //System.out.println("OPENSTRATEGY: post selection changed: " + e); + LOGGER.trace("Fire post-selection change: {}", selectionProvider.getSelection()); resetSelectionFromWidgetAndFirePostSelection(true); }));