Project

General

Profile

« Previous | Next » 

Revision f5979052

Added by Katja Luther over 6 years ago

fix multiple representation by removing conversation of selection dialog

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/ChangeSynonymToAcceptedTaxonHandlerE4.java
87 87
		// Get taxon
88 88
		Taxon taxon = input.getTaxon();
89 89

  
90
		TaxonNode newParentNode = TaxonNodeSelectionDialog.select(shell, editor.getConversationHolder(), Messages.ChangeSynonymToAcceptedTaxonHandler_SELECT_PARENT, null, null, input.getTaxonNode().getClassification());
90
		TaxonNode newParentNode = TaxonNodeSelectionDialog.select(shell,// editor.getConversationHolder(),
91
		        Messages.ChangeSynonymToAcceptedTaxonHandler_SELECT_PARENT, null, null, input.getTaxonNode().getClassification());
91 92

  
92 93

  
93 94
		if(newParentNode != null){
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/MoveSynonymToAnotherAcceptedTaxonHandlerE4.java
83 83
		excludeTaxa.add(oldParent.getUuid());
84 84

  
85 85

  
86
		newParentNode = TaxonNodeSelectionDialog.select(shell, editor.getConversationHolder(), Messages.MoveSynonymToAnotherAcceptedTaxonHandler_SELECT_ACC_TAXON, excludeTaxa,  input.getTaxonNode(), input.getTaxonNode().getClassification());
86
		newParentNode = TaxonNodeSelectionDialog.select(shell, //editor.getConversationHolder(),
87
		        Messages.MoveSynonymToAnotherAcceptedTaxonHandler_SELECT_ACC_TAXON, excludeTaxa,  input.getTaxonNode(), input.getTaxonNode().getClassification());
87 88

  
88 89
		if(newParentNode!=null){
89 90
		   MoveSynonymToAnotherAcceptedTaxonOperationE4 operation = new MoveSynonymToAnotherAcceptedTaxonOperationE4(Messages.MoveSynonymToAnotherAcceptedTaxonHandler_CHANGE_ACC_TAXON, EditorUtil.getUndoContext(),
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/operation/MoveSynonymToAnotherAcceptedTaxonOperationE4.java
12 12

  
13 13
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
14 14
import eu.etaxonomy.cdm.api.service.ITaxonService;
15
import eu.etaxonomy.cdm.api.service.UpdateResult;
15 16
import eu.etaxonomy.cdm.api.service.exception.HomotypicalGroupChangeException;
16 17
import eu.etaxonomy.cdm.model.taxon.Synonym;
17 18
import eu.etaxonomy.cdm.model.taxon.Taxon;
......
56 57
		conversationEnabled.getConversationHolder().commit();
57 58

  
58 59
		try {
59
			CdmStore.getService(ITaxonService.class).moveSynonymToAnotherTaxon(synonym,
60
			UpdateResult result = CdmStore.getService(ITaxonService.class).moveSynonymToAnotherTaxon(synonym,
60 61
			        this.element.getUuid(),
61 62
			        true,
62 63
			        synonym.getType(),
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/CreateConceptRelationHandlerE4.java
80 80
            //		    undoContext = bulkEditor.getUndoContext();
81 81
            //		}
82 82

  
83
            Taxon relatedConcept = TaxonBaseSelectionDialog.selectTaxon(shell, conversationHolder, taxon);
83
            Taxon relatedConcept = TaxonBaseSelectionDialog.selectTaxon(shell, //conversationHolder,
84
                    taxon);
84 85

  
85 86

  
86 87
            if(relatedConcept == null){
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/AddExistingMediaHandler.java
31 31
    protected DerivedUnit createDerivative() {
32 32
        MediaSpecimen mediaSpecimen = null;
33 33
        //select media
34
        Media media = MediaSelectionDialog.select(AbstractUtility.getShell(), null, null);
34
        Media media = MediaSelectionDialog.select(AbstractUtility.getShell(), //null,
35
                null);
35 36
        if(media!=null){
36 37
            //create MediaSpecimen
37 38
            mediaSpecimen = MediaSpecimen.NewInstance(SpecimenOrObservationType.StillImage);
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/searchFilter/DerivateSearchCompositeController.java
120 120
            searchDerivates();
121 121
        }
122 122
        else if(eventSource==derivateSearchComposite.getBtnBrowseTaxa()){
123
            selectedTaxon = SelectionDialogFactory.getSelectionFromDialog(Taxon.class, this.derivateSearchComposite.getShell(), derivativeEditor.getConversationHolder(), null);
123
            selectedTaxon = SelectionDialogFactory.getSelectionFromDialog(Taxon.class, this.derivateSearchComposite.getShell(), //derivativeEditor.getConversationHolder(),
124
                    null);
124 125
            if(selectedTaxon!=null){
125 126
                derivateSearchComposite.getTextTaxonName().setText(selectedTaxon.getTitleCache());
126 127
            }
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionElementsHandlerE4.java
121 121
            }
122 122
        }
123 123
        TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(shell,
124
                editor.getConversationHolder(),
124
//                editor.getConversationHolder(),
125 125
                Messages.MoveDescriptionElementsHandler_CHOOSE_ACC_TAXON,
126 126
                excludeTaxa,
127 127
                null, classification
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionToOtherTaxonHandlerE4.java
109 109
            classification = node.getClassification();
110 110
        }
111 111
        TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(shell,
112
                editor.getConversationHolder(),
112
//                editor.getConversationHolder(),
113 113
                Messages.MoveDescriptionToOtherTaxonHandler_CHOOSE_ACC_TAXON,
114 114
                excludeTaxa,
115 115
                node,
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/handler/AddExistingMediaHandler.java
31 31
        if(description != null){
32 32
            AbstractPostOperation operation = null;
33 33
            //select media
34
            Media media = MediaSelectionDialog.select(AbstractUtility.getShell(), null, null);
34
            Media media = MediaSelectionDialog.select(AbstractUtility.getShell(),// null,
35
                    null);
35 36
            if(media!=null){
36 37
                // TODO use undo context specific to editor
37 38
                operation = new AddExistingMediaToImageGalleryOperation(media, menuItem.getLocalizedLabel(),
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/CharacterEditor.java
337 337

  
338 338
        @Override
339 339
        public void widgetSelected(SelectionEvent e) {
340
            FeatureTree tree = FeatureTreeSelectionDialog.select(featureTreeEditorComposite.getDisplay().getActiveShell(), conversation, null);
340
            FeatureTree tree = FeatureTreeSelectionDialog.select(featureTreeEditorComposite.getDisplay().getActiveShell(), //conversation,
341
                    null);
341 342
            if(tree!=null){
342 343
                featureTreeEditorComposite.setSelectedTree(tree, CharacterEditor.this);
343 344
                featureTreeEditorComposite.getText_title().setEnabled(false);
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/ChangeAcceptedTaxonToSynonymHandlerE4.java
87 87
            List<UUID> excludeTaxa = new ArrayList<UUID>();
88 88
            excludeTaxa.add(((TaxonNode)oldAcceptedTaxonNode).getTaxon().getUuid());
89 89
            TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(shell,
90
            		taxonNavigator.getConversationHolder(),
90
//            		taxonNavigator.getConversationHolder(),
91 91
            		Messages.ChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON,
92 92
            		excludeTaxa,
93 93
            		null,
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/MoveFactualDataHandlerE4.java
54 54
                    List<UUID> excludeTaxa = new ArrayList<UUID>();
55 55
                    excludeTaxa.add(taxon.getUuid());
56 56
                    TaxonNode dialogTaxonNode = TaxonNodeSelectionDialog.select(shell,
57
                            taxonNavigator.getConversationHolder(),
57
//                            taxonNavigator.getConversationHolder(),
58 58
                            Messages.MoveFactualDataHandler_CHOOSE_TAXON,
59 59
                            excludeTaxa,
60 60
                            sourceTaxonNode,
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/MoveTaxonHandlerE4.java
87 87
				if(!MessageDialog.openQuestion(null, Messages.MoveTaxonHandler_TARGET_NODE, Messages.MoveTaxonHandler_TARGET_NODE_MESSAGE)){
88 88
					moveToNewParent = MovingType.BEHIND;
89 89
				}
90
				parentTaxonNode = TaxonNodeSelectionDialog.select(shell, taxonNavigator.getConversationHolder(), Messages.MoveTaxonHandler_CHOOSE_ABOVE, excludeTaxa, null, classification);
90
				parentTaxonNode = TaxonNodeSelectionDialog.select(shell, //taxonNavigator.getConversationHolder(),
91
				        Messages.MoveTaxonHandler_CHOOSE_ABOVE, excludeTaxa, null, classification);
91 92
			}else{
92
				parentTaxonNode = TaxonNodeSelectionDialog.select(shell, taxonNavigator.getConversationHolder(), Messages.MoveTaxonHandler_CHOOSE_PARENT, excludeTaxa, null, classification);
93
				parentTaxonNode = TaxonNodeSelectionDialog.select(shell, //taxonNavigator.getConversationHolder(),
94
				        Messages.MoveTaxonHandler_CHOOSE_PARENT, excludeTaxa, null, classification);
93 95
			}
94 96
			if(parentTaxonNode != null){
95 97
				if(NavigationUtil.isDirty(parentTaxonNode, partService)){
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RemotingChangeAcceptedTaxonToSynonymHandlerE4.java
20 20
import org.eclipse.jface.viewers.TreeSelection;
21 21
import org.eclipse.swt.widgets.Shell;
22 22

  
23
import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
24 23
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
25 24
import eu.etaxonomy.taxeditor.editor.EditorUtil;
26 25
import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
......
99 98
        List<UUID> excludeTaxa = new ArrayList<UUID>();
100 99
        excludeTaxa.add(oldTaxonNode.getTaxon().getUuid());
101 100
        TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(shell,
102
                new ConversationHolderMock(),
101
//                new ConversationHolderMock(),
103 102
                Messages.RemotingChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON,
104 103
                excludeTaxa,
105 104
                oldTaxonNode,
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RemotingMoveFactualDataHandlerE4.java
26 26
import org.eclipse.swt.widgets.Display;
27 27
import org.eclipse.swt.widgets.Shell;
28 28

  
29
import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
30 29
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
31 30
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
32 31
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
......
89 88
        excludeTaxa.add(sourceTaxonNode.getTaxon().getUuid());
90 89

  
91 90
        targetTaxonNode = TaxonNodeSelectionDialog.select(shell,
92
                new ConversationHolderMock(),
91
//                new ConversationHolderMock(),
93 92
                Messages.RemotingMoveFactualDataHandler_CHOOSE_TAXA,
94 93
                excludeTaxa,
95 94
                sourceTaxonNode,
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RemotingMoveTaxonNodeHandlerE4.java
26 26
import org.eclipse.jface.viewers.TreeSelection;
27 27
import org.eclipse.swt.widgets.Shell;
28 28

  
29
import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
30 29
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
31 30
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
32 31
import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
......
96 95

  
97 96

  
98 97
            parentTaxonNode = TaxonNodeSelectionDialog.select(shell,
99
                    new ConversationHolderMock(),
98
//                    new ConversationHolderMock(),
100 99
                    Messages.RemotingMoveTaxonNodeHandler_CHOOSE_TAXON,
101 100
                    excludeTaxa,
102 101
                    null,
......
112 111
            }
113 112
        } else {
114 113
            parentTaxonNode = TaxonNodeSelectionDialog.select(shell,
115
                    new ConversationHolderMock(),
114
//                    new ConversationHolderMock(),
116 115
                    Messages.RemotingMoveTaxonNodeHandler_CHOOSE_PARENT,
117 116
                    excludeTaxa,
118 117
                    oldTaxonNode,
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureTreeEditor.java
115 115
                            }
116 116

  
117 117
                        }
118
                        FeatureTree tree = FeatureTreeSelectionDialog.select(composite.getDisplay().getActiveShell(), conversation, null);
118
                        FeatureTree tree = FeatureTreeSelectionDialog.select(composite.getDisplay().getActiveShell(), //conversation,
119
                                null);
119 120
                        if (tree != null) {
120 121
                            composite.setSelectedTree(tree, FeatureTreeEditor.this);
121 122
                        }
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java
315 315
    public static String SearchDialog_patternLabel;
316 316
//    public static String SearchDialog_listLabel;
317 317

  
318

  
319
    public static String SelectionViewMenu_SET_FLAG;
320
    public static String SelectionViewMenu_selectVocabulary;
321
    public static String SelectionViewMenu_4_YES;
322
    public static String SelectionViewMenu_NO;
323

  
318 324

  
319 325

  
320 326

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties
248 248

  
249 249
SearchDialog_patternLabel=Use * for wildcard, or ? to see all entries
250 250
SearchDialog_listLabel=&Matching items:
251

  
252
SelectionViewMenu_selectVocabulary=choose vocabulary
253
SelectionViewMenu_SET_FLAG='%s' set flag
254
SelectionViewMenu_4_YES=Yes
255
SelectionViewMenu_NO=No
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
250 250

  
251 251
SearchDialog_patternLabel=Nutze * als f?r eine beliebige Zeichenkette, oder ? um alle Eintr?ge zu sehen
252 252
SearchDialog_listLabel=&Passende Objekte:
253

  
254
SelectionViewMenu_selectVocabulary=Vokabular w?hlen
255
SelectionViewMenu_SET_FLAG='%s' flag setzen
256
SelectionViewMenu_4_YES=Ja
257
SelectionViewMenu_NO=Nein
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
58 58

  
59 59
import eu.etaxonomy.cdm.api.application.CdmApplicationState;
60 60
import eu.etaxonomy.cdm.api.service.IProgressMonitorService;
61
import eu.etaxonomy.cdm.api.service.UpdateResult;
61 62
import eu.etaxonomy.cdm.common.monitor.IRemotingProgressMonitor;
62 63
import eu.etaxonomy.cdm.io.common.ExportDataWrapper;
63 64
import eu.etaxonomy.cdm.io.common.ExportResult;
......
713 714
                    final StringBuilder reportSb = new StringBuilder();
714 715
                    // collect reports
715 716
//	                    for(String report : remotingMonitor.getResult()) {
717
                    if (remotingMonitor.getResult() instanceof ExportResult) {
716 718
                        reportSb.append(((ExportResult)remotingMonitor.getResult()).createReport());
719
                    }else if (remotingMonitor.getResult() instanceof UpdateResult){
720
                        reportSb.append(((UpdateResult)remotingMonitor.getResult()).getExceptions().toString());
721
                    }
717 722
//	                    }
718 723
                    if(!StringUtils.isBlank(reportSb.toString())) {
719 724
                        Display.getDefault().asyncExec(new Runnable() {
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/CloneClassificationDetailElement.java
39 39
    protected void createControls(ICdmFormElement formElement, Classification entity, int style) {
40 40
         txtClassificationName = formFactory.createTextWithLabelElement(formElement, "Classification name", null, style);
41 41
         comboRelationType = formFactory.createDefinedTermComboElement(TermType.TaxonRelationshipType, formElement, "Taxon relation", null, style);
42
         selectReference = formFactory.createSelectionElement(Reference.class, getConversationHolder(), formElement, "Reference", null, EntitySelectionElement.SELECTABLE, style);
42
         selectReference = formFactory.createSelectionElement(Reference.class, //getConversationHolder(),
43
                 formElement, "Reference", null, EntitySelectionElement.SELECTABLE, style);
43 44
    }
44 45

  
45 46
     @Override
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java
38 38
import org.eclipse.swt.widgets.Composite;
39 39
import org.eclipse.swt.widgets.Shell;
40 40

  
41
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
42 41
import eu.etaxonomy.cdm.model.common.CdmBase;
43 42
import eu.etaxonomy.cdm.model.common.ICdmBase;
44 43
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
......
83 82
	 * @param cdmObject a T object.
84 83
	 * @param <T> a T object.
85 84
	 */
86
	protected AbstractFilteredCdmResourceSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, String settings, T cdmObject) {
85
	protected AbstractFilteredCdmResourceSelectionDialog(Shell shell, //ConversationHolder conversation,
86
	        String title, boolean multi, String settings, T cdmObject) {
87 87
		super(shell, multi);
88 88
		setShellStyle(SWT.DIALOG_TRIM);
89 89
		setTitle(title);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java
18 18
import org.eclipse.swt.widgets.Shell;
19 19
import org.eclipse.swt.widgets.Text;
20 20

  
21
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
22 21
import eu.etaxonomy.cdm.api.service.IAgentService;
23 22
import eu.etaxonomy.cdm.model.agent.AgentBase;
24 23
import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor;
......
57 56
	 * @param entity a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
58 57
	 * @return a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
59 58
	 */
60
	public static AgentBase select(Shell shell, ConversationHolder conversation, AgentBase entity, boolean selectTeamMember) {
61
		AgentSelectionDialog dialog = new AgentSelectionDialog(shell, conversation,
59
	public static AgentBase select(Shell shell, //ConversationHolder conversation,
60
	        AgentBase entity, boolean selectTeamMember) {
61
		AgentSelectionDialog dialog = new AgentSelectionDialog(shell, //conversation,
62 62
				"Choose Agent", false, AgentSelectionDialog.class.getCanonicalName(), entity, selectTeamMember);
63 63
		return getSelectionFromDialog(dialog);
64 64
	}
......
73 73
	 * @param multi a boolean.
74 74
	 * @param settings a {@link java.lang.String} object.
75 75
	 */
76
	protected AgentSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, String settings, AgentBase agent, boolean selectTeamMember) {
77
		super(shell, conversation, title, multi, settings, agent);
76
	protected AgentSelectionDialog(Shell shell, //ConversationHolder conversation,
77
	        String title, boolean multi, String settings, AgentBase agent, boolean selectTeamMember) {
78
		super(shell, //conversation,
79
		        title, multi, settings, agent);
78 80
		this.selectTeamMember = selectTeamMember;
79 81
	}
80 82

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AmplificationSelectionDialog.java
12 12

  
13 13
import org.eclipse.swt.widgets.Shell;
14 14

  
15
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
16 15
import eu.etaxonomy.cdm.api.service.molecular.IAmplificationService;
17 16
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
18 17
import eu.etaxonomy.cdm.model.molecular.Amplification;
......
29 28
public class AmplificationSelectionDialog extends
30 29
AbstractFilteredCdmResourceSelectionDialog<Amplification> {
31 30

  
32
    public static Amplification select(Shell shell, ConversationHolder conversation, Amplification amplification){
33
        AmplificationSelectionDialog dialog = new AmplificationSelectionDialog(shell, conversation,
31
    public static Amplification select(Shell shell, //ConversationHolder conversation,
32
            Amplification amplification){
33
        AmplificationSelectionDialog dialog = new AmplificationSelectionDialog(shell, //conversation,
34 34
                "Choose Amplification", false, AmplificationSelectionDialog.class.getCanonicalName(), amplification);
35 35
        return getSelectionFromDialog(dialog);
36 36
    }
......
38 38
    /**
39 39
     * <p>Constructor for FilteredDerivedUnitSelectionDialog.</p>
40 40
     */
41
    protected AmplificationSelectionDialog(Shell shell, ConversationHolder conversation, String title,
41
    protected AmplificationSelectionDialog(Shell shell, //ConversationHolder conversation,
42
            String title,
42 43
            boolean multi, String settings, Amplification cdmObject) {
43
        super(shell, conversation, title, multi, settings, cdmObject);
44
        super(shell, //conversation,
45
                title, multi, settings, cdmObject);
44 46
    }
45 47

  
46 48
    /** {@inheritDoc} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ClassificationSelectionDialog.java
15 15
import org.eclipse.swt.widgets.Shell;
16 16
import org.eclipse.swt.widgets.Text;
17 17

  
18
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
19 18
import eu.etaxonomy.cdm.api.service.IClassificationService;
20 19
import eu.etaxonomy.cdm.model.taxon.Classification;
21 20
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
......
46 45
	 * @param curentSelection
47 46
	 * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
48 47
	 */
49
	public static Classification select(Shell shell,
50
			ConversationHolder conversation, Classification curentSelection) {
51
		ClassificationSelectionDialog dialog = new ClassificationSelectionDialog(
52
				shell, conversation, "Choose a Classification", false, "", null);
48
	public static Classification select(Shell shell,//ConversationHolder conversation,
49
	        Classification curentSelection) {
50
		ClassificationSelectionDialog dialog = new ClassificationSelectionDialog(shell, //conversation,
51
		        "Choose a Classification", false, "", null);
53 52
		return getSelectionFromDialog(dialog);
54 53
	}
55 54

  
......
72 71
	 * @param classification
73 72
	 *            a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
74 73
	 */
75
	protected ClassificationSelectionDialog(Shell shell,
76
			ConversationHolder conversation, String title, boolean multi,
74
	protected ClassificationSelectionDialog(Shell shell,//ConversationHolder conversation,
75
	        String title, boolean multi,
77 76
			String settings, Classification classification) {
78
		super(shell, conversation, title, multi, settings, classification);
77
		super(shell, //conversation,
78
		        title, multi, settings, classification);
79 79
	}
80 80

  
81 81
//	/*
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java
11 11

  
12 12
import java.util.UUID;
13 13

  
14
import org.eclipse.core.runtime.CoreException;
15
import org.eclipse.swt.widgets.Control;
14 16
import org.eclipse.swt.widgets.Shell;
17
import org.eclipse.swt.widgets.Text;
15 18

  
16
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
17 19
import eu.etaxonomy.cdm.api.service.ICollectionService;
18 20
import eu.etaxonomy.cdm.model.occurrence.Collection;
19 21
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
......
38 40
	 * @param collection a {@link eu.etaxonomy.cdm.model.occurrence.Collection} object.
39 41
	 * @return a {@link eu.etaxonomy.cdm.model.occurrence.Collection} object.
40 42
	 */
41
	public static Collection select(Shell shell, ConversationHolder conversation, Collection collection){
42
		CollectionSelectionDialog dialog = new CollectionSelectionDialog(shell, conversation,
43
	public static Collection select(Shell shell, //ConversationHolder conversation,
44
	        Collection collection){
45
		CollectionSelectionDialog dialog = new CollectionSelectionDialog(shell, //conversation,
43 46
				"Choose Collection", false, CollectionSelectionDialog.class.getCanonicalName(), collection);
44 47
		return getSelectionFromDialog(dialog);
45 48
	}
......
54 57
	 * @param settings a {@link java.lang.String} object.
55 58
	 * @param cdmObject a {@link eu.etaxonomy.cdm.model.occurrence.Collection} object.
56 59
	 */
57
	protected CollectionSelectionDialog(Shell shell,
58
			ConversationHolder conversation, String title, boolean multi,
60
	protected CollectionSelectionDialog(Shell shell,//ConversationHolder conversation,
61
			 String title, boolean multi,
59 62
			String settings, Collection cdmObject) {
60
		super(shell, conversation, title, multi, settings, cdmObject);
63
		super(shell, //conversation,
64
		        title, multi, settings, cdmObject);
61 65
	}
62 66

  
63 67
	/* (non-Javadoc)
......
75 79
	/** {@inheritDoc} */
76 80
	@Override
77 81
	protected void search() {
78
		model = CdmStore.getService(ICollectionService.class).getUuidAndTitleCache(null, null);
82
	    Control control =getSearchField();
83
        String pattern = null;
84
        if (control != null){
85
            pattern = ((Text)control).getText();
86
        }
87

  
88
        if (pattern == null || pattern.equals("?")){
89
            model = CdmStore.getService(ICollectionService.class).getUuidAndTitleCache(null, null);
90
        }else{
91
            model = CdmStore.getService(ICollectionService.class).getUuidAndTitleCache(limitOfInitialElements,pattern);
92
        }
93
        try {
94
            fillContentProvider(null);
95
        } catch (CoreException e) {
96
            // TODO Auto-generated catch block
97
            e.printStackTrace();
98
        }
99

  
79 100
	}
80 101

  
81 102
	/* (non-Javadoc)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java
16 16
import org.eclipse.swt.widgets.Shell;
17 17
import org.eclipse.swt.widgets.Text;
18 18

  
19
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
20 19
import eu.etaxonomy.cdm.api.service.IOccurrenceService;
21 20
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
22 21
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
......
44 43
	 * @param unit a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase} object.
45 44
	 * @return a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase} object.
46 45
	 */
47
	public static DerivedUnit select(Shell shell, ConversationHolder conversation, DerivedUnit unit){
48
		DerivedUnitSelectionDialog dialog = new DerivedUnitSelectionDialog(shell, conversation,
46
	public static DerivedUnit select(Shell shell, //ConversationHolder conversation,
47
	        DerivedUnit unit){
48
		DerivedUnitSelectionDialog dialog = new DerivedUnitSelectionDialog(shell, //conversation,
49 49
				"Choose Unit", false, DerivedUnitSelectionDialog.class.getCanonicalName(), unit);
50 50
		return getSelectionFromDialog(dialog);
51 51
	}
......
60 60
	 * @param settings a {@link java.lang.String} object.
61 61
	 * @param cdmObject a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase} object.
62 62
	 */
63
	protected DerivedUnitSelectionDialog(Shell shell, ConversationHolder conversation, String title,
63
	protected DerivedUnitSelectionDialog(Shell shell, //ConversationHolder conversation,
64
	        String title,
64 65
			boolean multi, String settings, DerivedUnit cdmObject) {
65
		super(shell, conversation, title, multi, settings, cdmObject);
66
		super(shell, //conversation,
67
		        title, multi, settings, cdmObject);
66 68
	}
67 69

  
68 70
	/** {@inheritDoc} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ExtReferenceSelectionDialog.java
18 18
import org.eclipse.swt.widgets.Text;
19 19

  
20 20
import eu.etaxonomy.cdm.api.application.ICdmRepository;
21
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
22 21
import eu.etaxonomy.cdm.api.service.IReferenceService;
23 22
import eu.etaxonomy.cdm.model.agent.Person;
24 23
import eu.etaxonomy.cdm.model.agent.Team;
......
58 57
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
59 58
         * @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
60 59
         */
61
        public static Reference select(Shell shell, ConversationHolder conversation, Reference reference, boolean isInReference) {
62
            ExtReferenceSelectionDialog dialog = new ExtReferenceSelectionDialog(shell, conversation,
60
        public static Reference select(Shell shell, //ConversationHolder conversation,
61
                Reference reference, boolean isInReference) {
62
            ExtReferenceSelectionDialog dialog = new ExtReferenceSelectionDialog(shell, //conversation,
63 63
                    "Choose a reference", false, reference, isInReference);
64 64
            return getSelectionFromDialog(dialog);
65 65
        }
......
72 72
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
73 73
         * @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
74 74
         */
75
        public static Reference select(Shell shell, ConversationHolder conversation, Reference reference) {
76
            ExtReferenceSelectionDialog dialog = new ExtReferenceSelectionDialog(shell, conversation,
75
        public static Reference select(Shell shell, //ConversationHolder conversation,
76
                Reference reference) {
77
            ExtReferenceSelectionDialog dialog = new ExtReferenceSelectionDialog(shell, //conversation,
77 78
                    "Choose a reference", false, reference);
78 79
            return getSelectionFromDialog(dialog);
79 80
        }
......
92 93
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
93 94
         * @param multi a boolean.
94 95
         */
95
        protected ExtReferenceSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, Reference reference) {
96
            super(shell, conversation, title, multi, ExtReferenceSelectionDialog.class.getCanonicalName(), null);
96
        protected ExtReferenceSelectionDialog(Shell shell, //ConversationHolder conversation,
97
                String title, boolean multi, Reference reference) {
98
            super(shell, //conversation,
99
                    title, multi, ExtReferenceSelectionDialog.class.getCanonicalName(), null);
97 100
            this.currentReference = reference;
98 101

  
99 102
//            controller = CdmStore.getCurrentApplicationConfiguration();
......
117 120
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
118 121
         * @param multi a boolean.
119 122
         */
120
        protected ExtReferenceSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, Reference reference, boolean isInReference) {
121
            super(shell, conversation, title, multi, ExtReferenceSelectionDialog.class.getCanonicalName(), null);
123
        protected ExtReferenceSelectionDialog(Shell shell, //ConversationHolder conversation,
124
                String title, boolean multi, Reference reference, boolean isInReference) {
125
            super(shell, //conversation,
126
                    title, multi, ExtReferenceSelectionDialog.class.getCanonicalName(), null);
122 127
            this.isInReference = isInReference;
123 128
            this.currentReference = reference;
124 129

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureSelectionDialog.java
15 15

  
16 16
import org.eclipse.swt.widgets.Shell;
17 17

  
18
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
19 18
import eu.etaxonomy.cdm.api.service.ITermService;
20 19
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
21 20
import eu.etaxonomy.cdm.model.description.Feature;
......
31 30
public class FeatureSelectionDialog extends
32 31
		AbstractFilteredCdmResourceSelectionDialog<Feature> {
33 32

  
34
	public static Feature select(Shell shell, ConversationHolder conversation, Feature feature){
35
		FeatureSelectionDialog dialog = new FeatureSelectionDialog(shell, conversation,
33
	public static Feature select(Shell shell, //ConversationHolder conversation,
34
	        Feature feature){
35
		FeatureSelectionDialog dialog = new FeatureSelectionDialog(shell, //conversation,
36 36
				"Choose Feature", false, FeatureSelectionDialog.class.getCanonicalName(), feature);
37 37
		return getSelectionFromDialog(dialog);
38 38
	}
......
45 45
	 * @param settings
46 46
	 * @param cdmObject
47 47
	 */
48
	protected FeatureSelectionDialog(Shell shell,
49
			ConversationHolder conversation, String title, boolean multi,
48
	protected FeatureSelectionDialog(Shell shell,//ConversationHolder conversation,
49
			 String title, boolean multi,
50 50
			String settings, Feature cdmObject) {
51
		super(shell, conversation, title, multi, settings, cdmObject);
51
		super(shell,//conversation,
52
		        title, multi, settings, cdmObject);
52 53
	}
53 54

  
54 55
	@Override
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java
15 15

  
16 16
import org.eclipse.swt.widgets.Shell;
17 17

  
18
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
19 18
import eu.etaxonomy.cdm.api.service.IFeatureTreeService;
20 19
import eu.etaxonomy.cdm.model.description.FeatureTree;
21 20
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
......
30 29
public class FeatureTreeSelectionDialog extends
31 30
		AbstractFilteredCdmResourceSelectionDialog<FeatureTree> {
32 31

  
33
	public static FeatureTree select(Shell shell, ConversationHolder conversation, FeatureTree featureTree) {
34
		FeatureTreeSelectionDialog dialog = new FeatureTreeSelectionDialog(shell, conversation,
32
	public static FeatureTree select(Shell shell, //ConversationHolder conversation,
33
	        FeatureTree featureTree) {
34
		FeatureTreeSelectionDialog dialog = new FeatureTreeSelectionDialog(shell, //conversation,
35 35
				"Choose a feature tree", false, featureTree);
36 36
		return getSelectionFromDialog(dialog);
37 37
	}
38 38

  
39
	protected FeatureTreeSelectionDialog(Shell shell,
40
			ConversationHolder conversation, String title, boolean multi,
39
	protected FeatureTreeSelectionDialog(Shell shell,//ConversationHolder conversation,
40
			 String title, boolean multi,
41 41
			FeatureTree cdmObject) {
42
		super(shell, conversation, title, multi, FeatureTreeSelectionDialog.class.getCanonicalName(), cdmObject);
42
		super(shell, //conversation,
43
		        title, multi, FeatureTreeSelectionDialog.class.getCanonicalName(), cdmObject);
43 44
	}
44 45

  
45 46
	/** {@inheritDoc} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldUnitSelectionDialog.java
13 13

  
14 14
import org.eclipse.swt.widgets.Shell;
15 15

  
16
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
17 16
import eu.etaxonomy.cdm.api.service.IOccurrenceService;
18 17
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
19 18
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
......
41 40
	 * @param observation a {@link eu.etaxonomy.cdm.model.occurrence.FieldUnit} object.
42 41
	 * @return a {@link eu.etaxonomy.cdm.model.occurrence.FieldUnit} object.
43 42
	 */
44
	public static FieldUnit select(Shell shell, ConversationHolder conversation, FieldUnit observation){
45
		FieldUnitSelectionDialog dialog = new FieldUnitSelectionDialog(shell, conversation,
43
	public static FieldUnit select(Shell shell, //ConversationHolder conversation,
44
	        FieldUnit observation){
45
		FieldUnitSelectionDialog dialog = new FieldUnitSelectionDialog(shell, //conversation,
46 46
				"Choose Derived Unit", false, FieldUnitSelectionDialog.class.getCanonicalName(), observation);
47 47
		return getSelectionFromDialog(dialog);
48 48
	}
......
57 57
	 * @param settings a {@link java.lang.String} object.
58 58
	 * @param cdmObject a {@link eu.etaxonomy.cdm.model.occurrence.FieldUnit} object.
59 59
	 */
60
	protected FieldUnitSelectionDialog(Shell shell, ConversationHolder conversation,
60
	protected FieldUnitSelectionDialog(Shell shell, //ConversationHolder conversation,
61 61
			String title, boolean multi, String settings,
62 62
			FieldUnit cdmObject) {
63
		super(shell, conversation, title, multi, settings, cdmObject);
63
		super(shell, //conversation,
64
		        title, multi, settings, cdmObject);
64 65
	}
65 66

  
66 67
	/* (non-Javadoc)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java
16 16
import org.eclipse.swt.widgets.Shell;
17 17
import org.springframework.security.core.GrantedAuthority;
18 18

  
19
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
20 19
import eu.etaxonomy.cdm.api.service.IGrantedAuthorityService;
21 20
import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
22 21
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
......
32 31
 */
33 32
public class GrantedAuthoritySelectionDialog extends	AbstractFilteredCdmResourceSelectionDialog<GrantedAuthorityImpl> {
34 33

  
35
	public static GrantedAuthority select(Shell shell, ConversationHolder conversation, GrantedAuthorityImpl authority){
34
	public static GrantedAuthority select(Shell shell, //ConversationHolder conversation,
35
	        GrantedAuthorityImpl authority){
36 36

  
37
		GrantedAuthoritySelectionDialog dialog = new GrantedAuthoritySelectionDialog(shell, conversation,
37
		GrantedAuthoritySelectionDialog dialog = new GrantedAuthoritySelectionDialog(shell,//conversation,
38 38
				"Choose Granted Authority", false, GrantedAuthoritySelectionDialog.class.getCanonicalName(), authority);
39 39

  
40 40
		return getSelectionFromDialog(dialog);
......
48 48
	 * @param settings
49 49
	 * @param cdmObject
50 50
	 */
51
	protected GrantedAuthoritySelectionDialog(Shell shell,
52
			ConversationHolder conversation, String title, boolean multi,
51
	protected GrantedAuthoritySelectionDialog(Shell shell,//ConversationHolder conversation,
52
	        String title, boolean multi,
53 53
			String settings, GrantedAuthorityImpl cdmObject) {
54
		super(shell, conversation, title, multi, settings, cdmObject);
54
		super(shell, //conversation,
55
		        title, multi, settings, cdmObject);
55 56
	}
56 57

  
57 58
	/* (non-Javadoc)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java
15 15

  
16 16
import org.eclipse.swt.widgets.Shell;
17 17

  
18
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
19 18
import eu.etaxonomy.cdm.api.service.IGroupService;
20 19
import eu.etaxonomy.cdm.model.common.Group;
21 20
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
......
31 30
public class GroupSelectionDialog extends
32 31
		AbstractFilteredCdmResourceSelectionDialog<Group> {
33 32

  
34
	public static Group select(Shell shell, ConversationHolder conversation, Group group){
35
		GroupSelectionDialog dialog = new GroupSelectionDialog(shell, conversation,
33
	public static Group select(Shell shell, //ConversationHolder conversation,
34
	        Group group){
35
		GroupSelectionDialog dialog = new GroupSelectionDialog(shell, //conversation,
36 36
				"Choose Group", false, GroupSelectionDialog.class.getCanonicalName(), group);
37 37
		return getSelectionFromDialog(dialog);
38 38
	}
......
45 45
	 * @param settings
46 46
	 * @param cdmObject
47 47
	 */
48
	protected GroupSelectionDialog(Shell shell,
49
			ConversationHolder conversation, String title, boolean multi,
48
	protected GroupSelectionDialog(Shell shell,//ConversationHolder conversation,
49
	        String title, boolean multi,
50 50
			String settings, Group cdmObject) {
51
		super(shell, conversation, title, multi, settings, cdmObject);
51
		super(shell, //conversation,
52
		        title, multi, settings, cdmObject);
52 53
	}
53 54

  
54 55
	/* (non-Javadoc)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java
13 13

  
14 14
import org.eclipse.swt.widgets.Shell;
15 15

  
16
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
17 16
import eu.etaxonomy.cdm.api.service.IAgentService;
18 17
import eu.etaxonomy.cdm.model.agent.AgentBase;
19 18
import eu.etaxonomy.cdm.model.agent.Institution;
......
29 28
public class InstitutionSelectionDialog extends
30 29
		AbstractFilteredCdmResourceSelectionDialog<Institution> {
31 30

  
32
	public static Institution select(Shell shell, ConversationHolder conversation, Institution institution){
33
		InstitutionSelectionDialog dialog = new InstitutionSelectionDialog(shell, conversation,
31
	public static Institution select(Shell shell,// ConversationHolder conversation,
32
	        Institution institution){
33
		InstitutionSelectionDialog dialog = new InstitutionSelectionDialog(shell, //conversation,
34 34
				"Choose Institution", false, TeamSelectionDialog.class.getCanonicalName(), institution);
35 35
		return getSelectionFromDialog(dialog);
36 36
	}
......
43 43
	 * @param settings
44 44
	 * @param cdmObject
45 45
	 */
46
	protected InstitutionSelectionDialog(Shell shell,
47
			ConversationHolder conversation, String title, boolean multi,
46
	protected InstitutionSelectionDialog(Shell shell,//ConversationHolder conversation,
47
	        String title, boolean multi,
48 48
			String settings, Institution cdmObject) {
49
		super(shell, conversation, title, multi, settings, cdmObject);
49
		super(shell, //conversation,
50
		        title, multi, settings, cdmObject);
50 51
	}
51 52

  
52 53
	/* (non-Javadoc)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/MediaSelectionDialog.java
12 12

  
13 13
import org.eclipse.swt.widgets.Shell;
14 14

  
15
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
16 15
import eu.etaxonomy.cdm.api.service.IMediaService;
17 16
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
18 17
import eu.etaxonomy.cdm.model.media.Media;
......
28 27
public class MediaSelectionDialog extends
29 28
AbstractFilteredCdmResourceSelectionDialog<Media> {
30 29

  
31
    public static Media select(Shell shell, ConversationHolder conversation, Media media){
32
        MediaSelectionDialog dialog = new MediaSelectionDialog(shell, conversation,
30
    public static Media select(Shell shell, //ConversationHolder conversation,
31
            Media media){
32
        MediaSelectionDialog dialog = new MediaSelectionDialog(shell, //conversation,
33 33
                "Choose Media", false, MediaSelectionDialog.class.getCanonicalName(), media);
34 34
        return getSelectionFromDialog(dialog);
35 35
    }
......
37 37
    /**
38 38
     * <p>Constructor for FilteredDerivedUnitSelectionDialog.</p>
39 39
     */
40
    protected MediaSelectionDialog(Shell shell, ConversationHolder conversation, String title,
40
    protected MediaSelectionDialog(Shell shell, //ConversationHolder conversation,
41
            String title,
41 42
            boolean multi, String settings, Media cdmObject) {
42
        super(shell, conversation, title, multi, settings, cdmObject);
43
        super(shell, //conversation,
44
                title, multi, settings, cdmObject);
43 45
    }
44 46

  
45 47
    /** {@inheritDoc} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java
15 15
import org.eclipse.swt.widgets.Shell;
16 16
import org.eclipse.swt.widgets.Text;
17 17

  
18
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
19 18
import eu.etaxonomy.cdm.api.service.INameService;
20 19
import eu.etaxonomy.cdm.model.name.TaxonName;
21 20
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
......
28 27
 */
29 28
public class NameSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<TaxonName> {
30 29

  
31
	public static TaxonName select(Shell shell, ConversationHolder conversation, TaxonName name) {
32
		NameSelectionDialog dialog = new NameSelectionDialog(shell, conversation,
30
	public static TaxonName select(Shell shell, //ConversationHolder conversation,
31
	        TaxonName name) {
32
		NameSelectionDialog dialog = new NameSelectionDialog(shell, //conversation,
33 33
				"Choose a name", false, name);
34 34
		return getSelectionFromDialog(dialog);
35 35
	}
36 36

  
37
	protected NameSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, TaxonName name) {
38
		super(shell, conversation, title, multi, NameSelectionDialog.class.getCanonicalName(), name);
37
	protected NameSelectionDialog(Shell shell, //ConversationHolder conversation,
38
	        String title, boolean multi, TaxonName name) {
39
		super(shell, //conversation,
40
		        title, multi, NameSelectionDialog.class.getCanonicalName(), name);
39 41
	}
40 42

  
41 43
	/** {@inheritDoc} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
27 27
import org.eclipse.swt.widgets.Text;
28 28
import org.eclipse.wb.swt.ResourceManager;
29 29

  
30
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
31 30
import eu.etaxonomy.cdm.api.service.ITermService;
32 31
import eu.etaxonomy.cdm.api.service.IVocabularyService;
33 32
import eu.etaxonomy.cdm.model.common.CdmBase;
......
88 87
	 * @param preselectedVocabularyUuids the {@link UUID}s of the pre-selected vocabularies
89 88
	 * @return a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
90 89
	 */
91
	public static NamedArea select(Shell shell, ConversationHolder conversation, NamedArea namedArea, String preferenceId, UUID... preselectedVocabularyUuids) {
92
		NamedAreaSelectionDialog dialog = new NamedAreaSelectionDialog(shell, conversation,
90
	public static NamedArea select(Shell shell, //ConversationHolder conversation,
91
	        NamedArea namedArea, String preferenceId, UUID... preselectedVocabularyUuids) {
92
		NamedAreaSelectionDialog dialog = new NamedAreaSelectionDialog(shell, //conversation,
93 93
				"Choose an area", false, namedArea, preferenceId, preselectedVocabularyUuids);
94 94
		return getSelectionFromDialog(dialog);
95 95
	}
96 96

  
97
	protected NamedAreaSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, NamedArea namedArea, Object preferenceId, UUID... preselectedVocabularyUuids) {
98
		super(shell, conversation, title, multi, NamedAreaSelectionDialog.class.getCanonicalName(), namedArea);
97
	protected NamedAreaSelectionDialog(Shell shell, //ConversationHolder conversation,
98
	        String title, boolean multi, NamedArea namedArea, Object preferenceId, UUID... preselectedVocabularyUuids) {
99
		super(shell, //conversation,
100
		        title, multi, NamedAreaSelectionDialog.class.getCanonicalName(), namedArea);
99 101
		this.preferenceID = preferenceId;
100 102
		preselectedVocabularies = new ArrayList<TermVocabulary>();
101 103
		for(int i=0;i<preselectedVocabularyUuids.length;i++){
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorSelectionDialog.java
19 19
import org.eclipse.swt.widgets.Shell;
20 20
import org.eclipse.swt.widgets.Text;
21 21

  
22
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
23 22
import eu.etaxonomy.cdm.api.service.IAgentService;
24 23
import eu.etaxonomy.cdm.model.agent.AgentBase;
25 24
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
......
47 46
     * @param settings
48 47
     * @param agent
49 48
     */
50
    protected NomenclaturalAuthorSelectionDialog(Shell shell, ConversationHolder conversation, String title,
49
    protected NomenclaturalAuthorSelectionDialog(Shell shell, //ConversationHolder conversation,
50
            String title,
51 51
            boolean multi, String settings, AgentBase agent, boolean teamMemberSelection) {
52
        super(shell, conversation, title, multi, settings, agent, teamMemberSelection);
52
        super(shell, //conversation,
53
                title, multi, settings, agent, teamMemberSelection);
53 54
        // TODO Auto-generated constructor stub
54 55
    }
55 56

  
......
98 99
     * @param entity a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
99 100
     * @return a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
100 101
     */
101
    public static AgentBase select(Shell shell, ConversationHolder conversation, AgentBase entity, boolean teamMemberSelection) {
102
        NomenclaturalAuthorSelectionDialog dialog = new NomenclaturalAuthorSelectionDialog(shell, conversation,
102
    public static AgentBase select(Shell shell, //ConversationHolder conversation,
103
            AgentBase entity, boolean teamMemberSelection) {
104
        NomenclaturalAuthorSelectionDialog dialog = new NomenclaturalAuthorSelectionDialog(shell, //conversation,
103 105
                "Choose Agent", false, NomenclaturalAuthorSelectionDialog.class.getCanonicalName(), entity, teamMemberSelection);
104 106
        return getSelectionFromDialog(dialog);
105 107
    }
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java
15 15
import org.eclipse.swt.widgets.Shell;
16 16
import org.eclipse.swt.widgets.Text;
17 17

  
18
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
19 18
import eu.etaxonomy.cdm.api.service.IAgentService;
20 19
import eu.etaxonomy.cdm.model.agent.AgentBase;
21 20
import eu.etaxonomy.cdm.model.agent.Team;
......
42 41
	 * @param team a {@link eu.etaxonomy.cdm.model.agent.Team} object.
43 42
	 * @return a {@link eu.etaxonomy.cdm.model.agent.Team} object.
44 43
	 */
45
	public static Team select(Shell shell, ConversationHolder conversation, Team team){
46
		NomenclaturalAuthorTeamSelectionDialog dialog = new NomenclaturalAuthorTeamSelectionDialog(shell, conversation,
44
	public static Team select(Shell shell, //ConversationHolder conversation,
45
	        Team team){
46
		NomenclaturalAuthorTeamSelectionDialog dialog = new NomenclaturalAuthorTeamSelectionDialog(shell, //conversation,
47 47
				"Choose Author Team", false, NomenclaturalAuthorTeamSelectionDialog.class.getCanonicalName(), team);
48 48
		return (Team)getSelectionFromDialog(dialog);
49 49
	}
......
58 58
	 * @param settings a {@link java.lang.String} object.
59 59
	 * @param agent a {@link eu.etaxonomy.cdm.model.agent.Team} object.
60 60
	 */
61
	protected NomenclaturalAuthorTeamSelectionDialog(Shell shell, ConversationHolder conversation, String title,
61
	protected NomenclaturalAuthorTeamSelectionDialog(Shell shell, //ConversationHolder conversation,
62
	        String title,
62 63
			boolean multi, String settings, Team agent) {
63
		super(shell, conversation, title, multi, settings, agent);
64
		super(shell, //conversation,
65
		        title, multi, settings, agent);
64 66
	}
65 67

  
66 68
	/** {@inheritDoc} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalPersonAuthorSelectionDialog.java
12 12
import org.eclipse.swt.widgets.Shell;
13 13
import org.eclipse.swt.widgets.Text;
14 14

  
15
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
16 15
import eu.etaxonomy.cdm.api.service.IAgentService;
17 16
import eu.etaxonomy.cdm.model.agent.AgentBase;
18 17
import eu.etaxonomy.cdm.model.agent.Person;
......
33 32
     * @param settings
34 33
     * @param agent
35 34
     */
36
    protected NomenclaturalPersonAuthorSelectionDialog(Shell shell, ConversationHolder conversation, String title,
35
    protected NomenclaturalPersonAuthorSelectionDialog(Shell shell, //ConversationHolder conversation,
36
            String title,
37 37
            boolean multi, String settings, AgentBase agent, boolean teamMemberSelection) {
38
        super(shell, conversation, title, multi, settings, agent, teamMemberSelection);
38
        super(shell, //conversation,
39
                title, multi, settings, agent, teamMemberSelection);
39 40
        // TODO Auto-generated constructor stub
40 41
    }
41 42

  
......
48 49
     * @param entity a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
49 50
     * @return a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
50 51
     */
51
    public static AgentBase select(Shell shell, ConversationHolder conversation, AgentBase entity, boolean teamMemberSelection) {
52
        NomenclaturalPersonAuthorSelectionDialog dialog = new NomenclaturalPersonAuthorSelectionDialog(shell, conversation,
52
    public static AgentBase select(Shell shell, //ConversationHolder conversation,
53
            AgentBase entity, boolean teamMemberSelection) {
54
        NomenclaturalPersonAuthorSelectionDialog dialog = new NomenclaturalPersonAuthorSelectionDialog(shell, //conversation,
53 55
                "Choose Agent", false, NomenclaturalAuthorSelectionDialog.class.getCanonicalName(), entity,teamMemberSelection);
54 56
        return getSelectionFromDialog(dialog);
55 57
    }
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalReferenceSelectionDialog.java
9 9
import org.eclipse.swt.widgets.Shell;
10 10
import org.eclipse.swt.widgets.Text;
11 11

  
12
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
13 12
import eu.etaxonomy.cdm.api.service.IReferenceService;
14 13
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
15 14
import eu.etaxonomy.cdm.model.reference.Reference;
......
24 23
    private TeamOrPersonBase author;
25 24
    private boolean firstCall = true;
26 25

  
27
	protected NomenclaturalReferenceSelectionDialog(Shell shell,
28
			ConversationHolder conversation, String title, boolean multi,
26
	protected NomenclaturalReferenceSelectionDialog(Shell shell,//ConversationHolder conversation,
27
			 String title, boolean multi,
29 28
			Reference reference, boolean inReference, TeamOrPersonBase author) {
30
		super(shell, conversation, title, multi, reference);
29
		super(shell, //conversation,
30
		        title, multi, reference);
31 31
		this.author = author;
32 32
		firstCall = true;
33 33

  
......
79 79
	 * @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
80 80
	 */
81 81

  
82
	public static Reference select(Shell shell, ConversationHolder conversation, Reference reference, TeamOrPersonBase author) {
83
		NomenclaturalReferenceSelectionDialog dialog = new NomenclaturalReferenceSelectionDialog(shell, conversation,
82
	public static Reference select(Shell shell, //ConversationHolder conversation,
83
	        Reference reference, TeamOrPersonBase author) {
84
		NomenclaturalReferenceSelectionDialog dialog = new NomenclaturalReferenceSelectionDialog(shell,// conversation,
84 85
				"Choose a reference", isInReference, reference, false, author);
85 86
		return getSelectionFromDialog(dialog);
86 87
	}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java
13 13

  
14 14
import org.eclipse.swt.widgets.Shell;
15 15

  
16
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
17 16
import eu.etaxonomy.cdm.api.service.IAgentService;
18 17
import eu.etaxonomy.cdm.model.agent.Person;
19 18
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
......
38 37
	 * @param person a {@link eu.etaxonomy.cdm.model.agent.Person} object.
39 38
	 * @return a {@link eu.etaxonomy.cdm.model.agent.Person} object.
40 39
	 */
41
	public static Person select(Shell shell, ConversationHolder conversation, Person person){
42
		PersonSelectionDialog dialog = new PersonSelectionDialog(shell, conversation,
40
	public static Person select(Shell shell, //onversationHolder conversation,
41
	        Person person){
42
		PersonSelectionDialog dialog = new PersonSelectionDialog(shell, //conversation,
43 43
				"Choose a person", false, PersonSelectionDialog.class.getCanonicalName(), person);
44 44
		return getSelectionFromDialog(dialog);
45 45
	}
......
54 54
	 * @param cdmObject a {@link eu.etaxonomy.cdm.model.agent.Person} object.
55 55
	 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
56 56
	 */
57
	protected PersonSelectionDialog(Shell shell, ConversationHolder conversation, String title,
57
	protected PersonSelectionDialog(Shell shell,// ConversationHolder conversation,
58
	        String title,
58 59
			boolean multi, String settings, Person cdmObject) {
59
		super(shell, conversation, title, multi, settings, cdmObject);
60
		super(shell, //conversation,
61
		        title, multi, settings, cdmObject);
60 62
	}
61 63

  
62 64

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PolytomousKeySelectionDialog.java
13 13

  
14 14
import org.eclipse.swt.widgets.Shell;
15 15

  
16
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
17 16
import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
18 17
import eu.etaxonomy.cdm.model.description.PolytomousKey;
19 18
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
......
27 26
public class PolytomousKeySelectionDialog extends
28 27
		AbstractFilteredCdmResourceSelectionDialog<PolytomousKey> {
29 28

  
30
	public static PolytomousKey select(Shell shell, ConversationHolder conversation, PolytomousKey key){
31
		PolytomousKeySelectionDialog dialog = new PolytomousKeySelectionDialog(shell, conversation,
29
	public static PolytomousKey select(Shell shell, //ConversationHolder conversation,
30
	        PolytomousKey key){
31
		PolytomousKeySelectionDialog dialog = new PolytomousKeySelectionDialog(shell, //conversation,
32 32
				"Choose Polytomous Key", false, PolytomousKeySelectionDialog.class.getCanonicalName(), key);
33 33
		return getSelectionFromDialog(dialog);
34 34
	}
......
41 41
	 * @param settings
42 42
	 * @param cdmObject
43 43
	 */
44
	protected PolytomousKeySelectionDialog(Shell shell,
45
			ConversationHolder conversation, String title, boolean multi,
44
	protected PolytomousKeySelectionDialog(Shell shell,//ConversationHolder conversation,
45
			 String title, boolean multi,
46 46
			String settings, PolytomousKey cdmObject) {
47
		super(shell, conversation, title, multi, settings, cdmObject);
47
		super(shell, //conversation,
48
		        title, multi, settings, cdmObject);
48 49
	}
49 50

  
50 51
	/* (non-Javadoc)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PrimerSelectionDialog.java
12 12

  
13 13
import org.eclipse.swt.widgets.Shell;
14 14

  
15
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
16 15
import eu.etaxonomy.cdm.api.service.molecular.IPrimerService;
17 16
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
18 17
import eu.etaxonomy.cdm.model.molecular.Primer;
......
29 28
public class PrimerSelectionDialog extends
30 29
AbstractFilteredCdmResourceSelectionDialog<Primer> {
31 30

  
32
    public static Primer select(Shell shell, ConversationHolder conversation, Primer primer){
33
        PrimerSelectionDialog dialog = new PrimerSelectionDialog(shell, conversation,
31
    public static Primer select(Shell shell, //ConversationHolder conversation,
32
            Primer primer){
33
        PrimerSelectionDialog dialog = new PrimerSelectionDialog(shell, //conversation,
34 34
                "Choose Primer", false, PrimerSelectionDialog.class.getCanonicalName(), primer);
35 35
        return getSelectionFromDialog(dialog);
36 36
    }
......
38 38
    /**
39 39
     * <p>Constructor for FilteredDerivedUnitSelectionDialog.</p>
40 40
     */
41
    protected PrimerSelectionDialog(Shell shell, ConversationHolder conversation, String title,
41
    protected PrimerSelectionDialog(Shell shell, //ConversationHolder conversation,
42
            String title,
42 43
            boolean multi, String settings, Primer cdmObject) {
43
        super(shell, conversation, title, multi, settings, cdmObject);
44
        super(shell, //conversation,
45
                title, multi, settings, cdmObject);
44 46
    }
45 47

  
46 48
    /** {@inheritDoc} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java
15 15
import org.eclipse.swt.widgets.Shell;
16 16
import org.eclipse.swt.widgets.Text;
17 17

  
18
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
19 18
import eu.etaxonomy.cdm.api.service.IReferenceService;
20 19
import eu.etaxonomy.cdm.model.reference.Reference;
21 20
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
......
42 41
	 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
43 42
	 * @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
44 43
	 */
45
	public static Reference select(Shell shell, ConversationHolder conversation, Reference reference, boolean isInReference) {
46
		ReferenceSelectionDialog dialog = new ReferenceSelectionDialog(shell, conversation,
44
	public static Reference select(Shell shell, //ConversationHolder conversation,
45
	        Reference reference, boolean isInReference) {
46
		ReferenceSelectionDialog dialog = new ReferenceSelectionDialog(shell, //conversation,
47 47
				"Choose a reference", false, reference, isInReference);
48 48
		return getSelectionFromDialog(dialog);
49 49
	}
......
56 56
     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
57 57
     * @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
58 58
     */
59
    public static Reference select(Shell shell, ConversationHolder conversation, Reference reference) {
60
        ReferenceSelectionDialog dialog = new ReferenceSelectionDialog(shell, conversation,
59
    public static Reference select(Shell shell, //ConversationHolder conversation,
60
            Reference reference) {
61
        ReferenceSelectionDialog dialog = new ReferenceSelectionDialog(shell, //conversation,
61 62
                "Choose a reference", false, reference);
62 63
        return getSelectionFromDialog(dialog);
63 64
    }
......
73 74
	 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
74 75
	 * @param multi a boolean.
75 76
	 */
76
	protected ReferenceSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, Reference reference) {
77
		super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), null);
77
	protected ReferenceSelectionDialog(Shell shell, //ConversationHolder conversation,
78
	        String title, boolean multi, Reference reference) {
79
		super(shell, //conversation,
80
		        title, multi, ReferenceSelectionDialog.class.getCanonicalName(), null);
78 81
		this.currentReference = reference;
79 82

  
80 83

  
......
92 95
     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
93 96
     * @param multi a boolean.
94 97
     */
95
    protected ReferenceSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, Reference reference, boolean isInReference) {
96
        super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), null);
98
    protected ReferenceSelectionDialog(Shell shell, //ConversationHolder conversation,
99
            String title, boolean multi, Reference reference, boolean isInReference) {
100
        super(shell, //conversation,
101
                title, multi, ReferenceSelectionDialog.class.getCanonicalName(), null);
97 102
        this.isInReference = isInReference;
98 103
        this.currentReference = reference;
99 104

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/RightsSelectionDialog.java
14 14
import org.eclipse.swt.widgets.Shell;
15 15
import org.eclipse.swt.widgets.Text;
16 16

  
17
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
18 17
import eu.etaxonomy.cdm.api.service.IRightsService;
19 18
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
20 19
import eu.etaxonomy.cdm.model.media.Rights;
......
30 29
public class RightsSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<Rights> {
31 30

  
32 31

  
33
    public static Rights select(Shell shell, ConversationHolder conversation, Rights rights){
34
        RightsSelectionDialog dialog = new RightsSelectionDialog(shell, conversation,
32
    public static Rights select(Shell shell, //ConversationHolder conversation,
33
            Rights rights){
34
        RightsSelectionDialog dialog = new RightsSelectionDialog(shell, //conversation,
35 35
                "Choose Rights", false, RightsSelectionDialog.class.getCanonicalName(), rights);
36 36
        return getSelectionFromDialog(dialog);
37 37
    }
......
39 39
    /**
40 40
     * <p>Constructor for FilteredDerivedUnitSelectionDialog.</p>
41 41
     */
42
    protected RightsSelectionDialog(Shell shell, ConversationHolder conversation, String title,
42
    protected RightsSelectionDialog(Shell shell, //ConversationHolder conversation,
43
            String title,
43 44
            boolean multi, String settings, Rights rights) {
44
        super(shell, conversation, title, multi, settings, rights);
45
        super(shell, //conversation,
46
                title, multi, settings, rights);
45 47
    }
46 48

  
47 49
    /**
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java
10 10

  
11 11
import org.eclipse.swt.widgets.Shell;
12 12

  
13
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
14 13
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
15 14
import eu.etaxonomy.cdm.model.agent.AgentBase;
16 15
import eu.etaxonomy.cdm.model.agent.Institution;
......
57 56
 */
58 57
public class SelectionDialogFactory {
59 58

  
60
    public static <T extends ICdmBase> T getSelectionFromDialog(Class<T> clazz, Shell shell, ConversationHolder conversation, T currentSelection){
61
        return getSelectionFromDialog(clazz, shell, conversation, currentSelection, null);
59
    public static <T extends ICdmBase> T getSelectionFromDialog(Class<T> clazz, Shell shell, //ConversationHolder conversation,
60
            T currentSelection){
61
        return getSelectionFromDialog(clazz, shell, //conversation,
62
                currentSelection, null);
62 63
    }
63 64

  
64
	public static <T extends ICdmBase> T getSelectionFromDialog(Class<T> clazz, Shell shell, ConversationHolder conversation, T currentSelection, ICdmFormElement parentElement){
65
	public static <T extends ICdmBase> T getSelectionFromDialog(Class<T> clazz, Shell shell, //ConversationHolder conversation,
66
	        T currentSelection, ICdmFormElement parentElement){
65 67

  
66 68
		if(clazz.equals(Taxon.class)){
67
			return (T) TaxonBaseSelectionDialog.selectTaxon(shell, conversation, (Taxon) currentSelection);
69
			return (T) TaxonBaseSelectionDialog.selectTaxon(shell, //conversation,
70
			        (Taxon) currentSelection);
68 71
		}
69 72
		if(clazz.equals(Synonym.class)){
70
			return (T) TaxonBaseSelectionDialog.selectSynonym(shell, conversation);
73
			return (T) TaxonBaseSelectionDialog.selectSynonym(shell );//,conversation);
71 74
		}
72 75
		if(clazz.equals(TaxonBase.class)){
73
			return (T) TaxonBaseSelectionDialog.selectTaxonBase(shell, conversation);
76
			return (T) TaxonBaseSelectionDialog.selectTaxonBase(shell);//, conversation);
74 77
		}
75 78
		if(clazz.equals(Classification.class)){
76
			return (T) ClassificationSelectionDialog.select(shell, conversation, (Classification) currentSelection);
79
			return (T) ClassificationSelectionDialog.select(shell, //conversation,
80
			        (Classification) currentSelection);
77 81
		}
78 82
		if(clazz.equals(TaxonNode.class)){
79
			return (T) TaxonNodeSelectionDialog.select(shell, conversation, null, null, (TaxonNode) currentSelection, ((TaxonNode) currentSelection).getClassification());
83
			return (T) TaxonNodeSelectionDialog.select(shell, //conversation,
84
			        null, null, (TaxonNode) currentSelection, ((TaxonNode) currentSelection).getClassification());
80 85
		}
81 86
		if(clazz.equals(Reference.class) && parentElement instanceof NomenclaturalReferenceDetailElement){
82
			return (T) NomenclaturalReferenceSelectionDialog.select(shell, conversation, (Reference) currentSelection, ((NomenclaturalReferenceDetailElement)parentElement).getEntity().getCombinationAuthorship());
87
			return (T) NomenclaturalReferenceSelectionDialog.select(shell, //conversation,
88
			        (Reference) currentSelection, ((NomenclaturalReferenceDetailElement)parentElement).getEntity().getCombinationAuthorship());
83 89
		}
84 90
		if(clazz.equals(Reference.class)){
85 91
		    if (parentElement instanceof ReferenceDetailElement){
86
		        return (T) ReferenceSelectionDialog.select(shell, conversation, ((ReferenceDetailElement) parentElement).getEntity(), true);
92
		        return (T) ReferenceSelectionDialog.select(shell, //conversation,
93
		                ((ReferenceDetailElement) parentElement).getEntity(), true);
87 94
		    }
88
			return (T) ReferenceSelectionDialog.select(shell, conversation, (Reference) currentSelection);
95
			return (T) ReferenceSelectionDialog.select(shell, //conversation,
96
			        (Reference) currentSelection);
89 97
		}
90 98

  
91 99
		if(clazz.equals(TaxonName.class)){
92
			return (T) NameSelectionDialog.select(shell, conversation, (TaxonName) currentSelection);
100
			return (T) NameSelectionDialog.select(shell, //conversation,
101
			        (TaxonName) currentSelection);
93 102
		}
94 103
		if(clazz.equals(Team.class)){
95
			return (T) TeamSelectionDialog.select(shell, conversation, (Team) currentSelection);
104
			return (T) TeamSelectionDialog.select(shell, //conversation,
105
			        (Team) currentSelection);
96 106
		}
97 107
		if(clazz.equals(TeamOrPersonBase.class) && parentElement instanceof AuthorshipDetailElement){
98
            return (T) NomenclaturalAuthorSelectionDialog.select(shell, conversation, (AgentBase) currentSelection, false);
108
            return (T) NomenclaturalAuthorSelectionDialog.select(shell, //conversation,
109
                    (AgentBase) currentSelection, false);
99 110
        }else if(clazz.equals(TeamOrPersonBase.class)){
100 111
		    //TODO: add TeamOrPersonBaseSelectionDialog (see ticket #4545)
101
		    return (T) AgentSelectionDialog.select(shell, conversation, (AgentBase) currentSelection, false);
112
		    return (T) AgentSelectionDialog.select(shell, //conversation,
113
		            (AgentBase) currentSelection, false);
102 114
		}
103 115
		if(clazz.equals(Person.class) && parentElement instanceof TeamMemberElement){
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff