commit 936829364b2913d9bd40ec3d5357e09f1ad50709
Author: Katja Luther <k.luther@bgbm.org>
Date:   Fri Sep 28 18:36:48 2018 +0200

    ref #7345: for common names only common name marked references are selectable now

diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewCommonNameReferenceWizard.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewCommonNameReferenceWizard.java
new file mode 100755
index 000000000..0710d3105
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewCommonNameReferenceWizard.java
@@ -0,0 +1,29 @@
+/**
+* Copyright (C) 2018 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.newWizard;
+
+import eu.etaxonomy.cdm.api.service.IReferenceService;
+import eu.etaxonomy.cdm.model.common.Marker;
+import eu.etaxonomy.cdm.model.common.MarkerType;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author k.luther
+ * @since 28.09.2018
+ *
+ */
+public class NewCommonNameReferenceWizard extends NewReferenceWizard {
+
+
+    @Override
+    protected void saveEntity() {
+        getEntity().addMarker(Marker.NewInstance(MarkerType.COMMON_NAME_REFERENCE(), true));
+        CdmStore.getService(IReferenceService.class).save(getEntity());
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CommonNameReferenceSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CommonNameReferenceSelectionDialog.java
new file mode 100755
index 000000000..ce9400963
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CommonNameReferenceSelectionDialog.java
@@ -0,0 +1,72 @@
+/**
+* Copyright (C) 2018 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
+
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.cdm.api.service.IReferenceService;
+import eu.etaxonomy.cdm.model.common.MarkerType;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
+import eu.etaxonomy.taxeditor.newWizard.NewCommonNameReferenceWizard;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author k.luther
+ * @since 26.09.2018
+ *
+ */
+public class CommonNameReferenceSelectionDialog extends ReferenceSelectionDialog {
+
+    /**
+     * @param shell
+     * @param title
+     * @param multi
+     * @param reference
+     */
+    protected CommonNameReferenceSelectionDialog(Shell shell, String title, boolean multi, Reference reference) {
+        super(shell, title, multi, reference);
+
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#search
+     */
+    /** {@inheritDoc} */
+    @Override
+    protected void callService(String pattern) {
+
+        model = CdmStore.getService(IReferenceService.class).findUuidAndTitleCacheByMarker(100, pattern, MarkerType.COMMON_NAME_REFERENCE());
+
+
+    }
+
+    /**
+     * <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,
+            Reference reference) {
+        CommonNameReferenceSelectionDialog dialog = new CommonNameReferenceSelectionDialog(shell,// conversation,
+                "Choose a common name reference", isInReference, reference);
+        return getSelectionFromDialog(dialog);
+    }
+
+    @Override
+    protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
+        return new NewCommonNameReferenceWizard();
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java
index 13cc5956d..664c2cab4 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java
@@ -45,6 +45,7 @@ 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.description.CommonNameSourceElement;
 import eu.etaxonomy.taxeditor.ui.section.name.AuthorshipDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailElement;
@@ -87,6 +88,10 @@ public class SelectionDialogFactory {
 			return (T) NomenclaturalReferenceSelectionDialog.select(shell, //conversation,
 			        (Reference) currentSelection, ((NomenclaturalReferenceDetailElement)parentElement).getEntity().getCombinationAuthorship());
 		}
+		if(clazz.equals(Reference.class) && parentElement instanceof CommonNameSourceElement){
+            return (T) CommonNameReferenceSelectionDialog.select(shell, //conversation,
+                    (Reference) currentSelection);
+        }
 		if(clazz.equals(Reference.class)){
 		    if (parentElement instanceof ReferenceDetailElement){
 		        return (T) ReferenceSelectionDialog.select(shell, //conversation,
