adapt master to develop master 5.42.0
authorKatja Luther <k.luther@bgbm.org>
Fri, 2 Feb 2024 07:30:23 +0000 (08:30 +0100)
committerKatja Luther <k.luther@bgbm.org>
Fri, 2 Feb 2024 07:30:23 +0000 (08:30 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/CheckBoxTreeComposite.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/SourceComparator.java

index 1ca9b55e67d7551ac7a7a1988dc6869b7d129b9b..206eb8a1d9d35ea69d771c07c9b23cf4b491556f 100644 (file)
@@ -25,7 +25,6 @@ import eu.etaxonomy.cdm.model.reference.NamedSource;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNodeStatus;
-import eu.etaxonomy.cdm.persistence.dto.MergeResult;
 import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
 import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
index 1a8048e2e92a204a91205be6de672f7580231fc8..e5b52e0d258fcbf714a62fd70b5b45ef54128257 100644 (file)
@@ -55,7 +55,6 @@ public class CheckBoxTreeComposite extends Composite implements SelectionListene
     protected Object[] checkedElements;
 
     protected boolean allowTopLevelSelection = false;
-    
 
 
     public CheckBoxTreeComposite(Composite parent, ITreeContentProvider contentProvider, IBaseLabelProvider labelProvider, int style) {
@@ -149,8 +148,6 @@ public class CheckBoxTreeComposite extends Composite implements SelectionListene
             if (o != null && !o.equals(element)){
                tempArray[index] = o;
                index++;
-            }else {
-                System.err.println("unchecked element" + element.toString());
             }
         }
         checkedElements = tempArray;
@@ -309,40 +306,6 @@ public class CheckBoxTreeComposite extends Composite implements SelectionListene
             }
         }
     }
-    
-    private void updateAfterCheckElement(Object item) {
-        Set<Object> tempList = new HashSet<>();
-        if (checkedElements != null) {
-            Collections.addAll(tempList, checkedElements);
-        }        
-        TermNodeDto checkedNode = null;
-        TermDto checkedTerm = null;
-        TreeItem treeItem = null;
-        if (item instanceof TreeItem) {
-             treeItem = (TreeItem) item;   
-             if (treeItem.getData() instanceof TermNodeDto) {
-                 checkedNode = (TermNodeDto)treeItem.getData();
-                 checkedTerm = checkedNode.getTerm();
-             }else if (treeItem.getData() instanceof TermDto) {           
-                 checkedTerm = (TermDto)treeItem.getData();
-             }else {
-                 return;
-             }
-        }else  if (item instanceof TermNodeDto) {
-            checkedNode = (TermNodeDto)item;
-            checkedTerm = checkedNode.getTerm();
-        }else if (item instanceof TermDto) {           
-            checkedTerm = (TermDto)item;
-        }else {
-            return;
-        } 
-        if (checkedTerm != null) {
-            tempList.add(checkedTerm);
-        }
-        
-        setCheckedElements(tempList.toArray());
-        
-    }
 
     private void updateAfterCheckElement(Object item) {
         Set<Object> tempList = new HashSet<>();
index fdd883ea4b03d91ae62053e3161b60bcc457a726..da354f008dceddeb50d4a1912fc9cf3ed9e2620f 100644 (file)
@@ -41,7 +41,6 @@ public class SourceComparator  <T extends OriginalSourceBase> implements Compara
         if (o2.isInstanceOf(DescriptionElementSource.class)){
             isDescriptionElementSource2 = true;
         }
-
         if (isDescriptionElementSource1 != isDescriptionElementSource2){
             if (isDescriptionElementSource1){
                 return -1;