]> gerrit.simantics Code Review - simantics/platform.git/blob
e227a89ca2472a8c0d597d7b859c5ab17aff3d23
[simantics/platform.git] /
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 final IConsole console;
9
10         public ConsoleSCLReportingHandler(IConsole console) {
11                 this.console = console;
12         }
13
14         @Override
15         public void print(String text) {
16                 console.addMessage(text);
17         }
18
19         @Override
20         public void printError(String error) {
21                 console.addMessage(error);
22         }
23
24         @Override
25         public void printCommand(String command) {
26                 console.addMessage(command);
27         }
28
29         @Override
30         public void didWork(double amount) {
31                 console.addMessage("didWork " + amount);
32         }
33
34 }