import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
+import eu.etaxonomy.cdm.model.description.Feature;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
else{
structuredSelection = (IStructuredSelection) selection;
}
- if((partObject instanceof IEditorPart) || (partObject instanceof IPartContentHasDetails)) {
+ if((partObject instanceof IEditorPart) || (partObject instanceof IPartContentHasDetails)
+ && partObject instanceof IConversationEnabled) {
+ // do not show details for feature nodes TODO strange check to avoid having shown the distribution map for every FeatureNodeContainer
+ if(structuredSelection.getFirstElement() instanceof FeatureNodeContainer){
+ // do show the map for distributions
+ Feature feature = ((FeatureNodeContainer) ((IStructuredSelection) selection).getFirstElement()).getFeature();
+ if(!feature.equals(Feature.DISTRIBUTION())){
+ showEmptyPage();
+ return;
+ }
+ }
showViewer(structuredSelection);
selectionProvidingPart = activePart;
}
+ else{
+ showEmptyPage();
+ }
}
public void showEmptyPage() {
- viewer.setSelection(null);
+ viewer.showEmptyPage();
+ selectionProvidingPart = null;
}
protected String getViewName(){