import org.eclipse.swt.SWT;
-import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.agent.Institution;
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.reference.ReferenceType;
import eu.etaxonomy.taxeditor.model.AuthorHelper;
import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.ReferenceSelectionDialog;
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EnumComboType;
+import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.forms.IErrorIntolerableElement;
import eu.etaxonomy.taxeditor.ui.forms.TimePeriodElement;
import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
import eu.etaxonomy.taxeditor.ui.forms.UriWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EnumComboType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.InstitutionSelectionElement;
import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
import eu.etaxonomy.taxeditor.ui.term.ReferenceTypeComboElement;
private TextWithLabelElement text_title;
private TextWithLabelElement text_volume;
private UriWithLabelElement text_uri;
- private AbstractSelectionElement<AgentBase> selection_authorTeam;
+ private AgentSelectionElement selection_authorTeam;
private TimePeriodElement element_timePeriod;
- private AbstractSelectionElement<Reference> selection_inReference;
- private AbstractSelectionElement<Institution> selection_institution;
+ private ReferenceSelectionElement selection_inReference;
+ private InstitutionSelectionElement selection_institution;
private ReferenceTypeComboElement combo_referenceType;
private ReferenceSelectionElement selection_inSeries;
text_title = formFactory.createTextWithLabelElement(formElement, "Title", entity.getTitle(), style);
// author team
- selection_authorTeam = formFactory.createSelectionElement(SelectionType.TEAM, getConversationHolder(), formElement, "Author", AuthorHelper.getAuthor(entity.getAuthorTeam()), style);
+ selection_authorTeam = (AgentSelectionElement) formFactory.createSelectionElement(SelectionType.AGENT, getConversationHolder(), formElement, "Author", AuthorHelper.getAuthor(entity.getAuthorTeam()), style);
ReferenceType referenceType = entity.getType();
}
if(createInReferenceWidget){
- selection_inReference = formFactory.createSelectionElement(SelectionType.REFERENCE, getConversationHolder(),
+ selection_inReference = (ReferenceSelectionElement) formFactory.createSelectionElement(SelectionType.REFERENCE, getConversationHolder(),
element, label, reference.getInReference(), style);
}
}
if(referenceType.equals(ReferenceType.Report)){
// institution
- selection_institution = formFactory.createSelectionElement(SelectionType.INSTITUTION, getConversationHolder(), element, "Institution", reference.getInstitution(), style);
+ selection_institution = (InstitutionSelectionElement) formFactory.createSelectionElement(SelectionType.INSTITUTION, getConversationHolder(), element, "Institution", reference.getInstitution(), style);
}
if(referenceType.equals(ReferenceType.Thesis)){
// school
- selection_institution = formFactory.createSelectionElement(SelectionType.INSTITUTION, getConversationHolder(), element, "School", reference.getSchool(), style);
+ selection_institution = (InstitutionSelectionElement) formFactory.createSelectionElement(SelectionType.INSTITUTION, getConversationHolder(), element, "School", reference.getSchool(), style);
}
if(referenceType.equals(ReferenceType.Proceedings)){