private Reference remoteSourceRef;
private IReferenceService service = null;
- /**
- * <p>select</p>
- *
- * @param reference a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
- * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
- * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
- */
- public static Reference select(Shell shell, //ConversationHolder conversation,
+ public static Reference select(Shell shell,
Reference reference, boolean isInReference) {
- ExtReferenceSelectionDialog dialog = new ExtReferenceSelectionDialog(shell, //conversation,
+ ExtReferenceSelectionDialog dialog = new ExtReferenceSelectionDialog(shell,
"Choose a reference", false, reference, isInReference);
return getSelectionFromDialog(dialog);
}
- /**
- * <p>select</p>
- *
- * @param reference a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
- * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
- * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
- */
- public static Reference select(Shell shell, //ConversationHolder conversation,
+ public static Reference select(Shell shell,
Reference reference) {
- ExtReferenceSelectionDialog dialog = new ExtReferenceSelectionDialog(shell, //conversation,
+ ExtReferenceSelectionDialog dialog = new ExtReferenceSelectionDialog(shell,
"Choose a reference", false, reference);
return getSelectionFromDialog(dialog);
}
- /**
- * <p>Constructor for FilteredReferenceSelectionDialog.</p>
- *
- * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
- * @param title a {@link java.lang.String} object.
- * @param reference a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
- * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param multi a boolean.
- */
- protected ExtReferenceSelectionDialog(Shell shell, //ConversationHolder conversation,
+ protected ExtReferenceSelectionDialog(Shell shell,
String title, boolean multi, Reference reference) {
- super(shell, //conversation,
- title, multi, ExtReferenceSelectionDialog.class.getCanonicalName());
+ super(shell, title, multi, ExtReferenceSelectionDialog.class.getCanonicalName());
this.currentReference = reference;
// controller = CdmStore.getCurrentApplicationConfiguration();
remoteSource = CdmServerInfo.getDevServerRemoteSource();
remoteSourceRef.setTitle(remoteSource.getName());
}
- /**
- * <p>Constructor for FilteredReferenceSelectionDialog.</p>
- *
- * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
- * @param title a {@link java.lang.String} object.
- * @param reference a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
- * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param multi a boolean.
- */
- protected ExtReferenceSelectionDialog(Shell shell, //ConversationHolder conversation,
+ protected ExtReferenceSelectionDialog(Shell shell,
String title, boolean multi, Reference reference, boolean isInReference) {
- super(shell, //conversation,
- title, multi, ExtReferenceSelectionDialog.class.getCanonicalName());
+ super(shell, title, multi, ExtReferenceSelectionDialog.class.getCanonicalName());
ExtReferenceSelectionDialog.isInReference = isInReference;
this.currentReference = reference;
T currentSelection, ICdmFormElement parentElement){\r
\r
if(clazz.equals(Taxon.class)){\r
- return (T) TaxonSelectionDialog.selectTaxon(shell,\r
- (Taxon) currentSelection);\r
+ return (T) TaxonSelectionDialog.selectTaxon(shell, (Taxon) currentSelection);\r
}\r
if(clazz.equals(Synonym.class)){\r
return (T) TaxonBaseSelectionDialog.selectSynonym(shell );\r
return (T) TaxonBaseSelectionDialog.selectTaxonBase(shell);\r
}\r
if(clazz.equals(Classification.class)){\r
- return (T) ClassificationSelectionDialog.select(shell,\r
- (Classification) currentSelection);\r
+ return (T) ClassificationSelectionDialog.select(shell, (Classification) currentSelection);\r
}\r
if(clazz.equals(TaxonNode.class)){\r
return (T) TaxonNodeSelectionDialog.select(shell,\r
return (T) ReferenceSelectionDialog.select(shell,\r
((ReferenceDetailElement) parentElement).getEntity(), true);\r
}\r
- return (T) ReferenceSelectionDialog.select(shell,\r
- (Reference) currentSelection);\r
+ return (T) ReferenceSelectionDialog.select(shell, (Reference) currentSelection);\r
}\r
\r
if(clazz.equals(TaxonName.class)){\r
- return (T) NameSelectionDialog.select(shell,\r
- (TaxonName) currentSelection);\r
+ return (T) NameSelectionDialog.select(shell, (TaxonName)currentSelection);\r
}\r
if(clazz.equals(Team.class)){\r
- return (T) TeamSelectionDialog.select(shell,\r
- (Team) currentSelection);\r
+ return (T) TeamSelectionDialog.select(shell, (Team)currentSelection);\r
}\r
if(clazz.equals(TeamOrPersonBase.class) && parentElement instanceof AuthorshipDetailElement){\r
return (T) NomenclaturalAuthorSelectionDialog.select(shell,\r
(TeamOrPersonBase) currentSelection, true);\r
}\r
if(clazz.equals(AgentBase.class)){\r
- return (T) AgentSelectionDialog.select(shell,\r
- (AgentBase) currentSelection, false);\r
+ return (T) AgentSelectionDialog.select(shell, (AgentBase)currentSelection, false);\r
}\r
if(clazz.equals(Feature.class)){\r
- return (T) FeatureSelectionDialog.select(shell,\r
- (Feature) currentSelection);\r
+ return (T) FeatureSelectionDialog.select(shell, (Feature)currentSelection);\r
}\r
if(clazz.equals(TermTree.class)){\r
- return (T) FeatureTreeSelectionDialog.select(shell,\r
- (TermTree) currentSelection);\r
+ return (T) FeatureTreeSelectionDialog.select(shell, (TermTree)currentSelection);\r
}\r
if(clazz.equals(PolytomousKey.class)){\r
- return (T) PolytomousKeySelectionDialog.select(shell,\r
- (PolytomousKey) currentSelection);\r
+ return (T) PolytomousKeySelectionDialog.select(shell, (PolytomousKey)currentSelection);\r
}\r
if(clazz.equals(PolytomousKeyNode.class)){\r
MessagingUtils.warningDialog("Not implemented yet", SelectionDialogFactory.class,\r
return null;\r
}\r
if(clazz.equals(DerivedUnit.class)){\r
- return (T) DerivedUnitSelectionDialog.select(shell,\r
- (DerivedUnit) currentSelection);\r
+ return (T) DerivedUnitSelectionDialog.select(shell, (DerivedUnit) currentSelection);\r
}\r
if(clazz.equals(FieldUnit.class)){\r
- return (T) FieldUnitSelectionDialog.select(shell,\r
- (FieldUnit) currentSelection);\r
+ return (T) FieldUnitSelectionDialog.select(shell, (FieldUnit) currentSelection);\r
}\r
if(clazz.equals(SpecimenOrObservationBase.class)){\r
return (T) SpecimenOrObservationBaseSelectionDialog.select(shell,\r
if (uuidList != null){\r
uuidArray = new UUID[uuidList.size()];\r
uuidList.toArray(uuidArray);\r
-\r
}\r
return (T)NamedAreaSelectionDialog.select(shell, (NamedArea) currentSelection, null, uuidArray);\r
}\r
}\r
if(clazz.equals(Collection.class)){\r
- return (T) CollectionSelectionDialog.select(shell,\r
- (Collection) currentSelection);\r
+ return (T) CollectionSelectionDialog.select(shell, (Collection) currentSelection);\r
}\r
if(clazz.equals(User.class) && parentElement instanceof MemberDetailElement){\r
MemberDetailSection section = (MemberDetailSection)((MemberDetailElement)parentElement).getParentElement();\r
- return (T) UserSelectionDialog.select(shell,\r
- (User) currentSelection, section.getEntity());\r
+ return (T) UserSelectionDialog.select(shell,(User) currentSelection, section.getEntity());\r
}\r
if(clazz.equals(GrantedAuthorityImpl.class)){\r
- return (T) GrantedAuthoritySelectionDialog.select(shell,\r
- (GrantedAuthorityImpl) currentSelection);\r
+ return (T) GrantedAuthoritySelectionDialog.select(shell, (GrantedAuthorityImpl)currentSelection);\r
}\r
if (clazz.equals(Person.class)){\r
- return (T) PersonSelectionDialog.select(shell,\r
- (Person) currentSelection);\r
+ return (T) PersonSelectionDialog.select(shell, (Person)currentSelection);\r
}\r
if(clazz.equals(Group.class) && parentElement instanceof GroupsByUserDetailElement){\r
GroupsByUserDetailSection section =(GroupsByUserDetailSection)((GroupsByUserDetailElement)parentElement).getParentElement();\r
- return (T) GroupSelectionDialog.select(shell,\r
- (Group) currentSelection, section.getEntity());\r
+ return (T) GroupSelectionDialog.select(shell, (Group)currentSelection, section.getEntity());\r
}\r
if(clazz.equals(Institution.class)){\r
- return (T) InstitutionSelectionDialog.select(shell,\r
- (Institution) currentSelection);\r
+ return (T) InstitutionSelectionDialog.select(shell, (Institution)currentSelection);\r
}\r
if(clazz.equals(Primer.class)){\r
- return (T) PrimerSelectionDialog.select(shell,\r
- (Primer) currentSelection);\r
+ return (T) PrimerSelectionDialog.select(shell, (Primer)currentSelection);\r
}\r
if(clazz.equals(Amplification.class)){\r
- return (T) AmplificationSelectionDialog.select(shell,\r
- (Amplification) currentSelection);\r
+ return (T) AmplificationSelectionDialog.select(shell, (Amplification)currentSelection);\r
}\r
if(clazz.equals(Media.class)){\r
- return (T) MediaSelectionDialog.select(shell,\r
- (Media) currentSelection);\r
+ return (T) MediaSelectionDialog.select(shell, (Media)currentSelection);\r
}\r
if(clazz.equals(Rights.class)){\r
- return (T) RightsSelectionDialog.select(shell,\r
- (Rights) currentSelection);\r
+ return (T) RightsSelectionDialog.select(shell, (Rights)currentSelection);\r
}\r
\r
return null;\r
\r
public static <T extends ICdmBase> T getSelectionFromExtDialog(Class<T> clazz, Shell shell,\r
ICdmFormElement parentElement){\r
- return (T) ExtReferenceSelectionDialog.select(shell,\r
- null);\r
+ return (T) ExtReferenceSelectionDialog.select(shell, null);\r
}\r
}
\ No newline at end of file