commit 5aeccadc9ccec37d8617256e1a8d1bf0147d70d4
Author: Katja Luther <k.luther@bgbm.org>
Date:   Tue Nov 21 13:28:48 2017 +0100

    e4 migration of selection dialogs

diff --git a/eu.etaxonomy.taxeditor.store/icons/funnel-exclamation-icon.png b/eu.etaxonomy.taxeditor.store/icons/funnel-exclamation-icon.png
new file mode 100755
index 000000000..e5c572020
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/funnel-exclamation-icon.png differ
diff --git a/eu.etaxonomy.taxeditor.store/icons/funnel-icon.png b/eu.etaxonomy.taxeditor.store/icons/funnel-icon.png
new file mode 100755
index 000000000..1f6960452
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/funnel-icon.png differ
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java
index 04d580ab8..c579a01b4 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java
@@ -10,6 +10,7 @@
 package eu.etaxonomy.taxeditor.ui.dialog.selection;
 
 import java.text.Collator;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashSet;
@@ -33,9 +34,8 @@ import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Link;
 import org.eclipse.swt.widgets.Shell;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
@@ -228,6 +228,9 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
     protected void fillContentProvider(IProgressMonitor progressMonitor)
 		throws CoreException {
 		try {
+		    if (model == null){
+		        model = new ArrayList<UuidAndTitleCache<T>>();
+		    }
 			if(model != null){
 			    if (progressMonitor != null){
 			        progressMonitor.beginTask("Looking for entities", model.size());
@@ -250,6 +253,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
 				}
 				this.refresh();
 			}else{
+
 				MessagingUtils.warn(getClass(), "Model for Filtered Selection is null:" + this.getClass().getSimpleName());
 			}
 		}
@@ -348,7 +352,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
 	 *
 	 * @return a {@link java.lang.String} object.
 	 */
-	protected abstract String getNewWizardLinkText();
+	protected abstract String[] getNewWizardText();
 
 	/**
 	 * <p>getNewEntityWizard</p>
@@ -377,19 +381,34 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
 	*/
 	/** {@inheritDoc} */
 
+//	@Override
+//    protected Control createExtendedContentArea(Composite parent) {
+//		String newWizardLinkText = getNewWizardLinkText();
+////        if(newWizardLinkText != null){
+////            newButton1 = this.createButton(this.getShell(), new_id, newWizardLinkText, false);
+////
+////            newButton1.addSelectionListener(getNewWizardLinkSelectionListener());
+////			return newButton1;
+////		}
+//		return null;
+//	}
+
 	@Override
-    protected Control createExtendedContentArea(Composite parent) {
-		String newWizardLinkText = getNewWizardLinkText();
-        if(newWizardLinkText != null){
-			Link link = new Link(parent, SWT.NONE);
-			link.setText(newWizardLinkText);
-			link.addSelectionListener(getNewWizardLinkSelectionListener());
-			return link;
-		}
-		return null;
-	}
+    protected void createButtonsForButtonBar(Composite parent) {
+	    String[] newButtonText = getNewWizardText();
+	    if (newButtonText!= null){
+	        this.newButton1 = createButton(parent, this.new_id, newButtonText[0], false);
+	        newButton1.addSelectionListener(getNewWizardButtonSelectionListener());
+	        if (newButtonText.length > 1){
+	            newButton2 = createButton(parent, this.new_id2, newButtonText[1], false);
+	            newButton2.addSelectionListener(getNewWizardButtonSelectionListener());
+	        }
+	    }
+
+        super.createButtonsForButtonBar(parent);
+    }
 
-	protected SelectionListener getNewWizardLinkSelectionListener(){
+	protected SelectionListener getNewWizardButtonSelectionListener(){
 		return new SelectionAdapter() {
 
 			/* (non-Javadoc)
@@ -397,8 +416,13 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
 			 */
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-
-			    AbstractNewEntityWizard wizard = getNewEntityWizard(e.text);
+			    Object source = e.getSource();
+			    String text = null;
+			    if (source instanceof Button){
+			        Button sourceButton = (Button) source;
+			        text = sourceButton.getText();
+			    }
+			    AbstractNewEntityWizard wizard = getNewEntityWizard(text);
 			    if(wizard!=null){
 			        wizard.init(null, null);
 			        if(wizard.getEntity() != null) {
@@ -457,4 +481,8 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
 			model.remove(uuidAndTitleCacheToRemove);
 		}
 	}
+	@Override
+	void createFilterButton(Composite searchAndFilter){
+	    //as default no filter button available
+	}
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java
index 4816ddaa7..142c82ed6 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java
@@ -41,11 +41,11 @@ public class AgentSelectionDialog extends
 	/**
 	 *
 	 */
-	protected static final String PERSON = "Person";
+	protected static final String PERSON = "new Person";
 	/**
 	 *
 	 */
-	protected static final String TEAM = "Team";
+	protected static final String TEAM = "new Team";
 
 	protected static boolean selectTeamMember;
 
@@ -124,19 +124,26 @@ public class AgentSelectionDialog extends
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
+	protected String[] getNewWizardText() {
+	    String[] result;
 		if (this.selectTeamMember){
-			return String.format("Create a new <a>%1s</a>", PERSON);
+		    result = new String[1];
+		    result[0] = PERSON;
+
+		}else{
+		    result = new String[2];
+            result[0] = PERSON;
+            result[1] = TEAM;
 		}
-		return String.format("Create a new <a>%1s</a> or <a>%2s</a>", TEAM, PERSON);
+		return result;
 	}
 
 	/* (non-Javadoc)
 	 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkSelectionListener()
 	 */
 	@Override
-	protected SelectionListener getNewWizardLinkSelectionListener() {
-		return super.getNewWizardLinkSelectionListener();
+	protected SelectionListener getNewWizardButtonSelectionListener() {
+		return super.getNewWizardButtonSelectionListener();
 	}
 
 	/** {@inheritDoc} */
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AmplificationSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AmplificationSelectionDialog.java
index ae6b5bca8..d43fbe1a9 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AmplificationSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AmplificationSelectionDialog.java
@@ -82,7 +82,9 @@ AbstractFilteredCdmResourceSelectionDialog<Amplification> {
 
     /** {@inheritDoc} */
     @Override
-    protected String getNewWizardLinkText() {
-        return String.format("Create a new <a>%1s</a>", "Amplification ");
+    protected String[] getNewWizardText() {
+        String[] result = new String[1];
+        result[0] = "Amplification";
+        return result;
     }
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ClassificationSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ClassificationSelectionDialog.java
index a699eac75..86f9b1d63 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ClassificationSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ClassificationSelectionDialog.java
@@ -11,7 +11,6 @@ package eu.etaxonomy.taxeditor.ui.dialog.selection;
 
 import java.util.UUID;
 
-import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
@@ -79,18 +78,18 @@ public class ClassificationSelectionDialog extends
 		super(shell, conversation, title, multi, settings, classification);
 	}
 
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see
-	 * org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea
-	 * (org.eclipse.swt.widgets.Composite)
-	 */
-	/** {@inheritDoc} */
-	@Override
-	protected Control createExtendedContentArea(Composite parent) {
-		return null;
-	}
+//	/*
+//	 * (non-Javadoc)
+//	 *
+//	 * @see
+//	 * org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea
+//	 * (org.eclipse.swt.widgets.Composite)
+//	 */
+//	/** {@inheritDoc} */
+//	@Override
+//	protected Control createExtendedContentArea(Composite parent) {
+//		return null;
+//	}
 
 	/*
 	 * (non-Javadoc)
@@ -137,7 +136,7 @@ public class ClassificationSelectionDialog extends
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
+	protected String[] getNewWizardText() {
 		return null;
 	}
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java
index 52ad42e4d..8d0a345b5 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java
@@ -83,8 +83,8 @@ public class CollectionSelectionDialog extends
 	 */
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
-        return String.format("Create a new <a>%1s</a>", "Collection ");
+	protected String[] getNewWizardText() {
+        return new String[]{ "Collection "};
 	}
 
 	/* (non-Javadoc)
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java
index 2907566c3..56d3dd2cc 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java
@@ -90,7 +90,7 @@ public class DerivedUnitSelectionDialog extends
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "Unit ");
+	protected String[] getNewWizardText() {
+		return new String[]{ "Unit "};
 	}
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ExtReferenceSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ExtReferenceSelectionDialog.java
index 0d06603bb..0175b320e 100755
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ExtReferenceSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ExtReferenceSelectionDialog.java
@@ -250,8 +250,8 @@ public class ExtReferenceSelectionDialog extends
 
         /** {@inheritDoc} */
         @Override
-        protected String getNewWizardLinkText() {
-            return String.format("Create a new <a>%1s</a>", "Reference ");
+        protected String[] getNewWizardText() {
+            return new String[]{"Reference "};
         }
 
     }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureSelectionDialog.java
index 4ffb2a844..d3ff2dca8 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureSelectionDialog.java
@@ -1,8 +1,8 @@
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* 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.
 */
@@ -36,7 +36,7 @@ public class FeatureSelectionDialog extends
 				"Choose Feature", false, FeatureSelectionDialog.class.getCanonicalName(), feature);
 		return getSelectionFromDialog(dialog);
 	}
-	
+
 	/**
 	 * @param shell
 	 * @param conversation
@@ -53,27 +53,27 @@ public class FeatureSelectionDialog extends
 
 	@Override
 	protected Feature getPersistentObject(UUID uuid) {
-		
+
 		DefinedTermBase<?> term = CdmStore.getService(ITermService.class).load(uuid);
-		
+
 		if(term instanceof Feature){
 			return (Feature) term;
 		}
-		
+
 		return null;
 	}
 
 	@Override
 	protected void search() {
 		List<Feature> features = CdmStore.getService(ITermService.class).list(Feature.class, null, null, null, null);
-		
+
 		List<UuidAndTitleCache<Feature>> featureUuidAndTitleCache = new ArrayList<UuidAndTitleCache<Feature>>();
-		
+
 		for(Feature feature : features){
 			UuidAndTitleCache<Feature> uuidAndTitleCache = new UuidAndTitleCache<Feature>(Feature.class, feature.getUuid(), feature.getId(), feature.getTitleCache());
 			featureUuidAndTitleCache.add(uuidAndTitleCache);
 		}
-		
+
 		model =  featureUuidAndTitleCache;
 	}
 
@@ -81,7 +81,7 @@ public class FeatureSelectionDialog extends
 	 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
 	 */
 	@Override
-	protected String getNewWizardLinkText() {
+	protected String[] getNewWizardText() {
 		return null;
 	}
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java
index 68100a5d4..643b67792 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java
@@ -13,14 +13,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
 
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
@@ -71,37 +63,37 @@ public class FeatureTreeSelectionDialog extends
 		}
 	}
 
-	/** {@inheritDoc} */
-	@Override
-	protected Control createExtendedContentArea(Composite parent) {
-		Link link = new Link(parent, SWT.NONE);
-		link.setText(getNewWizardLinkText());
-		link.addListener (SWT.Selection, new Listener () {
-			@Override
-            public void handleEvent(Event event) {
-
-			    InputDialog input = new InputDialog(getShell(), "New feature tree", "Enter label for new feature tree", null, null);
-				int status = input.open();
-				if (status == IStatus.OK) {
-				    String label = input.getValue();
-				    if(label!=null){
-				        FeatureTree featureTree = FeatureTree.NewInstance();
-				        featureTree.setTitleCache(label, false);
-				        CdmStore.getService(IFeatureTreeService.class).save(featureTree);
-			            UuidAndTitleCache<FeatureTree> uuidAndTitleCache = new UuidAndTitleCache<FeatureTree>(FeatureTree.class, featureTree.getUuid(),featureTree.getId(), featureTree.getTitleCache());
-			            model.add(uuidAndTitleCache);
-			            setPattern(featureTree);
-				    }
-				}
-			}
-		});
-		return link;
-	}
+//	/** {@inheritDoc} */
+//	@Override
+//	protected Control createExtendedContentArea(Composite parent) {
+//		Link link = new Link(parent, SWT.NONE);
+//		link.setText(getNewWizardLinkText());
+//		link.addListener (SWT.Selection, new Listener () {
+//			@Override
+//            public void handleEvent(Event event) {
+//
+//			    InputDialog input = new InputDialog(getShell(), "New feature tree", "Enter label for new feature tree", null, null);
+//				int status = input.open();
+//				if (status == IStatus.OK) {
+//				    String label = input.getValue();
+//				    if(label!=null){
+//				        FeatureTree featureTree = FeatureTree.NewInstance();
+//				        featureTree.setTitleCache(label, false);
+//				        CdmStore.getService(IFeatureTreeService.class).save(featureTree);
+//			            UuidAndTitleCache<FeatureTree> uuidAndTitleCache = new UuidAndTitleCache<FeatureTree>(FeatureTree.class, featureTree.getUuid(),featureTree.getId(), featureTree.getTitleCache());
+//			            model.add(uuidAndTitleCache);
+//			            setPattern(featureTree);
+//				    }
+//				}
+//			}
+//		});
+//		return link;
+//	}
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>" , "Feature tree ");
+	protected String[] getNewWizardText() {
+		return new String[]{ "Feature tree "};
 	}
 
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldUnitSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldUnitSelectionDialog.java
index 66afa64d9..b0ba469c5 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldUnitSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldUnitSelectionDialog.java
@@ -97,7 +97,7 @@ public class FieldUnitSelectionDialog extends
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "Field Unit ");
+	protected String[] getNewWizardText() {
+		return new String[]{"Field Unit "};
 	}
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FilterDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FilterDialog.java
new file mode 100755
index 000000000..eb402edf1
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FilterDialog.java
@@ -0,0 +1,121 @@
+// $Id$
+/**
+* Copyright (C) 2017 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 java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.cdm.api.service.IVocabularyService;
+import eu.etaxonomy.cdm.model.common.TermType;
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author k.luther
+ * @date 21.11.2017
+ *
+ */
+public class FilterDialog extends Dialog {
+
+    List<TermVocabulary> vocabularies = new ArrayList<TermVocabulary>();
+
+    List<TermVocabulary> selectedVocabularies = new ArrayList<TermVocabulary>();
+
+    Object preferenceId;
+
+    /**
+     * @param parentShell
+     */
+    protected FilterDialog(Shell parentShell, Object preferenceId, List<TermVocabulary> selectedVocabularies) {
+        super(parentShell);
+        vocabularies = CdmStore.getService(IVocabularyService.class).listByTermType(TermType.NamedArea, true, null, null, null, null);
+        this.preferenceId = preferenceId;
+        List<TermVocabulary> tempSelectedVocabularies = new ArrayList<>();
+        this.selectedVocabularies = selectedVocabularies;
+
+    }
+
+    @Override
+    protected Control createDialogArea(Composite parent) {
+        Composite dialogArea = new Composite(parent, SWT.NULL);
+        dialogArea.setLayout(new GridLayout(1, false));
+        for (TermVocabulary voc: vocabularies){
+            Button btnCheckButton = new Button(dialogArea, SWT.CHECK);
+            btnCheckButton.setText(voc.getLabel());
+            btnCheckButton.setData(voc);
+            if (selectedVocabularies.contains(voc)){
+                btnCheckButton.setSelection(true);
+            }else {
+                btnCheckButton.setSelection(false);
+            }
+
+            btnCheckButton.addSelectionListener(new SelectionListener(){
+
+                @Override
+                public void widgetSelected(SelectionEvent e) {
+                   if (btnCheckButton.getSelection()){
+                       Object obj = btnCheckButton.getData();
+                       if (!selectedVocabularies.contains(btnCheckButton.getData())){
+                           selectedVocabularies.add((TermVocabulary)btnCheckButton.getData());
+                       }
+                   }else{
+                       if (selectedVocabularies.contains(btnCheckButton.getData())){
+                           selectedVocabularies.remove(btnCheckButton.getData());
+                       }
+                   }
+
+                }
+
+                @Override
+                public void widgetDefaultSelected(SelectionEvent e) {
+                    // TODO Auto-generated method stub
+
+                }
+
+            });
+        }
+
+        GridData gd_table = new GridData(SWT.CENTER, SWT.CENTER, true, true, 2, 1);
+        gd_table.heightHint = 231;
+        gd_table.widthHint = 543;
+
+        return dialogArea;
+
+    }
+
+    @Override
+    protected void okPressed(){
+        for (TermVocabulary voc: vocabularies){
+            if (selectedVocabularies.contains(voc)){
+                PreferencesUtil.getPreferenceStore().setValue(getPrefKey(voc), false);
+            } else{
+                PreferencesUtil.getPreferenceStore().setValue(getPrefKey(voc), true);
+            }
+        }
+        super.okPressed();
+    }
+
+    private String getPrefKey(TermVocabulary vocabulary){
+        return "hide_"+NamedAreaSelectionDialog.class.getCanonicalName()+vocabulary.getUuid()+preferenceId;
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java
index a2f128385..418d9d37c 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java
@@ -64,7 +64,7 @@ public class GrantedAuthoritySelectionDialog extends	AbstractFilteredCdmResource
 		model = new ArrayList<UuidAndTitleCache<GrantedAuthorityImpl>>();
 
 		for(GrantedAuthorityImpl authority : authorities){
-			
+
 			model.add(new UuidAndTitleCache<GrantedAuthorityImpl>(GrantedAuthorityImpl.class, authority.getUuid(), authority.getId(), String.format("%s", GrantedAuthorityLabelTextProvider.getText(authority))));
 		}
 	}
@@ -73,8 +73,8 @@ public class GrantedAuthoritySelectionDialog extends	AbstractFilteredCdmResource
 	 * @see eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
 	 */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "GrantedAuthority ");
+	protected String[] getNewWizardText() {
+		return new String[]{"GrantedAuthority "};
 	}
 
 	@Override
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java
index 5ba527cb1..9ad65a941 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java
@@ -69,8 +69,8 @@ public class GroupSelectionDialog extends
 	 * @see eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
 	 */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "Group ");
+	protected String[] getNewWizardText() {
+		return new String[]{"Group "};
 	}
 
 	/* (non-Javadoc)
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java
index 92beece52..b3ab56ff9 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java
@@ -74,8 +74,8 @@ public class InstitutionSelectionDialog extends
 	 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
 	 */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "Institution ");
+	protected String[] getNewWizardText() {
+		return new String[]{"Institution "};
 	}
 
 	/* (non-Javadoc)
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/MediaSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/MediaSelectionDialog.java
index 26a245aa9..bde77b2ed 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/MediaSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/MediaSelectionDialog.java
@@ -81,7 +81,7 @@ AbstractFilteredCdmResourceSelectionDialog<Media> {
 
     /** {@inheritDoc} */
     @Override
-    protected String getNewWizardLinkText() {
-        return "";
+    protected String[] getNewWizardText() {
+        return null;
     }
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java
index f23baf1d9..92b827885 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java
@@ -68,7 +68,7 @@ public class NameSelectionDialog extends AbstractFilteredCdmResourceSelectionDia
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "Name ");
+	protected String[] getNewWizardText() {
+		return new String[]{"Name "};
 	}
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
index 28b0d05c3..d4801afb2 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
@@ -16,11 +16,16 @@ import java.util.UUID;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
+import org.eclipse.wb.swt.ResourceManager;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.ITermService;
@@ -62,18 +67,12 @@ public class NamedAreaSelectionDialog extends
 			}
 			PreferencesUtil.getPreferenceStore().setValue(getPrefKey(vocabulary), !isChecked());
 			search();
-			try {
-                fillContentProvider(null);
-            } catch (CoreException coreException) {
-                // TODO Auto-generated catch block
-                coreException.printStackTrace();
-            }
 		}
 	}
 
 	protected List<TermVocabulary> selectedVocabularies;
     protected ArrayList<TermVocabulary> preselectedVocabularies;
-    private Object preferenceID;
+
 
 
 	/**
@@ -103,34 +102,40 @@ public class NamedAreaSelectionDialog extends
 			TermVocabulary preselectedVocabulary = CdmStore.getService(IVocabularyService.class).find(preselectedVocabularyUuids[i]);
 			preselectedVocabularies.add(preselectedVocabulary);
 		}
-		List<TermVocabulary> tempSelectedVocabularies = new ArrayList<>();
-		for(TermVocabulary vocabulary:selectedVocabularies){
+
+
+		selectedVocabularies = createSelectedVocabularies();;
+//		search;//re-init to consider pre-selected vocabularies
+	}
+
+    private List<TermVocabulary> createSelectedVocabularies() {
+        List<TermVocabulary> tempSelectedVocabularies = new ArrayList<TermVocabulary>();
+        for(TermVocabulary vocabulary:selectedVocabularies){
 			if(preselectedVocabularies.contains(vocabulary)
 					|| !PreferencesUtil.getPreferenceStore().getBoolean(getPrefKey(vocabulary))){
 				tempSelectedVocabularies.add(vocabulary);
 			}
 		}
-		selectedVocabularies = tempSelectedVocabularies;
-//		search;//re-init to consider pre-selected vocabularies
-	}
+        return tempSelectedVocabularies;
+    }
 
 	/** {@inheritDoc} */
-	@Override
-	protected void fillViewMenu(IMenuManager menuManager) {
-
-//		super.fillViewMenu(menuManager);
-
-		for(TermVocabulary<NamedArea> vocabulary : getAvailableVocabularies()){
-			IncludeNamedAreaVocabulary action = new IncludeNamedAreaVocabulary(vocabulary);
-			menuManager.add(action);
-			if(preselectedVocabularies.contains(vocabulary)) {
-			    action.setChecked(true);
-			}
-			else{
-				action.setChecked(!PreferencesUtil.getPreferenceStore().getBoolean(getPrefKey(vocabulary)));
-			}
-		}
-	}
+//	@Override
+//	protected void fillViewMenu(IMenuManager menuManager) {
+//
+////		super.fillViewMenu(menuManager);
+//
+//		for(TermVocabulary<NamedArea> vocabulary : getAvailableVocabularies()){
+//			IncludeNamedAreaVocabulary action = new IncludeNamedAreaVocabulary(vocabulary);
+//			menuManager.add(action);
+//			if(preselectedVocabularies.contains(vocabulary)) {
+//			    action.setChecked(true);
+//			}
+//			else{
+//				action.setChecked(!PreferencesUtil.getPreferenceStore().getBoolean(getPrefKey(vocabulary)));
+//			}
+//		}
+//	}
 
 	private String getPrefKey(TermVocabulary vocabulary){
 		return "hide_"+NamedAreaSelectionDialog.class.getCanonicalName()+vocabulary.getUuid()+preferenceID;
@@ -175,7 +180,12 @@ public class NamedAreaSelectionDialog extends
         }else{
             model = CdmStore.getService(ITermService.class).getUuidAndTitleCache(selectedVocabularies, limitOfInitialElements, pattern, PreferencesUtil.getGlobalLanguage());
         }
-
+       try {
+           fillContentProvider(null);
+        } catch (CoreException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
 //		Set<NamedArea> terms = new HashSet<NamedArea>();
 //		for(TermVocabulary<NamedArea> vocabulary : selectedVocabularies){
 //			terms.addAll(vocabulary.getTermsOrderedByLabels(CdmStore.getDefaultLanguage()));
@@ -192,11 +202,11 @@ public class NamedAreaSelectionDialog extends
 //		}
 	}
 
-	/** {@inheritDoc} */
-	@Override
-	protected Control createExtendedContentArea(Composite parent) {
-		return null;
-	}
+//	/** {@inheritDoc} */
+//	@Override
+//	protected Control createExtendedContentArea(Composite parent) {
+//		return null;
+//	}
 
 	/** {@inheritDoc} */
 	@Override
@@ -218,7 +228,54 @@ public class NamedAreaSelectionDialog extends
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
+	protected String[] getNewWizardText() {
 		return null;
 	}
+
+	@Override
+    void createFilterButton(Composite searchAndFilter)
+	    {
+            filterButton = new Button(searchAndFilter, SWT.NONE);
+//            filterButton.setText("Filter");
+            filterButton.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/funnel-icon.png"));
+//            SelectionListener filterSelectionListener = new FilterSelectionListener(preferenceID, this);
+            filterButton.addSelectionListener(new SelectionListener(){
+                @Override
+                public void widgetSelected(SelectionEvent e) {
+
+                        Object source = e.getSource();
+                        String text = null;
+                        if (source instanceof Button){
+                            Shell shell = ((Button)source).getShell();
+                            Dialog dialog = new FilterDialog(getShell(), preferenceID, selectedVocabularies);
+                            if(dialog!=null){
+                                dialog.open();
+                            }
+                            createSelectedVocabularies();
+                        }
+
+
+
+
+                }
+
+                @Override
+                public void widgetDefaultSelected(SelectionEvent e) {
+                    // TODO Auto-generated method stub
+
+                }
+
+
+            });
+
+        }
+
+    /**
+     *
+     */
+    public void setSelectedVocabularies() {
+        // TODO Auto-generated method stub
+
+    }
+
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java
index 625fd0617..70f55de3b 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java
@@ -71,8 +71,8 @@ public class NomenclaturalAuthorTeamSelectionDialog extends
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "Team ");
+	protected String[] getNewWizardText() {
+		return new String[]{"Team "};
 	}
 
 	/** {@inheritDoc} */
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java
index f1e8a3b9f..ef7867001 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java
@@ -87,7 +87,7 @@ public class PersonSelectionDialog extends
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "Person ");
+	protected String[] getNewWizardText() {
+		return new String[]{"Person"};
 	}
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PolytomousKeySelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PolytomousKeySelectionDialog.java
index b4852d810..25b24b4d8 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PolytomousKeySelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PolytomousKeySelectionDialog.java
@@ -67,7 +67,7 @@ public class PolytomousKeySelectionDialog extends
 	 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
 	 */
 	@Override
-	protected String getNewWizardLinkText() {
+	protected String[] getNewWizardText() {
 		return null;
 	}
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PrimerSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PrimerSelectionDialog.java
index 50c2e9437..3a45434ce 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PrimerSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PrimerSelectionDialog.java
@@ -82,7 +82,7 @@ AbstractFilteredCdmResourceSelectionDialog<Primer> {
 
     /** {@inheritDoc} */
     @Override
-    protected String getNewWizardLinkText() {
-        return String.format("Create a new <a>%1s</a>", "Primer ");
+    protected String[] getNewWizardText() {
+        return new String[]{"Primer "};
     }
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java
index f91c1c8d5..6a592342f 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java
@@ -158,8 +158,8 @@ public class ReferenceSelectionDialog extends AbstractFilteredCdmResourceSelecti
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "Reference ");
+	protected String[] getNewWizardText() {
+		return new String[]{"Reference "};
 	}
 
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/RightsSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/RightsSelectionDialog.java
index 1198a7aef..65572cabe 100755
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/RightsSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/RightsSelectionDialog.java
@@ -64,8 +64,8 @@ public class RightsSelectionDialog extends AbstractFilteredCdmResourceSelectionD
      * {@inheritDoc}
      */
     @Override
-    protected String getNewWizardLinkText() {
-        // TODO Auto-generated method stub
+    protected String[] getNewWizardText() {
+
         return null;
     }
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SearchDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SearchDialog.java
index 2aae223f3..d34098d02 100755
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SearchDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SearchDialog.java
@@ -17,9 +17,6 @@ import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
 
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -27,7 +24,6 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.LegacyActionTools;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.dialogs.Dialog;
@@ -54,8 +50,6 @@ import org.eclipse.swt.accessibility.AccessibleAdapter;
 import org.eclipse.swt.accessibility.AccessibleEvent;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.TraverseEvent;
 import org.eclipse.swt.events.TraverseListener;
 import org.eclipse.swt.graphics.Color;
@@ -65,21 +59,19 @@ import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.ToolItem;
 import org.eclipse.ui.IWorkbenchPreferenceConstants;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
-import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
 import org.eclipse.ui.internal.WorkbenchImages;
 import org.eclipse.ui.internal.WorkbenchMessages;
@@ -101,6 +93,11 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
         private TableViewer list;
         private Text searchField;
         private String title;
+        protected Button newButton1;
+
+
+        protected Button newButton2;
+        protected Button filterButton;
         private StructuredSelection currentSelection;
 
         // message to show user
@@ -112,8 +109,12 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
         private final RefreshCacheJob refreshCacheJob;
 
         private ToolBar toolBar;
-        private ToolItem toolItem;
         private MenuManager menuManager;
+
+        protected Object preferenceID;
+
+        protected final int new_id = 4;
+        protected final int new_id2 = 5;
         // Need to keep our own list of listeners
         private final ListenerList listeners = new ListenerList();
 
@@ -126,6 +127,7 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
             contentProvider = new ContentProvider();
             refreshCacheJob = new RefreshCacheJob();
 
+
         }
 
 
@@ -144,7 +146,15 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
 
             final Label headerLabel = createHeader(container);
 
-            searchField = new Text(container, SWT.SINGLE | SWT.BORDER | SWT.SEARCH | SWT.ICON_CANCEL);
+            Composite searchAndFilter = new Composite(container, container.getStyle());
+//            GridData gd_searchAndFilter = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
+            GridData gd_searchAndFilter =new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL);
+//            gd_searchAndFilter.widthHint = 576;
+            searchAndFilter.setLayoutData(gd_searchAndFilter);
+            GridLayout searchAndFilterLayout = new GridLayout();
+            searchAndFilterLayout.numColumns = 2;
+            searchAndFilter.setLayout(searchAndFilterLayout);
+            searchField = new Text(searchAndFilter, SWT.SINGLE | SWT.BORDER | SWT.SEARCH | SWT.ICON_CANCEL);
             searchField.getAccessible().addAccessibleListener(new AccessibleAdapter() {
                 @Override
                 public void getName(AccessibleEvent e) {
@@ -164,12 +174,15 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
                     }
                 }
             });
-            gd_1 = new GridData(GridData.FILL_HORIZONTAL);
-            gd_1.horizontalIndent = 2;
-            gd_1.horizontalAlignment = SWT.CENTER;
-            gd_1.widthHint = 575;
+            gd_1 = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL);
+
+//            gd_1.horizontalIndent = 2;
+//            gd_1.horizontalAlignment = SWT.CENTER;
+//            gd_1.grabExcessHorizontalSpace = true;
+//            gd_1.widthHint = 500;
             searchField.setLayoutData(gd_1);
 
+            createFilterButton(searchAndFilter);
             setList(new TableViewer(container,  SWT.SINGLE
                     | SWT.BORDER | SWT.V_SCROLL | SWT.VIRTUAL));
 
@@ -191,11 +204,15 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
                     okPressed();
                 }
             });
-            createExtendedContentArea(container);
+//            createExtendedContentArea(container);
+            new Label(container, SWT.NONE);
 
             return container;
         }
 
+
+        abstract void createFilterButton(Composite searchAndFilter) ;
+
         protected abstract void search();
 
         /**
@@ -205,7 +222,7 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
          *            parent to create the dialog widgets in
          * @return an extra content area
          */
-        protected abstract Control createExtendedContentArea(Composite parent);
+//        protected abstract Control createExtendedContentArea(Composite parent);
 
         /**
          * Sets the title for this dialog.
@@ -225,7 +242,7 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
          */
         private Label createHeader(Composite parent) {
             Composite header = new Composite(parent, SWT.NONE);
-            GridData gd_header = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);
+            GridData gd_header = new GridData(SWT.CENTER, SWT.CENTER, false, false, 2, 1);
             gd_header.widthHint = 575;
             header.setLayoutData(gd_header);
 
@@ -234,9 +251,7 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
             layout.marginWidth = 0;
             layout.marginHeight = 0;
             header.setLayout(layout);
-
-            createViewMenu(header);
-
+            new Label(header, SWT.NONE);
             Label headerLabel = new Label(header, SWT.NONE);
             headerLabel.setText((getMessage() != null && getMessage().trim()
                     .length() > 0) ? getMessage()
@@ -256,8 +271,6 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
             gd_headerLabel.verticalAlignment = SWT.BOTTOM;
             gd_headerLabel.minimumHeight = 10;
             headerLabel.setLayoutData(gd_headerLabel);
-            new Label(header, SWT.NONE);
-
             return headerLabel;
         }
 
@@ -285,78 +298,88 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
             }
             return itemsListLabelProvider;
         }
-        private void createViewMenu(Composite parent) {
-            toolBar = new ToolBar(parent, SWT.FLAT);
-            toolItem = new ToolItem(toolBar, SWT.PUSH, 0);
-
-            GridData data = new GridData();
-            data.horizontalAlignment = GridData.END;
-            data.grabExcessHorizontalSpace = true;
-            toolBar.setLayoutData(data);
-
-//            toolBar.addMouseListener(new MouseAdapter() {
+//        private void createViewMenu(Composite parent) {
+//            toolBar = new ToolBar(parent, SWT.FLAT);
+//
+//            GridData data = new GridData();
+//            data.horizontalAlignment = GridData.END;
+//            data.grabExcessHorizontalSpace = true;
+//            toolBar.setLayoutData(data);
+//
+//            menuManager = new MenuManager();
+//
+//            fillViewMenu(menuManager);
+//
+//            IHandlerService service = PlatformUI.getWorkbench()
+//                    .getService(IHandlerService.class);
+//            IHandler handler = new AbstractHandler() {
 //                @Override
-//                public void mouseDown(MouseEvent e) {
+//                public Object execute(ExecutionEvent event) {
 //                    showViewMenu();
+//                    return null;
 //                }
-//            });
+//            };
+//        }
+
+//        /**
+//         * Fills the menu of the dialog.
+//         *
+//         * @param menuManager
+//         *            the menu manager
+//         */
+//        protected void fillViewMenu(IMenuManager menuManager) {
+//
+//        }
+
+//        private void showViewMenu() {
+//            Menu menu = menuManager.createContextMenu(getShell());
+//            Rectangle bounds = toolItem.getBounds();
+//            Point topLeft = new Point(bounds.x, bounds.y + bounds.height);
+//            topLeft = toolBar.toDisplay(topLeft);
+//            menu.setLocation(topLeft.x, topLeft.y);
+//            menu.setVisible(true);
+//        }
 
-            toolItem.setImage(WorkbenchImages
-                    .getImage(IWorkbenchGraphicConstants.IMG_LCL_VIEW_MENU));
-            toolItem
-                    .setToolTipText(WorkbenchMessages.FilteredItemsSelectionDialog_menu);
-            toolItem.addSelectionListener(new SelectionAdapter() {
-                @Override
-                public void widgetSelected(SelectionEvent e) {
-                    showViewMenu();
-                }
-            });
+        public TableViewer getList() {
+            return list;
+        }
 
-            menuManager = new MenuManager();
+        public void setList(TableViewer list) {
+            this.list = list;
+            Table table = list.getTable();
+            GridData gd_table = new GridData(SWT.CENTER, SWT.CENTER, true, true, 2, 1);
+            gd_table.heightHint = 231;
+            gd_table.widthHint = 543;
+            table.setLayoutData(gd_table);
+        }
 
-            fillViewMenu(menuManager);
+        public Button getNewButton1() {
+            return newButton1;
+        }
 
-            IHandlerService service = PlatformUI.getWorkbench()
-                    .getService(IHandlerService.class);
-            IHandler handler = new AbstractHandler() {
-                @Override
-                public Object execute(ExecutionEvent event) {
-                    showViewMenu();
-                    return null;
-                }
-            };
+
+        public void setNewButton1(Button newButton1) {
+            this.newButton1 = newButton1;
         }
 
-        /**
-         * Fills the menu of the dialog.
-         *
-         * @param menuManager
-         *            the menu manager
-         */
-        protected void fillViewMenu(IMenuManager menuManager) {
 
+        public Button getNewButton2() {
+            return newButton2;
         }
 
-        private void showViewMenu() {
-            Menu menu = menuManager.createContextMenu(getShell());
-            Rectangle bounds = toolItem.getBounds();
-            Point topLeft = new Point(bounds.x, bounds.y + bounds.height);
-            topLeft = toolBar.toDisplay(topLeft);
-            menu.setLocation(topLeft.x, topLeft.y);
-            menu.setVisible(true);
+
+        public void setNewButton2(Button newButton2) {
+            this.newButton2 = newButton2;
         }
 
-        public TableViewer getList() {
-            return list;
+
+        public Button getFilterButton() {
+            return filterButton;
         }
 
-        public void setList(TableViewer list) {
-            this.list = list;
-            Table table = list.getTable();
-            GridData gd_table = new GridData(SWT.CENTER, SWT.CENTER, true, true, 1, 1);
-            gd_table.heightHint = 231;
-            gd_table.widthHint = 543;
-            table.setLayoutData(gd_table);
+
+        public void setFilterButton(Button filterButton) {
+            this.filterButton = filterButton;
         }
 
         /**
@@ -796,6 +819,8 @@ public abstract class SearchDialog<T extends ICdmBase> extends Dialog implements
         return new Point(593, 399);
     }
 
+
+
 }
 
 
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 092af2aec..93fc8e292 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
@@ -171,4 +171,9 @@ public class SelectionDialogFactory {
 		return null;
 	}
 
+	public static <T extends ICdmBase> T getSelectionFromExtDialog(Class<T> clazz, Shell shell, ConversationHolder conversation, ICdmFormElement parentElement){
+	    return (T) ExtReferenceSelectionDialog.select(shell, conversation, null);
+	}
+
+
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionViewMenu.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionViewMenu.java
new file mode 100755
index 000000000..aff7c08cc
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionViewMenu.java
@@ -0,0 +1,75 @@
+// $Id$
+/**
+* Copyright (C) 2017 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 java.util.List;
+
+import org.eclipse.e4.ui.di.AboutToShow;
+import org.eclipse.e4.ui.model.application.commands.MCommand;
+import org.eclipse.e4.ui.model.application.commands.MCommandsFactory;
+import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory;
+
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+
+/**
+ * @author k.luther
+ * @date 20.11.2017
+ *
+ */
+public class SelectionViewMenu {
+
+    public static final String COMMAND_ID = "taxeditor-selection.command.selectViewMenu"; //$NON-NLS-1$
+    public static final String COMMAND_PARAMETER_VOCABULARY = COMMAND_ID+".vocabulary"; //$NON-NLS-1$
+    public static final String COMMAND_PARAMETER_VOCABULARY_STATE = COMMAND_ID+".state"; //$NON-NLS-1$
+
+    @AboutToShow
+    public void aboutToShow(List<MMenuElement> items, List<TermVocabulary> vocabularies) {
+
+        MMenu menu = MMenuFactory.INSTANCE.createMenu();
+        menu.setLabel(Messages.SelectionViewMenu_selectVocabulary);
+        items.add(menu);
+        for(TermVocabulary<NamedArea> vocabulary: vocabularies){
+            createMenuItem(menu, vocabulary);
+        }
+    }
+
+
+    private void createMenuItem(MMenu menu, final TermVocabulary<NamedArea> vocabulary) {
+
+        MMenu subMenu = MMenuFactory.INSTANCE.createMenu();
+        subMenu.setLabel(String.format(Messages.SelectionViewMenu_SET_FLAG, vocabulary.getLabel()));
+        menu.getChildren().add(subMenu);
+
+        MHandledMenuItem subMenuItemYes = MMenuFactory.INSTANCE.createHandledMenuItem();
+        subMenuItemYes.setLabel(Messages.SelectionViewMenu_4_YES);
+        MCommand mCommandYes = MCommandsFactory.INSTANCE.createCommand();
+        mCommandYes.setElementId(COMMAND_ID);
+        //set params
+        subMenuItemYes.getTransientData().put(COMMAND_PARAMETER_VOCABULARY, vocabulary);
+        subMenuItemYes.getTransientData().put(COMMAND_PARAMETER_VOCABULARY_STATE, true);
+        subMenuItemYes.setCommand(mCommandYes);
+        subMenu.getChildren().add(subMenuItemYes);
+
+        MHandledMenuItem subMenuItemNo = MMenuFactory.INSTANCE.createHandledMenuItem();
+        subMenuItemNo.setLabel(Messages.SelectionViewMenu_NO);
+        MCommand mCommandNo = MCommandsFactory.INSTANCE.createCommand();
+        mCommandNo.setElementId(COMMAND_ID);
+//        //set params
+//        subMenuItemNo.getTransientData().put(COMMAND_PARAMETER_MARKER_TYPE, markerType);
+//        subMenuItemNo.getTransientData().put(COMMAND_PARAMETER_MARKER_STATE, false);
+//        subMenuItemNo.setCommand(mCommandNo);
+//        subMenu.getChildren().add(subMenuItemNo);
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SpecimenOrObservationBaseSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SpecimenOrObservationBaseSelectionDialog.java
index 5faeaaf0e..41766afde 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SpecimenOrObservationBaseSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SpecimenOrObservationBaseSelectionDialog.java
@@ -60,7 +60,7 @@ public class SpecimenOrObservationBaseSelectionDialog extends
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "field unit/derived unit");
+	protected String[] getNewWizardText() {
+		return new String[]{"field unit/derived unit"};
 	}
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonBaseSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonBaseSelectionDialog.java
index 7366d6b30..2a3fa60e7 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonBaseSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonBaseSelectionDialog.java
@@ -93,7 +93,7 @@ public class TaxonBaseSelectionDialog extends AbstractFilteredCdmResourceSelecti
 
     /** {@inheritDoc} */
     @Override
-    protected String getNewWizardLinkText() {
-        return String.format("Create a new <a>%1s</a>", "Taxon ");
+    protected String[] getNewWizardText() {
+        return new String[]{"Taxon "};
     }
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java
index aff448056..73e8689d1 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java
@@ -8,6 +8,7 @@ import java.util.Comparator;
 import java.util.List;
 import java.util.UUID;
 
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
@@ -63,13 +64,16 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
 		if(classification != null){
 			selectedClassification = classification;
 		}
-		search();
+
+		fillClassifications();
+		createClassificationSelectionCombo(shell);
 	}
 
 	/** {@inheritDoc} */
 	@Override
-	protected Control createExtendedContentArea(Composite parent) {
-		return createClassificationSelectionCombo(parent);
+	protected Control createDialogArea(Composite parent) {
+	    Composite container = (Composite) super.createDialogArea(parent);
+		return createClassificationSelectionCombo(container);
 	}
 
 	/*
@@ -134,7 +138,22 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
         }
 
 
-		if(classifications == null){
+//		fillClassifications();
+		if (pattern == null || pattern.equals("?")){
+		    model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification.getUuid(), null, null);
+		}else{
+		    model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification.getUuid(), limitOfInitialElements, pattern);
+		}
+		try {
+            fillContentProvider(null);
+        } catch (CoreException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+	}
+
+    private void fillClassifications() {
+        if(classifications == null){
 			classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, null);
 			Collections.sort(classifications, new Comparator<Classification>() {
 
@@ -156,12 +175,7 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
 			    selectedClassification = this.cdmBaseToBeFiltered.getClassification();
 			}
 		}
-		if (pattern == null || pattern.equals("?")){
-		    model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification.getUuid(),  limitOfInitialElements, pattern);
-		}else{
-		    model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification.getUuid(),  null, null);
-		}
-	}
+    }
 
 	/** {@inheritDoc} */
 	@Override
@@ -171,7 +185,7 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
+	protected String[] getNewWizardText() {
 		return null;
 	}
 
@@ -181,7 +195,9 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
 		selectedClassification = classifications.get(classificationSelectionCombo.getSelectionIndex());
 
 //		refresh();
-		setPattern(null);
+		if (getSearchField().getText() != null){
+		    search();
+		}
 	}
 
 	/** {@inheritDoc} */
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java
index 13d0b98b0..a338b9528 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java
@@ -78,8 +78,8 @@ public class TeamSelectionDialog extends
 
 	/** {@inheritDoc} */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "Team ");
+	protected String[] getNewWizardText() {
+		return new String[]{"Team "};
 	}
 
 	/** {@inheritDoc} */
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java
index f2e4bbe5c..e19be41f9 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java
@@ -75,8 +75,8 @@ public class UserSelectionDialog extends
 	 * @see eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
 	 */
 	@Override
-	protected String getNewWizardLinkText() {
-		return String.format("Create a new <a>%1s</a>", "User ");
+	protected String[] getNewWizardText() {
+		return new String[]{"User"};
 	}
 
 	/* (non-Javadoc)
