import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.lttng.LttngConstants;
-import org.eclipse.linuxtools.lttng.tracecontrol.model.ProviderResource;
-import org.eclipse.linuxtools.lttng.tracecontrol.model.TargetResource;
-import org.eclipse.linuxtools.lttng.tracecontrol.model.TraceResource;
-import org.eclipse.linuxtools.lttng.tracecontrol.model.TraceResource.TraceState;
-import org.eclipse.linuxtools.lttng.tracecontrol.model.config.TraceConfig;
-import org.eclipse.linuxtools.lttng.tracecontrol.service.ILttControllerService;
-import org.eclipse.linuxtools.lttng.tracecontrol.service.LttControllerServiceProxy;
+import org.eclipse.linuxtools.lttng.core.LttngConstants;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.model.ProviderResource;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TargetResource;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource.TraceState;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.model.config.TraceConfig;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.service.ILttControllerService;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.service.LttControllerServiceProxy;
import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
// Create trace list
TraceResource[] traces = new TraceResource[str.length];
for (int i = 0; i < str.length; i++) {
- TraceResource trace = new TraceResource(TraceSubSystem.this);
+ TraceResource trace = new TraceResource(TraceSubSystem.this, service);
trace.setName(str[i]);
trace.setParent(target);
trace.setTraceState(TraceState.CREATED);
else if (str[1].equals("true")) { //$NON-NLS-1$
config.setMode(TraceConfig.NORMAL_MODE);
}
- else {
- config.setMode(TraceConfig.NONE_MODE);
- }
if (str[5].equals(TraceConfig.InvalidTracePath)) {
config.setNetworkTrace(true);
PauseTrace pauseAction = new PauseTrace();
pauseAction.setSelectedTraces(new ArrayList<TraceResource>(Arrays.asList(traces)));
pauseAction.run(null);
+ try {
+ Thread.sleep(2000); // allow time for target to pause traces before disconnecting the channel
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
}
});
}