--- /dev/null
+package org.simantics.document.server.io;
+
+import java.util.Collection;
+
+public interface IConsoleSupport {
+ void registerConsole(String sessionGUID, IConsole console);
+ IConsole getConsole(String sessionGUID);
+ IConsole findConsole(String consoleGUID);
+ Collection<IConsole> getConsoles();
+}
--- /dev/null
+package org.simantics.document.server;
+
+import org.simantics.document.server.io.IConsole;
+import org.simantics.scl.runtime.reporting.SCLReportingHandler;
+
+public class ConsoleSCLReportingHandler implements SCLReportingHandler {
+
+ private final IConsole console;
+
+ public ConsoleSCLReportingHandler(IConsole console) {
+ this.console = console;
+ }
+
+ @Override
+ public void print(String text) {
+ console.addMessage(text);
+ }
+
+ @Override
+ public void printError(String error) {
+ console.addMessage(error);
+ }
+
+ @Override
+ public void printCommand(String command) {
+ console.addMessage(command);
+ }
+
+ @Override
+ public void didWork(double amount) {
+ console.addMessage("didWork " + amount);
+ }
+
+}
\ No newline at end of file
return graph.syncRequest(new PathExistsRequest(context));
}
- static class ConsoleSCLReportingHandler implements SCLReportingHandler {
-
- private final IConsole console;
-
- ConsoleSCLReportingHandler(IConsole console) {
- this.console = console;
- }
-
- @Override
- public void print(String text) {
- console.addMessage(text);
- }
-
- @Override
- public void printError(String error) {
- console.addMessage(error);
- }
-
- @Override
- public void printCommand(String command) {
- console.addMessage(command);
- }
-
- @Override
- public void didWork(double amount) {
- console.addMessage("didWork " + amount);
- }
-
- }
-
}
\ No newline at end of file