-// $Id$
/**
* Copyright (C) 2009 EDIT
* European Distributed Institute of Taxonomy
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
+import eu.etaxonomy.taxeditor.ui.section.agent.TeamMemberElement;
+import eu.etaxonomy.taxeditor.ui.section.name.AuthorshipDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailElement;
/**
* @author n.hoffmann
if(clazz.equals(TaxonNode.class)){
return (T) TaxonNodeSelectionDialog.select(shell, conversation, null, null, (TaxonNode) currentSelection, ((TaxonNode) currentSelection).getClassification());
}
+ if(clazz.equals(Reference.class) && parentElement instanceof NomenclaturalReferenceDetailElement){
+ return (T) NomenclaturalReferenceSelectionDialog.select(shell, conversation, (Reference) currentSelection);
+ }
if(clazz.equals(Reference.class)){
return (T) ReferenceSelectionDialog.select(shell, conversation, (Reference) currentSelection);
}
+
if(clazz.equals(TaxonNameBase.class)){
return (T) NameSelectionDialog.select(shell, conversation, (TaxonNameBase) currentSelection);
}
if(clazz.equals(Team.class)){
return (T) TeamSelectionDialog.select(shell, conversation, (Team) currentSelection);
}
- if(clazz.equals(TeamOrPersonBase.class)){
+ if(clazz.equals(TeamOrPersonBase.class) && parentElement instanceof AuthorshipDetailElement){
+ return (T) NomenclaturalAuthorSelectionDialog.select(shell, conversation, (AgentBase) currentSelection, false);
+ }else if(clazz.equals(TeamOrPersonBase.class)){
//TODO: add TeamOrPersonBaseSelectionDialog (see ticket #4545)
- return (T) AgentSelectionDialog.select(shell, conversation, (AgentBase) currentSelection);
+ return (T) AgentSelectionDialog.select(shell, conversation, (AgentBase) currentSelection, false);
}
+ if(clazz.equals(Person.class) && parentElement instanceof TeamMemberElement){
+ return (T) NomenclaturalPersonAuthorSelectionDialog.select(shell, conversation, (AgentBase) currentSelection, true);
+ }
if(clazz.equals(AgentBase.class)){
- return (T) AgentSelectionDialog.select(shell, conversation, (AgentBase) currentSelection);
+ return (T) AgentSelectionDialog.select(shell, conversation, (AgentBase) currentSelection, false);
}
if(clazz.equals(Feature.class)){
return (T) FeatureSelectionDialog.select(shell, conversation, (Feature) currentSelection);
}
if(clazz.equals(NamedArea.class)){
if(parentElement instanceof IEntityElement && ((IEntityElement) parentElement).getEntity() instanceof DerivedUnitFacade){
- return (T) NamedAreaSelectionDialog.select(shell, conversation, (NamedArea) currentSelection, Country.uuidCountryVocabulary);
+ return (T) NamedAreaSelectionDialog.select(shell, conversation, (NamedArea) currentSelection, DerivedUnit.class.getCanonicalName(), Country.uuidCountryVocabulary);
}
else{
- return (T) NamedAreaSelectionDialog.select(shell, conversation, (NamedArea) currentSelection);
+ return (T) NamedAreaSelectionDialog.select(shell, conversation, (NamedArea) currentSelection, parentElement.getClass().getCanonicalName());
}
}
if(clazz.equals(Collection.class)){