- derivate view shows derivate hierarchy of FieldUnits and DerivedUnits
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / derivate / DerivateView.java
index da6c9c079a7f2c218e8ece014647d64a9f7e6fcc..ce5036414611dcb8eb1234847b8b2601fa8676ce 100644 (file)
@@ -11,6 +11,7 @@ import org.eclipse.ui.IWorkbenchPart;
 
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
 import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
@@ -38,12 +39,12 @@ public class DerivateView extends AbstractCdmEditorViewPart implements IPartCont
 
        @Override
        public void selectionChanged(IWorkbenchPart part, ISelection selection) {
-           if(part instanceof BulkEditor && selection instanceof IStructuredSelection){
-               showViewer(part, (IStructuredSelection)selection);
+           if(AbstractUtility.getActiveEditor()==null || !(AbstractUtility.getActiveEditor() instanceof BulkEditor)){
+               showEmptyPage();
                return;
            }
-           else {
-               showEmptyPage();
+           else if(part instanceof BulkEditor && selection instanceof IStructuredSelection){
+               showViewer(part, (IStructuredSelection)selection);
                return;
            }
        }