]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.debug.graphical/src/org/simantics/debug/graphical/DebuggerCanvasProxy.java
Introduce DebuggerCanvasProxy to avoid compile time AWT toolkit init
[simantics/platform.git] / bundles / org.simantics.debug.graphical / src / org / simantics / debug / graphical / DebuggerCanvasProxy.java
diff --git a/bundles/org.simantics.debug.graphical/src/org/simantics/debug/graphical/DebuggerCanvasProxy.java b/bundles/org.simantics.debug.graphical/src/org/simantics/debug/graphical/DebuggerCanvasProxy.java
new file mode 100644 (file)
index 0000000..bf7a738
--- /dev/null
@@ -0,0 +1,32 @@
+package org.simantics.debug.graphical;
+
+import org.simantics.db.Resource;
+import org.simantics.scl.runtime.function.Function;
+
+/**
+ * <code>Simantics/GraphicalDebugger</code> SCL API to avoid undesired AWT
+ * toolkit initialization.
+ * 
+ * @author Tuukka Lehtonen
+ */
+public class DebuggerCanvasProxy {
+
+    DebuggerCanvas canvas;
+
+    public void setStatementFilter(@SuppressWarnings("rawtypes") Function statementFilter) {
+        canvas.setStatementFilter(statementFilter);
+    }
+
+    public void removeStatementFilter() {
+        canvas.removeStatementFilter();
+    }
+
+    public void addResource(Resource resource) {
+        canvas.addResource(resource);
+    }
+
+    public DebuggerCanvasProxy(DebuggerCanvas canvas) {
+        this.canvas = canvas;
+    }
+
+}