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 / model / impl / TraceSessionGroup.java
index fafa425a26715d7613764587aadb52f38f092141..90c0ca31beebe5c23fdc9a0a28c2e82ced8c7460 100644 (file)
@@ -12,6 +12,8 @@
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
 
+import java.util.List;
+
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
@@ -130,6 +132,20 @@ public class TraceSessionGroup extends TraceControlComponent {
         }
     }
 
+    /**
+     * Command to execute a list of commands
+     * @param monitor
+     *            - a progress monitor
+     * @param commands
+     *            - a list of commands to execute
+     * @throws ExecutionException
+     *            If the command fails
+     */
+    public void executeCommands(IProgressMonitor monitor, List<String> commands) throws ExecutionException {
+        getControlService().runCommands(monitor, commands);
+        getTargetNode().refresh();
+    }
+
     /**
      * Destroys a session with given session name.
      *
This page took 0.024436 seconds and 5 git commands to generate.