1 package org.simantics.document.server;
3 import org.simantics.document.server.io.IConsole;
4 import org.simantics.scl.runtime.reporting.SCLReportingHandler;
6 public class ConsoleSCLReportingHandler implements SCLReportingHandler {
8 private static final boolean PRINT_TO_IDE = true;
10 private final IConsole console;
12 public ConsoleSCLReportingHandler(IConsole console) {
13 this.console = console;
17 public void print(String text) {
18 if(PRINT_TO_IDE) System.err.println("simupedia console print: " + text);
19 console.addMessage(text);
23 public void printError(String error) {
24 if(PRINT_TO_IDE) System.err.println("simupedia console print error: " + error);
25 console.addMessage(error);
29 public void printCommand(String command) {
30 if(PRINT_TO_IDE) System.err.println("simupedia console print command: " + command);
31 console.addMessage(command);
35 public void didWork(double amount) {
36 console.addMessage("didWork " + amount);