]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.document.server/src/org/simantics/document/server/ConsoleSCLReportingHandler.java
Removed graph compilation nature from org.simantics.jdbc
[simantics/platform.git] / bundles / org.simantics.document.server / src / org / simantics / document / server / ConsoleSCLReportingHandler.java
1 package org.simantics.document.server;
2
3 import org.simantics.document.server.io.IConsole;
4 import org.simantics.scl.runtime.reporting.SCLReportingHandler;
5
6 public class ConsoleSCLReportingHandler implements SCLReportingHandler {
7
8         private static final boolean PRINT_TO_IDE = true;
9         
10         private final IConsole console;
11
12         public ConsoleSCLReportingHandler(IConsole console) {
13                 this.console = console;
14         }
15
16         @Override
17         public void print(String text) {
18                 if(PRINT_TO_IDE) System.err.println("simupedia console print: " + text);
19                 console.addMessage(text);
20         }
21
22         @Override
23         public void printError(String error) {
24                 if(PRINT_TO_IDE) System.err.println("simupedia console print error: " + error);
25                 console.addMessage(error);
26         }
27
28         @Override
29         public void printCommand(String command) {
30                 if(PRINT_TO_IDE) System.err.println("simupedia console print command: " + command);
31                 console.addMessage(command);
32         }
33
34         @Override
35         public void didWork(double amount) {
36                 console.addMessage("didWork " + amount);
37         }
38
39 }