From 66423923462b7971bff5ce591ec19f951d5e1828 Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Fri, 2 Jun 2017 13:19:02 +0300 Subject: [PATCH] Optionally print also into IDE console refs #7226 Change-Id: I52c900d8b495cb68eed028cc219dd56965447e7c --- .../document/server/ConsoleSCLReportingHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bundles/org.simantics.document.server/src/org/simantics/document/server/ConsoleSCLReportingHandler.java b/bundles/org.simantics.document.server/src/org/simantics/document/server/ConsoleSCLReportingHandler.java index e227a89ca..fec8d600a 100644 --- a/bundles/org.simantics.document.server/src/org/simantics/document/server/ConsoleSCLReportingHandler.java +++ b/bundles/org.simantics.document.server/src/org/simantics/document/server/ConsoleSCLReportingHandler.java @@ -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); } -- 2.47.1