Optionally print also into IDE console 89/589/1
authorAntti Villberg <antti.villberg@semantum.fi>
Fri, 2 Jun 2017 10:19:02 +0000 (13:19 +0300)
committerAntti Villberg <antti.villberg@semantum.fi>
Fri, 2 Jun 2017 10:22:58 +0000 (13:22 +0300)
refs #7226

Change-Id: I52c900d8b495cb68eed028cc219dd56965447e7c

bundles/org.simantics.document.server/src/org/simantics/document/server/ConsoleSCLReportingHandler.java

index e227a89ca2472a8c0d597d7b859c5ab17aff3d23..fec8d600a421e0bf3c247b78924ad56579d51805 100644 (file)
@@ -5,6 +5,8 @@ import org.simantics.scl.runtime.reporting.SCLReportingHandler;
 
 public class ConsoleSCLReportingHandler implements SCLReportingHandler {
 
+       private static final boolean PRINT_TO_IDE = false;
+       
        private final IConsole console;
 
        public ConsoleSCLReportingHandler(IConsole console) {
@@ -13,16 +15,19 @@ public class ConsoleSCLReportingHandler implements SCLReportingHandler {
 
        @Override
        public void print(String text) {
+               if(PRINT_TO_IDE) System.err.println("simupedia console print: " + text);
                console.addMessage(text);
        }
 
        @Override
        public void printError(String error) {
+               if(PRINT_TO_IDE) System.err.println("simupedia console print error: " + error);
                console.addMessage(error);
        }
 
        @Override
        public void printCommand(String command) {
+               if(PRINT_TO_IDE) System.err.println("simupedia console print command: " + command);
                console.addMessage(command);
        }