List of usage examples for org.eclipse.jface.util OpenStrategy addSelectionListener
public void addSelectionListener(SelectionListener listener)
From source file:org.neuro4j.studio.debug.ui.views.StructuredViewer.java
License:Apache License
protected void hookControl(Control control) { super.hookControl(control); OpenStrategy handler = new OpenStrategy(control); handler.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent e) { // On Windows, selection events may happen during a refresh. // Ignore these events if we are currently in preservingSelection(). // See bug 184441. if (!inChange) { handleSelect(e);/* w w w .j ava 2s . c o m*/ } } public void widgetDefaultSelected(SelectionEvent e) { handleDoubleSelect(e); } }); handler.addPostSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handlePostSelect(e); } }); handler.addOpenListener(new IOpenEventListener() { public void handleOpen(SelectionEvent e) { StructuredViewer.this.handleOpen(e); } }); }