]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.graph/src/org/simantics/graph/representation/PrettyPrintTG.java
Some minor fixes for pretty printing TG
[simantics/platform.git] / bundles / org.simantics.graph / src / org / simantics / graph / representation / PrettyPrintTG.java
index bb776d5df649eaa08ac455942e453718c9d2a721..0640f42f495ccc646f4770435ccf300bb834afef 100644 (file)
@@ -43,6 +43,8 @@ public class PrettyPrintTG {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(PrettyPrintTG.class);
     
+    private static final boolean DEBUG = false;
+    
        int blankCounter = 0;
        MessageDigest m;
 
@@ -137,8 +139,7 @@ public class PrettyPrintTG {
        }
 
        void discoverOwners(TransferableGraph1 graph, ResourceInfo info) {
-           if (LOGGER.isDebugEnabled())
-               LOGGER.debug("Discovering owners for " + info);
+           log("Discovering owners for " + info);
                int resource = info.resource;
                TIntArrayList statements = TransferableGraphUtils.getStatements(graph, resource);
                for(int i=0;i<statements.size();i+=2) {
@@ -664,4 +665,9 @@ public class PrettyPrintTG {
                }
        }
 
+    private static void log(String string) {
+        if (LOGGER.isDebugEnabled() && DEBUG)
+            LOGGER.debug(string);
+    }
+
 }