+ private class ConceptRelationViewer extends ListViewer {
+
+ public ConceptRelationViewer(Composite parent) {
+ super(parent);
+ }
+
+ @Override
+ public ISelection getSelection() {
+ ISelection selection = super.getSelection();
+ if(selection instanceof IStructuredSelection && !selection.isEmpty()){
+ Object firstElement = ((IStructuredSelection) selection).getFirstElement();
+ TaxonRelationship taxonRelationship = ((Entry<TaxonRelationship, Taxon>)firstElement).getKey();
+ return new StructuredSelection(taxonRelationship);
+
+ }
+ return selection;
+ }
+
+ @Override
+ public void setSelection(ISelection selection) {
+ super.setSelection(selection);
+ }
+
+ }
+