changeset 7096:5c059c05b100 generator-refactoring

Add useful debug output for diagram generator debugging
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 23 Sep 2013 12:20:27 +0200
parents cdae0ff8960b
children c64c04d0796e
files artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Mon Sep 23 10:24:47 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Mon Sep 23 12:20:27 2013 +0200
@@ -1118,10 +1118,22 @@
 
         logger.debug("DoOut for facet: " + facetName);
 
-        for (Processor pr: diagramAttributes.getProcessors()) {
+        boolean found = false;
+        List<Processor> prL = diagramAttributes.getProcessors();
+        for (Processor pr: prL) {
             if (pr.canHandle(facetName)) {
+                found = true;
                 pr.doOut(this, bundle, theme, visible);
             }
         }
+        if (!found) {
+            logger.warn("No processor found for: " + facetName);
+            if (logger.isDebugEnabled()) {
+                logger.debug("Configured processors for this diagram are:");
+                for (Processor pr: prL) {
+                    logger.debug(pr.getClass().getName());
+                }
+            }
+        }
     }
 }

http://dive4elements.wald.intevation.org