/** * {@inheritDoc} */ @Override public void selectionChange(SelectionChangeEvent evt) { boolean sourceIsScl = evt.getSource() instanceof ISelectionChangeListener; if (sourceIsScl && selectionChangeSupport == null) { selectionChangeSupport = new SelectionChangeSupport(this); } if (sourceIsScl) { selectionChangeSupport.addInhibitedListener((ISelectionChangeListener) evt.getSource()); } try { setSelectedIndices(evt.getNewSelection(), evt.getLeadingIndex()); } finally { if (sourceIsScl) { selectionChangeSupport.removeInhibitedListener((ISelectionChangeListener) evt.getSource()); } } }
/** * {@inheritDoc} */ @Override public void selectionChange(SelectionChangeEvent evt) { boolean isSourceScl = evt.getSource() instanceof ISelectionChangeListener; if (isSourceScl && selectionChangeSupport == null) { selectionChangeSupport = new SelectionChangeSupport(this); } if (isSourceScl) { selectionChangeSupport .addInhibitedListener((ISelectionChangeListener) evt.getSource()); } try { setSelectedIndices(evt.getNewSelection(), evt.getLeadingIndex()); } finally { if (isSourceScl) { selectionChangeSupport .removeInhibitedListener((ISelectionChangeListener) evt.getSource()); } } }