--- /dev/null
+package org.simantics.modeling.tests.commands;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
+import org.simantics.db.debug.ListenerReport;
+import org.simantics.db.service.DebugSupport;
+import org.simantics.db.testing.common.CommandSequenceEnvironment;
+import org.simantics.db.testing.common.WriteCommand;
+
+public class PrintListeners extends WriteCommand<CommandSequenceEnvironment> {
+
+ @Override
+ public void run(CommandSequenceEnvironment environment) throws Exception {
+
+ DebugSupport ds = environment.getSession().getService(DebugSupport.class);
+ ListenerReport report = ds.query(environment.getSession(), "get listeners");
+
+ ByteArrayOutputStream bo = new ByteArrayOutputStream();
+ PrintStream ps = new PrintStream(bo);
+ report.print(ps);
+ System.err.println("listeners: " + bo.toString());
+
+ }
+
+}
\ No newline at end of file