lttng.control: add possibility to run a list of lttng commands
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.control.ui / src / org / eclipse / linuxtools / internal / lttng2 / control / ui / views / service / LTTngControlService.java
index 92a8b25f17441be43aa718e5d76ce14f038f461b..52e11c76d2453295eedbff045946a1982a63294a 100644 (file)
@@ -999,6 +999,20 @@ public class LTTngControlService implements ILttngControlService {
         executeCommand(command.toString(), monitor);
     }
 
+    @Override
+    public void runCommands(IProgressMonitor monitor, List<String> commands) throws ExecutionException {
+        for (String command : commands) {
+            if (monitor.isCanceled()) {
+                return;
+            }
+
+            if (command.isEmpty() || command.startsWith("#")) { //$NON-NLS-1$
+                continue;
+            }
+            executeCommand(command, monitor);
+        }
+    }
+
     // ------------------------------------------------------------------------
     // Helper methods
     // ------------------------------------------------------------------------
This page took 0.030429 seconds and 5 git commands to generate.