commit d898479a7e96e9b83ca7042327ab076846fe143c
Author: Katja Luther <k.luther@bgbm.org>
Date:   Fri Feb 17 12:51:39 2017 +0100

    fix  #6315: adapt the setSecundum for subtree functionality in editor

diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/SetSecReferenceForSubtreeHandler.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/SetSecReferenceForSubtreeHandler.java
index 1c525f193..a5afd0471 100755
--- a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/SetSecReferenceForSubtreeHandler.java
+++ b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/SetSecReferenceForSubtreeHandler.java
@@ -18,16 +18,18 @@ import org.eclipse.core.commands.operations.AbstractOperation;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetSecundumForSubtreeOperation;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
-import eu.etaxonomy.taxeditor.ui.dialog.configurator.SetSecundumForSubtreeConfigurationDialog;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.SetSecundumForSubtreeConfigurationWizard;
 
 /**
  * @author k.luther
@@ -85,13 +87,23 @@ public class SetSecReferenceForSubtreeHandler extends RemotingCdmHandler {
            }
 
            configurator = new SetSecundumForSubtreeConfigurator(taxonNode.getUuid());
-           if(!SetSecundumForSubtreeConfigurationDialog.openConfirmWithConfigurator(configurator, HandlerUtil.getActiveShell(event), Messages.SetSecundumHandler_confirm, Messages.SetSecundumHandler_configureSettings)){
+           SetSecundumForSubtreeConfigurationWizard wizard = new SetSecundumForSubtreeConfigurationWizard(configurator);
 
+           WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);
+
+           if (dialog.open() == Window.OK) {
+              return Status.OK_STATUS;
+           }else{
                return Status.CANCEL_STATUS;
            }
 
-
-           return Status.OK_STATUS;
+//           if(!SetSecundumForSubtreeConfigurationWizard.openConfirmWithConfigurator(configurator)){
+//
+//               return Status.CANCEL_STATUS;
+//           }
+//
+//
+//           return Status.OK_STATUS;
        }
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#doOperations(org.eclipse.core.commands.ExecutionEvent)
diff --git a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
index fe67f8b3d..f67d84a76 100644
--- a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
+++ b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
@@ -150,6 +150,7 @@ SetSecundumConfiguration_OverwriteExistingAccepted=overwrite existing references
 SetSecundumConfiguration_OverwriteExistingSynonyms=overwrite existing references for synonyms
 SetSecundumConfiguration_EmptySecundumDetail=empty existing details
 SetSecundumConfiguration_IncludeSharedtaxa=include shared taxa
+SetSecundumConfiguration_NewSecundum_Label=new secundum reference
 
 DatabasePreferncesPage_Is_redList=Red List 2020
 DatabasePreferncesPage_Determination_only_for_field_unnits=Determinations only for field units
diff --git a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
index ec108dc1b..f9af42828 100644
--- a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
+++ b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
@@ -142,12 +142,13 @@ DeleteConfiguration_media_delete=L
 
 NewGrantedAuthority_AlreadyInDb=Die GrantedAuthority ist bereits in der DB enthalten.
 
-SetSecundumConfiguration_IncludeAcceptedTaxa=anwenden auf akzeptierten Taxa
+SetSecundumConfiguration_IncludeAcceptedTaxa=anwenden auf akzeptierte Taxa
 SetSecundumConfiguration_IncludeSynonyms=anwenden auf Synonyme
 SetSecundumConfiguration_OverwriteExistingAccepted=bestehende Secundum Referenzen bei akzeptierten Taxa überschreiben
 SetSecundumConfiguration_OverwriteExistingSynonyms=bestehende Secundum Referenzen bei Synonymen überschreiben
 SetSecundumConfiguration_EmptySecundumDetail=bestehende Details von Secundum Referenzen löschen
-SetSecundumConfiguration_IncludeSharedtaxa=auch geteilte Taxa mit einbeziehen
+SetSecundumConfiguration_IncludeSharedtaxa=auch mehrfach verwendete Taxa mit einbeziehen
+SetSecundumConfiguration_NewSecundum_Label=neue Secundum Referenz
 
 DatabasePreferncesPage_Is_redList=Rote Liste 2020
 DatabasePreferncesPage_Determination_only_for_field_unnits=Determinations nur für Field Units
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
index 90c53765d..bc26e7417 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
@@ -157,13 +157,14 @@ public class Messages extends NLS {
     public static String SetSecundumConfiguration_OverwriteExistingSynonyms;
     public static String SetSecundumConfiguration_EmptySecundumDetail;
     public static String SetSecundumConfiguration_IncludeSharedtaxa;
-
+    public static String SetSecundumConfiguration_NewSecundum_Label;
 
     public static String DatabasePreferncesPage_Is_redList;
     public static String DatabasePreferncesPage_Determination_only_for_field_unnits;
     public static String DatabasePreferncesPage_Show_Collecting_Areas_in_general_section;
     public static String DatabasePreferncesPage_Taxon_Associations;
 
+
     static {
         // initialize resource bundle
         NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorComposite.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorComposite.java
deleted file mode 100755
index ec4f44967..000000000
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorComposite.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
-* 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.configurator;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.beans.PojoProperties;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
-import eu.etaxonomy.taxeditor.Messages;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
-
-/**
- * @author k.luther
- * @date 10.02.2017
- *
- */
-public class SetSecundumConfiguratorComposite extends Composite {
-    private final DataBindingContext m_bindingContext;
-
-    private final FormToolkit toolkit = new CdmFormFactory(Display.getCurrent());
-    private final SetSecundumForSubtreeConfigurator configurator;
-
-
-    private final Button btnIncludeAcceptedTaxa;
-    private final Button btnIncludeSynonyms;
-    private final Button btnOverwriteExistingAccepted;
-    private final Button btnOverwriteExistingSynonyms;
-    private final Button btnEmptySecundumDetail;
-    private final Button btnIncludeSharedTaxa;
-
-
-    /**
-     * Create the composite.
-     * @param parent
-     * @param style
-     */
-    public SetSecundumConfiguratorComposite(SetSecundumForSubtreeConfigurator configurator, Composite parent, int style ) {
-        super(parent, style);
-        this.configurator = configurator;
-
-        addDisposeListener(new DisposeListener() {
-            @Override
-            public void widgetDisposed(DisposeEvent e) {
-                toolkit.dispose();
-            }
-        });
-        toolkit.paintBordersFor(this);
-        setLayout(new GridLayout());
-        setBackground(getBackground());
-
-
-        btnIncludeAcceptedTaxa = new Button(this, SWT.CHECK);
-        btnIncludeAcceptedTaxa.setText(Messages.SetSecundumConfiguration_IncludeAcceptedTaxa);
-        btnIncludeAcceptedTaxa.setSelection(configurator.isIncludeAcceptedTaxa());
-
-        btnIncludeSynonyms = new Button(this, SWT.CHECK);
-        btnIncludeSynonyms.setText(Messages.SetSecundumConfiguration_IncludeSynonyms);
-        btnIncludeSynonyms.setSelection(configurator.isIncludeSynonyms());
-        btnOverwriteExistingAccepted = new Button(this, SWT.CHECK);
-        btnOverwriteExistingAccepted.setText(Messages.SetSecundumConfiguration_OverwriteExistingAccepted);
-        btnOverwriteExistingAccepted.setSelection(configurator.isOverwriteExistingAccepted());
-        btnOverwriteExistingSynonyms = new Button(this, SWT.CHECK);
-        btnOverwriteExistingSynonyms.setText(Messages.SetSecundumConfiguration_OverwriteExistingSynonyms);
-        btnOverwriteExistingSynonyms.setSelection(configurator.isOverwriteExistingSynonyms());
-        btnEmptySecundumDetail = new Button(this, SWT.CHECK);
-        btnEmptySecundumDetail.setText(Messages.SetSecundumConfiguration_EmptySecundumDetail);
-        btnEmptySecundumDetail.setSelection(configurator.isEmptySecundumDetail());
-
-        btnIncludeSharedTaxa = new Button(this, SWT.CHECK);
-        btnIncludeSharedTaxa.setText(Messages.SetSecundumConfiguration_IncludeSharedtaxa);
-        btnIncludeSharedTaxa.setSelection(configurator.isIncludeSharedTaxa());
-
-        m_bindingContext = initDataBindings();
-
-    }
-
-    /**
-     * @return
-     */
-    private DataBindingContext initDataBindings() {
-        DataBindingContext bindingContext = new DataBindingContext();
-        //
-
-//        private final Button btnIncludeAcceptedTaxa;
-//        private final Button btnIncludeSynonyms;
-//        private final Button btnOverwriteExistingAccepted;
-//        private final Button btnOverwriteExistingSynonyms;
-//        private final Button btnEmptySecundumDetail;
-//        private final Button btnIncludeSharedTaxa;
-
-        IObservableValue observeSelectionBtnIncludeAcceptedTaxa = WidgetProperties.selection().observe(btnIncludeAcceptedTaxa);
-        IObservableValue includeAcceptedTaxaConfiguratorObserveValue = PojoProperties.value("includeAcceptedTaxa").observe(configurator);
-        bindingContext.bindValue(observeSelectionBtnIncludeAcceptedTaxa, includeAcceptedTaxaConfiguratorObserveValue, null, null);
-
-        IObservableValue observeSelectionBtnIncludeSynonyms = WidgetProperties.selection().observe(btnIncludeSynonyms);
-        IObservableValue includeSynonymsConfiguratorObserveValue = PojoProperties.value("includeSynonyms").observe(configurator);
-        bindingContext.bindValue(observeSelectionBtnIncludeSynonyms, includeSynonymsConfiguratorObserveValue, null, null);
-
-        IObservableValue observeSelectionBtnOverwriteExistingAccepted = WidgetProperties.selection().observe(btnOverwriteExistingAccepted);
-        IObservableValue overwriteExistingAcceptedConfiguratorObserveValue = PojoProperties.value("overwriteExistingAccepted").observe(configurator);
-        bindingContext.bindValue(observeSelectionBtnOverwriteExistingAccepted, overwriteExistingAcceptedConfiguratorObserveValue, null, null);
-
-        IObservableValue observeSelectionBtnOverwriteExistingSynonyms = WidgetProperties.selection().observe(btnOverwriteExistingSynonyms);
-        IObservableValue overwriteExistingSynonymsConfiguratorObserveValue = PojoProperties.value("overwriteExistingSynonyms").observe(configurator);
-        bindingContext.bindValue(observeSelectionBtnOverwriteExistingSynonyms, overwriteExistingSynonymsConfiguratorObserveValue, null, null);
-
-        IObservableValue observeSelectionBtnEmptySecundumDetail = WidgetProperties.selection().observe(btnEmptySecundumDetail);
-        IObservableValue emptySecundumDetailConfiguratorObserveValue = PojoProperties.value("emptySecundumDetail").observe(configurator);
-        bindingContext.bindValue(observeSelectionBtnEmptySecundumDetail, emptySecundumDetailConfiguratorObserveValue, null, null);
-
-        IObservableValue observeSelectionBtnIncludeSharedTaxal = WidgetProperties.selection().observe(btnIncludeSharedTaxa);
-        IObservableValue includeSharedTaxaConfiguratorObserveValue = PojoProperties.value("includeSharedTaxa").observe(configurator);
-        bindingContext.bindValue(observeSelectionBtnIncludeSharedTaxal, includeSharedTaxaConfiguratorObserveValue, null, null);
-        return bindingContext;
-    }
-
-
-
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorWizardPage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorWizardPage.java
new file mode 100755
index 000000000..5b0692314
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorWizardPage.java
@@ -0,0 +1,243 @@
+/**
+* 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.configurator;
+
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.beans.PojoProperties;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+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.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.wb.swt.ResourceManager;
+
+import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+
+/**
+ * @author k.luther
+ * @date 10.02.2017
+ *
+ */
+public class SetSecundumConfiguratorWizardPage extends WizardPage implements Listener{
+    private DataBindingContext m_bindingContext;
+
+    private final FormToolkit toolkit = new CdmFormFactory(Display.getCurrent());
+    private final SetSecundumForSubtreeConfigurator configurator;
+
+    private  Button btnBrowseReference = null;
+    private  Text textReference = null;
+    private  Button btnClear = null;
+
+    private  Button btnIncludeAcceptedTaxa;
+    private Button btnIncludeSynonyms;
+    private Button btnOverwriteExistingAccepted;
+    private Button btnOverwriteExistingSynonyms;
+    private Button btnEmptySecundumDetail;
+    private Button btnIncludeSharedTaxa;
+
+
+    /**
+     * Create the composite.
+     * @param parent
+     * @param style
+     */
+    public SetSecundumConfiguratorWizardPage(SetSecundumForSubtreeConfigurator configurator, Wizard parent, int style ) {
+        super("Set Secundum Reference Configuration");
+        this.configurator = configurator;
+
+//        addDisposeListener(new DisposeListener() {
+//            @Override
+//            public void widgetDisposed(DisposeEvent e) {
+//                toolkit.dispose();
+//            }
+//        });
+      //  toolkit.paintBordersFor(this);
+//        setLayout(new GridLayout());
+//        setBackground(getBackground());
+
+
+
+
+    }
+
+    /**
+     * @return
+     */
+    private DataBindingContext initDataBindings() {
+        DataBindingContext bindingContext = new DataBindingContext();
+
+        IObservableValue observeSelectionBtnIncludeAcceptedTaxa = WidgetProperties.selection().observe(btnIncludeAcceptedTaxa);
+        IObservableValue includeAcceptedTaxaConfiguratorObserveValue = PojoProperties.value("includeAcceptedTaxa").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnIncludeAcceptedTaxa, includeAcceptedTaxaConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionBtnIncludeSynonyms = WidgetProperties.selection().observe(btnIncludeSynonyms);
+        IObservableValue includeSynonymsConfiguratorObserveValue = PojoProperties.value("includeSynonyms").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnIncludeSynonyms, includeSynonymsConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionBtnOverwriteExistingAccepted = WidgetProperties.selection().observe(btnOverwriteExistingAccepted);
+        IObservableValue overwriteExistingAcceptedConfiguratorObserveValue = PojoProperties.value("overwriteExistingAccepted").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnOverwriteExistingAccepted, overwriteExistingAcceptedConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionBtnOverwriteExistingSynonyms = WidgetProperties.selection().observe(btnOverwriteExistingSynonyms);
+        IObservableValue overwriteExistingSynonymsConfiguratorObserveValue = PojoProperties.value("overwriteExistingSynonyms").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnOverwriteExistingSynonyms, overwriteExistingSynonymsConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionBtnEmptySecundumDetail = WidgetProperties.selection().observe(btnEmptySecundumDetail);
+        IObservableValue emptySecundumDetailConfiguratorObserveValue = PojoProperties.value("emptySecundumDetail").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnEmptySecundumDetail, emptySecundumDetailConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionBtnIncludeSharedTaxal = WidgetProperties.selection().observe(btnIncludeSharedTaxa);
+        IObservableValue includeSharedTaxaConfiguratorObserveValue = PojoProperties.value("includeSharedTaxa").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnIncludeSharedTaxal, includeSharedTaxaConfiguratorObserveValue, null, null);
+        return bindingContext;
+    }
+
+    @Override
+    public void createControl(Composite parent) {
+
+        final Composite composite = new Composite(parent, SWT.NULL);
+
+        GridLayout gridLayout = new GridLayout();
+        gridLayout.numColumns = 1;
+
+        composite.setLayout(gridLayout);
+        final Composite compositeRef = new Composite(composite, SWT.NULL);
+
+        GridLayout gridLayoutRef = new GridLayout();
+        gridLayoutRef.numColumns = 4;
+
+        compositeRef.setLayout(gridLayoutRef);
+        compositeRef.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, true));
+        Label label = new Label(compositeRef, SWT.NONE);
+        label.setText(Messages.SetSecundumConfiguration_NewSecundum_Label);
+        //label.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+
+        textReference = new Text(compositeRef, SWT.BORDER);
+        textReference.setEditable(false);
+        textReference.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        textReference.setTextLimit(Text.LIMIT);
+
+        btnBrowseReference = new Button(compositeRef, SWT.NONE);
+        btnBrowseReference.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/open.gif"));
+        btnBrowseReference.addListener(SWT.Selection, this);
+        btnClear = new Button(compositeRef, SWT.NONE);
+        btnClear.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif"));
+        btnClear.addListener(SWT.Selection, this);
+
+        final Composite control = new Composite(composite, SWT.NULL);
+        GridLayout gridLayoutControl = new GridLayout();
+        gridLayoutControl.numColumns = 1;
+
+        control.setLayout(gridLayoutControl);
+        control.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, true));
+      //  Composite control = toolkit.createComposite(composite);
+        btnIncludeAcceptedTaxa = new Button(control, SWT.CHECK);
+        btnIncludeAcceptedTaxa.setText(Messages.SetSecundumConfiguration_IncludeAcceptedTaxa);
+        btnIncludeAcceptedTaxa.setSelection(configurator.isIncludeAcceptedTaxa());
+        btnIncludeAcceptedTaxa.addListener(SWT.Selection, new Listener() {
+            @Override
+         public void handleEvent(Event e) {
+                Button b = (Button) e.widget;
+                GridData data = (GridData)  btnIncludeAcceptedTaxa.getLayoutData();
+                data.exclude = b.getSelection();
+                btnOverwriteExistingAccepted.setVisible(data.exclude);
+                btnIncludeSharedTaxa.setVisible(data.exclude);
+                if (!btnIncludeSynonyms.getSelection() && !data.exclude){
+                    btnEmptySecundumDetail.setVisible(false);
+                    setPageComplete(false);
+                }else{
+                    btnEmptySecundumDetail.setVisible(true);
+                    setPageComplete(true);
+                }
+            }
+        });
+
+        btnOverwriteExistingAccepted = new Button(control, SWT.CHECK);
+        btnOverwriteExistingAccepted.setText(Messages.SetSecundumConfiguration_OverwriteExistingAccepted);
+
+        btnIncludeSynonyms = new Button(control, SWT.CHECK);
+        btnIncludeSynonyms.setText(Messages.SetSecundumConfiguration_IncludeSynonyms);
+        btnIncludeSynonyms.setSelection(configurator.isIncludeSynonyms());
+        btnIncludeSynonyms.addListener(SWT.Selection, new Listener() {
+            @Override
+         public void handleEvent(Event e) {
+                Button b = (Button) e.widget;
+                GridData data = (GridData)  btnIncludeSynonyms.getLayoutData();
+                data.exclude = b.getSelection();
+                btnOverwriteExistingSynonyms.setVisible(data.exclude);
+                if (!btnIncludeAcceptedTaxa.getSelection() && !data.exclude){
+                    btnEmptySecundumDetail.setVisible(false);
+                    setPageComplete(false);
+                }else{
+                    btnEmptySecundumDetail.setVisible(true);
+                    setPageComplete(true);
+                }
+
+            }
+        });
+
+        btnOverwriteExistingAccepted.setSelection(configurator.isOverwriteExistingAccepted());
+        btnOverwriteExistingSynonyms = new Button(control, SWT.CHECK);
+        btnOverwriteExistingSynonyms.setText(Messages.SetSecundumConfiguration_OverwriteExistingSynonyms);
+        btnOverwriteExistingSynonyms.setSelection(configurator.isOverwriteExistingSynonyms());
+        btnEmptySecundumDetail = new Button(control, SWT.CHECK);
+        btnEmptySecundumDetail.setText(Messages.SetSecundumConfiguration_EmptySecundumDetail);
+        btnEmptySecundumDetail.setSelection(configurator.isEmptySecundumDetail());
+
+        btnIncludeSharedTaxa = new Button(control, SWT.CHECK);
+        btnIncludeSharedTaxa.setText(Messages.SetSecundumConfiguration_IncludeSharedtaxa);
+        btnIncludeSharedTaxa.setSelection(configurator.isIncludeSharedTaxa());
+
+        m_bindingContext = initDataBindings();
+        setControl(composite);
+    }
+
+
+
+    @Override
+    public void handleEvent(Event event) {
+        Reference reference;
+        if(event.widget==btnBrowseReference){
+            reference = SelectionDialogFactory.getSelectionFromDialog(Reference.class, this.getShell(), null, null);
+            if(reference!=null){
+                this.configurator.setNewSecundum(reference);
+                textReference.setText(reference.getTitleCache());
+
+            }
+
+        } else if(event.widget==btnClear){
+            reference = null;
+            textReference.setText("");
+            this.configurator.setNewSecundum(null);
+        } else{
+            reference = null;
+            textReference.setText("");
+            this.configurator.setNewSecundum(null);
+        }
+
+    }
+
+
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumForSubtreeConfigurationDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumForSubtreeConfigurationDialog.java
deleted file mode 100755
index be796958e..000000000
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumForSubtreeConfigurationDialog.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
-* 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.configurator;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-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.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wb.swt.ResourceManager;
-
-import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
-import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory;
-
-/**
- * @author k.luther
- * @date 10.02.2017
- *
- */
-public class SetSecundumForSubtreeConfigurationDialog extends MessageDialog implements Listener{
-
-    Reference newSecRef;
-    private final SetSecundumForSubtreeConfigurator configurator;
-    private  Button btnBrowseReference = null;
-    private  Text textReference = null;
-    private  Button btnClear = null;
-
-
-
-    /**
-     * @param parentShell
-     * @param dialogTitle
-     * @param dialogTitleImage
-     * @param dialogMessage
-     * @param dialogImageType
-     * @param dialogButtonLabels
-     * @param defaultIndex
-     * @param config
-     */
-    public SetSecundumForSubtreeConfigurationDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage,
-            String dialogMessage, int dialogImageType, String[] dialogButtonLabels, int defaultIndex, SetSecundumForSubtreeConfigurator config) {
-        super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
-        this.configurator = config;
-
-
-
-    }
-
-    @Override
-    protected Control createCustomArea(Composite parent) {
-        final Composite composite = new Composite(parent, SWT.NULL);
-
-        GridLayout gridLayout = new GridLayout();
-        gridLayout.numColumns = 1;
-        composite.setLayout(gridLayout);
-        final Composite compositeRef = new Composite(composite, SWT.NULL);
-
-        GridLayout gridLayoutRef = new GridLayout();
-        gridLayoutRef.numColumns = 4;
-
-        compositeRef.setLayout(gridLayoutRef);
-        compositeRef.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, true));
-        Label label = new Label(compositeRef, SWT.NONE);
-        label.setText("New secundum reference");
-        //label.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
-
-        textReference = new Text(compositeRef, SWT.BORDER);
-        textReference.setEditable(false);
-        textReference.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-        textReference.setTextLimit(Text.LIMIT);
-
-        btnBrowseReference = new Button(compositeRef, SWT.NONE);
-        btnBrowseReference.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/open.gif"));
-        btnBrowseReference.addListener(SWT.Selection, this);
-        btnClear = new Button(compositeRef, SWT.NONE);
-        btnClear.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif"));
-        btnClear.addListener(SWT.Selection, this);
-        ConfiguratorComposite compositeConfigure = new ConfiguratorComposite(composite, NONE);
-
-        compositeConfigure.addConfiguratorComposite(new SetSecundumConfiguratorComposite(configurator, compositeConfigure.getSectionConfigure(), SWT.NONE));
-        return composite;
-
-    }
-
-    /**
-     * @param configurator
-     * @param activeShell
-     * @param setSecundumHandler_confirm
-     * @param setSecundumHandler_configureSettings
-     * @return
-     */
-    public static boolean openConfirmWithConfigurator(SetSecundumForSubtreeConfigurator configurator, Shell parent, String title, String message) {
-
-        SetSecundumForSubtreeConfigurationDialog dialog = new SetSecundumForSubtreeConfigurationDialog(parent, title, getDefaultImage(), message, CONFIRM, getButtonLabels(CONFIRM), 0, configurator);
-
-        return dialog.open() == 0;
-    }
-
-
-    protected static String[] getButtonLabels(int kind) {
-        String[] dialogButtonLabels;
-        switch (kind) {
-
-        case WARNING: {
-            dialogButtonLabels = new String[] { IDialogConstants.OK_LABEL };
-            break;
-        }
-        case CONFIRM: {
-            dialogButtonLabels = new String[] { IDialogConstants.OK_LABEL,
-                    IDialogConstants.CANCEL_LABEL };
-            break;
-        }
-        case QUESTION: {
-            dialogButtonLabels = new String[] { IDialogConstants.YES_LABEL,
-                    IDialogConstants.NO_LABEL };
-            break;
-        }
-        case QUESTION_WITH_CANCEL: {
-            dialogButtonLabels = new String[] { IDialogConstants.YES_LABEL,
-                    IDialogConstants.NO_LABEL,
-                    IDialogConstants.CANCEL_LABEL };
-            break;
-        }
-        default: {
-            throw new IllegalArgumentException(
-                    "Illegal value for kind in MessageDialog.open()"); //$NON-NLS-1$
-        }
-        }
-        return dialogButtonLabels;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void handleEvent(Event event) {
-        Reference reference;
-        if(event.widget==btnBrowseReference){
-            reference = SelectionDialogFactory.getSelectionFromDialog(Reference.class, this.getShell(), null, null);
-            if(reference!=null){
-                this.configurator.setNewSecundum(reference);
-                textReference.setText(reference.getTitleCache());
-
-            }
-
-        }
-        else if(event.widget==btnClear){
-            reference = null;
-            textReference.setText("");
-            this.configurator.setNewSecundum(null);
-        }
-        else{
-            reference = null;
-            textReference.setText("");
-            this.configurator.setNewSecundum(null);
-        }
-
-    }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumForSubtreeConfigurationWizard.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumForSubtreeConfigurationWizard.java
new file mode 100755
index 000000000..a8186ca2a
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumForSubtreeConfigurationWizard.java
@@ -0,0 +1,96 @@
+/**
+* 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.configurator;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
+import eu.etaxonomy.cdm.model.reference.Reference;
+
+/**
+ * @author k.luther
+ * @date 10.02.2017
+ *
+ */
+public class SetSecundumForSubtreeConfigurationWizard extends Wizard {
+
+    Reference newSecRef;
+    private final SetSecundumForSubtreeConfigurator configurator;
+
+
+    private SetSecundumConfiguratorWizardPage page;
+
+
+
+    /**
+     * @param parentShell
+     * @param dialogTitle
+     * @param dialogTitleImage
+     * @param dialogMessage
+     * @param dialogImageType
+     * @param dialogButtonLabels
+     * @param defaultIndex
+     * @param config
+     */
+    public SetSecundumForSubtreeConfigurationWizard(SetSecundumForSubtreeConfigurator config) {
+        super();
+       // super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
+        this.configurator = config;
+        setNeedsProgressMonitor(true);
+
+
+
+    }
+
+
+
+    /**
+     * @param configurator
+     * @param activeShell
+     * @param setSecundumHandler_confirm
+     * @param setSecundumHandler_configureSettings
+     * @return
+     */
+    public static void openConfirmWithConfigurator(SetSecundumForSubtreeConfigurator configurator, Shell parent, String title, String message) {
+
+        SetSecundumForSubtreeConfigurationWizard wizard = new SetSecundumForSubtreeConfigurationWizard(configurator);
+
+
+    }
+
+
+
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean performFinish() {
+       if (!(configurator.isIncludeAcceptedTaxa() || configurator.isIncludeSynonyms())){
+           return false;
+       }else{
+           return true;
+       }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void addPages() {
+        page = new SetSecundumConfiguratorWizardPage(configurator, this, SWT.NONE);
+        addPage(page);
+    }
+
+
+}
