Merge branch 'release/5.32.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / supplemental / IdentifiableSourceElement.java
index 9202992a3e126df6b7ed40c1f04b5dc3e58feb13..96de77e9f05c8834a06dd66784d784c58c6c0288 100644 (file)
@@ -1,6 +1,11 @@
 /**
- *
- */
+* Copyright (C) 2021 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.section.supplemental;
 
 import org.eclipse.swt.events.SelectionListener;
@@ -35,19 +40,15 @@ public class IdentifiableSourceElement extends AbstractOriginalSourceElement<Ide
                 for (Control co: ((Composite)control).getChildren()){
                     co.setEnabled(isEnabled);
                 }
-               }
-
+            }
         }
-
        }
 
        public IdentifiableSourceElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, IdentifiableSource element,
             SelectionListener removeListener, int style) {
         super(cdmFormFactory, formElement, element, removeListener, style);
-
     }
 
-       /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement formElement, int style) {
                super.createControls(formElement, style);
@@ -58,7 +59,6 @@ public class IdentifiableSourceElement extends AbstractOriginalSourceElement<Ide
         }
        }
 
-       /** {@inheritDoc} */
        @Override
        public void setEntity(IdentifiableSource entity) {
                super.setEntity(entity);
@@ -69,34 +69,16 @@ public class IdentifiableSourceElement extends AbstractOriginalSourceElement<Ide
                        if (PreferencesUtil.getBooleanValue(PreferencePredicate.ShowNamespaceInSource.getKey())){
                            text_idNamespace.setText(entity.getIdNamespace());
                        }
-       
+
                        selection_reference.setEntity(entity.getCitation());
                        text_referenceDetail.setText(entity.getCitationMicroReference());
                        combo_origsourcetype.setSelection(entity.getType());
-                       text_originaleNameString.setText(entity.getOriginalNameString());
+                       text_originalInfo.setText(entity.getOriginalInfo());
                }
-
        }
 
-       /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
-               if(eventSource == text_idInSource){
-                       getEntity().setIdInSource(text_idInSource.getText());
-               }
-               else if(eventSource == text_idNamespace){
-                       getEntity().setIdNamespace(text_idNamespace.getText());
-               }
-               if(eventSource == selection_reference){
-                       getEntity().setCitation(selection_reference.getSelection());
-               }
-               else if(eventSource == text_referenceDetail){
-                       getEntity().setCitationMicroReference(text_referenceDetail.getText());
-               }
-               else if(eventSource == text_originaleNameString){
-                       getEntity().setOriginalNameString(text_originaleNameString.getText());
-               } else if(eventSource == combo_origsourcetype){
-                       getEntity().setType(combo_origsourcetype.getSelection());
-               }
+           super.handleEvent(eventSource);
        }
 }