import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeNode;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
import org.eclipse.ui.IWorkbenchPart;
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
showViewer(part, new StructuredSelection(input));
}
- if(part instanceof BulkEditor && selection instanceof IStructuredSelection){
+ else if(part instanceof BulkEditor && selection instanceof IStructuredSelection){
showViewer(part, (IStructuredSelection) selection);
}
+
+ else if(part instanceof DerivateView){
+ TreeNode treeNode = EditorUtil.getTreeNodeOfSelection(selection);
+ if(treeNode!=null){
+ showViewer(part, new StructuredSelection(treeNode.getValue()));
+ }
+ }
}
/** {@inheritDoc} */