ref #6315: add message that if no reference is chosen the sec references are deleted
authorKatja Luther <k.luther@bgbm.org>
Tue, 7 Mar 2017 13:26:10 +0000 (14:26 +0100)
committerKatja Luther <k.luther@bgbm.org>
Tue, 7 Mar 2017 13:26:10 +0000 (14:26 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorWizardPage.java

index 588c21a178417fbefabc5e8413bcbf3b83d9d51f..d98368fe5f8f6e574b94f21dbfb1e32e68fb65cf 100644 (file)
@@ -158,6 +158,7 @@ public class Messages extends NLS {
     public static String SetSecundumConfiguration_EmptySecundumDetail;
     public static String SetSecundumConfiguration_IncludeSharedtaxa;
     public static String SetSecundumConfiguration_NewSecundum_Label;
+    public static String SetSecundumConfiguration_Description;
 
     public static String DatabasePreferncesPage_Is_redList;
     public static String DatabasePreferncesPage_Determination_only_for_field_unnits;
index 4958c05b1d063694c7c01b68920dc11bc8b11e19..eae60e91db33c21e65840f5d6db62027521f22fb 100644 (file)
@@ -151,6 +151,7 @@ SetSecundumConfiguration_OverwriteExistingSynonyms=overwrite existing references
 SetSecundumConfiguration_EmptySecundumDetail=empty existing details
 SetSecundumConfiguration_IncludeSharedtaxa=include shared taxa
 SetSecundumConfiguration_NewSecundum_Label=new secundum reference
+SetSecundumConfiguration_Description=If no reference is chosen existing secundum references are deleted
 
 DatabasePreferncesPage_Is_redList=Red List 2020
 DatabasePreferncesPage_Determination_only_for_field_unnits=Determinations only for field units
index dab2b3ea8ee6175f46901047bda9105154237f52..5362e37eb861e8634d68e953e87566b745b9c140 100644 (file)
@@ -149,6 +149,7 @@ SetSecundumConfiguration_OverwriteExistingSynonyms=bestehende Secundum Referenze
 SetSecundumConfiguration_EmptySecundumDetail=bestehende Details von Secundum Referenzen löschen
 SetSecundumConfiguration_IncludeSharedtaxa=auch mehrfach verwendete Taxa mit einbeziehen
 SetSecundumConfiguration_NewSecundum_Label=neue Secundum Referenz
+SetSecundumConfiguration_Description=Wenn keine Referenz ausgewählt wird, werden die bestehenden Secundum Referenzen gelöscht
 
 DatabasePreferncesPage_Is_redList=Rote Liste 2020
 DatabasePreferncesPage_Determination_only_for_field_unnits=Determinations nur für Field Units
index d7be3ea7cad707193d06c3ff14f6ead58915de09..5dcbed3c58caa68db5fcff666daabf1acb40474c 100755 (executable)
@@ -24,7 +24,6 @@ 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;
@@ -32,22 +31,23 @@ import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * @author k.luther
  * @date 10.02.2017
  *
  */
-public class SetSecundumConfiguratorWizardPage extends WizardPage implements Listener{
+public class SetSecundumConfiguratorWizardPage extends WizardPage implements Listener {
     private DataBindingContext m_bindingContext;
 
-    private final FormToolkit toolkit = new CdmFormFactory(Display.getCurrent());
+    private final static CdmFormFactory toolkit = new CdmFormFactory(Display.getCurrent());
     private final SetSecundumForSubtreeConfigurator configurator;
 
     private  Button btnBrowseReference = null;
     private  Text textReference = null;
     private  Button btnClear = null;
-
+    private EntitySelectionElement<Reference> selectReference;
     private  Button btnIncludeAcceptedTaxa;
     private Button btnIncludeSynonyms;
     private Button btnOverwriteExistingAccepted;
@@ -64,6 +64,7 @@ public class SetSecundumConfiguratorWizardPage extends WizardPage implements Lis
     public SetSecundumConfiguratorWizardPage(SetSecundumForSubtreeConfigurator configurator, Wizard parent, int style ) {
         super("Set Secundum Reference Configuration");
         this.configurator = configurator;
+        this.setDescription(Messages.SetSecundumConfiguration_Description);
 
 //        addDisposeListener(new DisposeListener() {
 //            @Override
@@ -130,7 +131,7 @@ public class SetSecundumConfiguratorWizardPage extends WizardPage implements Lis
         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));
+       label.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
 
         textReference = new Text(compositeRef, SWT.BORDER);
         textReference.setEditable(false);
@@ -144,6 +145,7 @@ public class SetSecundumConfiguratorWizardPage extends WizardPage implements Lis
         btnClear.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif"));
         btnClear.addListener(SWT.Selection, this);
 
+       // selectReference = toolkit.createSelectionElement(Rights.class, getConversationHolder(), composite, "Rights", null, EntitySelectionElement.SELECTABLE);
         final Composite control = new Composite(composite, SWT.NULL);
         GridLayout gridLayoutControl = new GridLayout();
         gridLayoutControl.numColumns = 1;
@@ -237,6 +239,15 @@ public class SetSecundumConfiguratorWizardPage extends WizardPage implements Lis
 
     }
 
+//    /**
+//     * {@inheritDoc}
+//     */
+//    @Override
+//    public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+//        // TODO Auto-generated method stub
+//        return null;
+//    }
+