Remove/Refactor System.out statements
authorPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 1 Dec 2015 14:09:55 +0000 (15:09 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 2 Dec 2015 10:09:38 +0000 (11:09 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptionElementDropAdapter.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDropAdapter.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/ReportTextDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/identifier/IdentifierDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java

index e7d7f29..465e3f0 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * 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.
 */
@@ -46,14 +46,14 @@ public class DescriptionElementDropAdapter extends ViewerDropAdapter {
        public boolean performDrop(Object data) {
                TaxonDescription target = (TaxonDescription) getCurrentTarget();
                Object[] droppedElements = (Object[]) data;
-               
+
                Collection<DescriptionElementBase> descriptionElements = new ArrayList<DescriptionElementBase>();
-               
+
                boolean isCopy = getCurrentOperation() == DND.DROP_COPY ? true : false;
-               
+
                // cannot drop a feature node onto itself
                if (droppedElements != null){
-                       for (Object droppedElement : droppedElements) {                 
+                       for (Object droppedElement : droppedElements) {
                                if (droppedElement == null){
                                        MessagingUtils.warningDialog("Operation not supported yet", this, "We are currently unable to drag and drop a newly created element. Please save the editor to make this work.");
                                        return false;
@@ -62,24 +62,24 @@ public class DescriptionElementDropAdapter extends ViewerDropAdapter {
                                        return false;
                                }else{
                                        DescriptionElementBase descriptionElement = (DescriptionElementBase) droppedElement;
-                                       
+
                                        if (descriptionElement.getInDescription().equals(target)) {
                                                return false;
                                        }
-                                       
+
                                        descriptionElements.add(descriptionElement);
-                               }                       
+                               }
                        }
-                       
+
                        AbstractPostOperation operation = new MoveDescriptionElementsOperation("Move Descriptions", EditorUtil.getUndoContext(), target, descriptionElements, isCopy, null);
-                       
+
                        EditorUtil.executeOperation(operation);
                        return true;
                }
                MessagingUtils.warningDialog("Operation not supported yet", this, "We are unable to drag and drop empty descriptions");
-       
+
                return false;
-               
+
        }
 
        /* (non-Javadoc)
@@ -90,7 +90,6 @@ public class DescriptionElementDropAdapter extends ViewerDropAdapter {
                        TransferData transferData) {
                boolean transferDataIsSupported = DescriptionElementTransfer.getInstance().isSupportedType(
                                transferData);
-               System.out.println(target);
                return target instanceof TaxonDescription && transferDataIsSupported;
        }
 
index 7ea235d..07b5abb 100644 (file)
@@ -49,7 +49,6 @@ public class DefinedTermDropAdapter extends ViewerDropAdapter {
 \r
                TermBase target = (TermBase) getCurrentTarget();//can be vocab\r
                int currentLocation = getCurrentLocation();\r
-               System.out.println("current location : " + currentLocation + " , target : " + target.getTitleCache());\r
                //DefinedTermBase[] droppedElements = (DefinedTermBase[]) data;\r
                Object[] droppedTerms = (Object[]) data;\r
                Collection<DefinedTermBase> sourceTerms = new ArrayList<DefinedTermBase>(); //Arrays.asList(droppedElements)\r
index d1cefe6..edd320e 100644 (file)
@@ -70,7 +70,6 @@ public class ReportTextDialog extends Dialog {
                 // Put in a readable name for the filter
                 fileDialog.setFilterNames(new String[] { "Textfiles(*.txt)" });
                 String fileName = fileDialog.open();
-                System.out.println("File Name : " + fileName);
                 if(fileName != null) {
                     File file = new File(fileName);
                     if (file.exists()) {
index c7f7d4a..b671c35 100644 (file)
@@ -30,9 +30,9 @@ import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
-import eu.etaxonomy.cdm.model.location.Country;
 import eu.etaxonomy.cdm.model.location.NamedArea;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -173,8 +173,7 @@ public class NamedAreaSelectionDialog extends
                        String result = NamedArea.labelWithLevel(namedArea, CdmStore.getDefaultLanguage());
                        return result;
                } catch (Exception e) {
-                       //TODO still need to learn how errors are handled in the Tax Editor
-                       System.out.println("Error occurred when trying retrieve title for Named Area: " + namedArea.getUuid());
+                       MessagingUtils.error(NamedAreaSelectionDialog.class, "Error occurred when trying retrieve title for Named Area: " + namedArea.getUuid(), e);
                        return namedArea.getTitleCache();
                }
        }
index 03e13f8..147f7d4 100644 (file)
@@ -120,7 +120,6 @@ public class IdentifierDetailSection extends AbstractEntityCollectionSection<Der
        public void removeElement(Identifier element) {
            getEntity().removeIdentifier(getEntity().getIdentifiers().get(0));
            getConversationHolder().commit();
-           System.out.println();
        }
 
        /* (non-Javadoc)
index f53bc75..888a18e 100644 (file)
@@ -151,9 +151,7 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
                 FormatKey.MEDIA_TITLE, FormatKey.SPACE,
                 FormatKey.MEDIA_ARTIST, FormatKey.SPACE
                 );
-        System.out.println(formatter.format(element));
         return formatter.format(element);
-//        return getDerivateText(element);
     }
 
     /** {@inheritDoc} */