/*
* (non-Javadoc) Method declared on Viewer.
*/
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);
}
}
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);
}
});
}