2 * Copyright (C) 2018 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.taxeditor
.ui
.dialog
.selection
;
11 import org
.eclipse
.swt
.widgets
.Shell
;
13 import eu
.etaxonomy
.cdm
.api
.service
.IReferenceService
;
14 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
15 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
16 import eu
.etaxonomy
.taxeditor
.newWizard
.AbstractNewEntityWizard
;
17 import eu
.etaxonomy
.taxeditor
.newWizard
.NewCommonNameReferenceWizard
;
18 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
25 public class CommonNameReferenceSelectionDialog
extends ReferenceSelectionDialog
{
33 protected CommonNameReferenceSelectionDialog(Shell shell
, String title
, boolean multi
, Reference reference
) {
34 super(shell
, title
, multi
, reference
);
40 * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#search
44 protected void callService(String pattern
) {
46 model
= CdmStore
.getService(IReferenceService
.class).findUuidAndTitleCacheByMarker(100, pattern
, MarkerType
.COMMON_NAME_REFERENCE());
54 * @param reference a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
55 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
56 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
57 * @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
60 public static Reference
select(Shell shell
, //ConversationHolder conversation,
61 Reference reference
) {
62 CommonNameReferenceSelectionDialog dialog
= new CommonNameReferenceSelectionDialog(shell
,// conversation,
63 "Choose a common name reference", isInReference
, reference
);
64 return getSelectionFromDialog(dialog
);
68 protected AbstractNewEntityWizard
getNewEntityWizard(String parameter
) {
69 return new NewCommonNameReferenceWizard(null);