/** * The <code>StructuredViewer</code> implementation of this method returns * the result as an <code>IStructuredSelection</code>. * <p> * Subclasses do not typically override this method, but implement * <code>getSelectionFromWidget(List)</code> instead. * <p> * @return ISelection */ public ISelection getSelection() { Control control = getControl(); if (control == null || control.isDisposed()) { return StructuredSelection.EMPTY; } List list = getSelectionFromWidget(); return new StructuredSelection(list, comparer); }
/** * The <code>StructuredViewer</code> implementation of this method returns * the result as an <code>IStructuredSelection</code>. * <p> * Call {@link #getStructuredSelection()} instead to get an instance of * <code>IStructuredSelection</code> directly. * </p> * Subclasses do not typically override this method, but implement * <code>getSelectionFromWidget(List)</code> instead. If they override this * method, they should return an <code>IStructuredSelection</code> as well. * * @return ISelection */ @Override public ISelection getSelection() { Control control = getControl(); if (control == null || control.isDisposed()) { return StructuredSelection.EMPTY; } List list = getSelectionFromWidget(); return new StructuredSelection(list, comparer); }
/** * The <code>StructuredViewer</code> implementation of this method returns * the result as an <code>IStructuredSelection</code>. * <p> * Call {@link #getStructuredSelection()} instead to get an instance of * <code>IStructuredSelection</code> directly. * </p> * Subclasses do not typically override this method, but implement * <code>getSelectionFromWidget(List)</code> instead. If they override this * method, they should return an <code>IStructuredSelection</code> as well. * * @return ISelection */ @Override public ISelection getSelection() { Control control = getControl(); if (control == null || control.isDisposed()) { return StructuredSelection.EMPTY; } List list = getSelectionFromWidget(); return new StructuredSelection(list, comparer); }