use the CdmFilteredSelectionDialog
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / dialog / selection / TaxonNodeSelectionDialog.java
index 35239371ca5ab3ccaa73602f62ed12fe85a1c447..9392a4c4cb4c4ead6600998cdfdfbd485986dc4e 100644 (file)
@@ -19,6 +19,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IClassificationService;
@@ -126,6 +127,12 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
                // default to first tree
                // TODO this will be problematic and can only be seen as workaround
 
+           Control control = getPatternControl();
+        String pattern = null;
+        if (control != null){
+            pattern = ((Text)control).getText();
+        }
+
 
                if(classifications == null){
                        classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, null);
@@ -143,7 +150,7 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
                        }
                }
 
-               model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification.getUuid(), excludeTaxa);
+               model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification.getUuid(), excludeTaxa, limitOfInitialElements, pattern);
        }
 
        /** {@inheritDoc} */