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;
*/
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;
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);
}));