@Override protected void hookControl(Control control) { super.hookControl(control); OpenStrategy handler = new OpenStrategy(control); handler.addSelectionListener(new SelectionListener() { @Override 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); } } @Override public void widgetDefaultSelected(SelectionEvent e) { handleDoubleSelect(e); } }); handler.addPostSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { handlePostSelect(e); } }); handler.addOpenListener(StructuredViewer.this::handleOpen); }
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); } }); }
@Override protected void hookControl(Control control) { super.hookControl(control); OpenStrategy handler = new OpenStrategy(control); handler.addSelectionListener(new SelectionListener() { @Override 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); } } @Override public void widgetDefaultSelected(SelectionEvent e) { handleDoubleSelect(e); } }); handler.addPostSelectionListener(widgetSelectedAdapter(e -> handlePostSelect(e))); handler.addOpenListener(StructuredViewer.this::handleOpen); }
handler.addOpenListener(new IOpenEventListener() { public void handleOpen(SelectionEvent e) {
handler.addOpenListener(new IOpenEventListener() { public void handleOpen(SelectionEvent e) { if (getSite() != null) {