import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.linuxtools.lttng.ui.views.control.ControlView;
+import org.eclipse.linuxtools.lttng.ui.views.control.model.LogLevelType;
+import org.eclipse.linuxtools.lttng.ui.views.control.model.TraceLogLevel;
+import org.eclipse.linuxtools.lttng.ui.views.control.model.TraceSessionState;
import org.eclipse.linuxtools.lttng.ui.views.control.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.lttng.ui.views.control.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.lttng.ui.views.control.model.impl.TraceSessionComponent;
import org.eclipse.ui.IWorkbenchPage;
/**
// ------------------------------------------------------------------------
/*
* (non-Javadoc)
- * @see org.eclipse.linuxtools.lttng.ui.views.control.handlers.BaseEnableEventHandler#enableEvents(java.util.List, org.eclipse.core.runtime.IProgressMonitor)
+ * @see org.eclipse.linuxtools.lttng.ui.views.control.handlers.BaseEnableEventHandler#enableEvents(java.util.List, boolean, org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
- void enableEvents(List<String> eventNames, IProgressMonitor monitor) throws ExecutionException {
+ public void enableEvents(List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
fChannel.enableEvents(eventNames, monitor);
}
* @see org.eclipse.linuxtools.lttng.ui.views.control.handlers.BaseEnableEventHandler#enableSyscalls(org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
- void enableSyscalls(IProgressMonitor monitor) throws ExecutionException {
+ public void enableSyscalls(IProgressMonitor monitor) throws ExecutionException {
fChannel.enableSyscalls(monitor);
}
/*
* (non-Javadoc)
- * @see org.eclipse.linuxtools.lttng.ui.views.control.handlers.BaseEnableEventHandler#enableProbe(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+ * @see org.eclipse.linuxtools.lttng.ui.views.control.handlers.BaseEnableEventHandler#enableProbe(java.lang.String, boolean, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
- void enableProbe(String eventName, String probe, IProgressMonitor monitor) throws ExecutionException {
- fChannel.enableProbe(eventName, probe, monitor);
+ public void enableProbe(String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
+ fChannel.enableProbe(eventName, isFunction, probe, monitor);
}
/*
* (non-Javadoc)
- * @see org.eclipse.linuxtools.lttng.ui.views.control.handlers.BaseEnableEventHandler#enableFunctionProbe(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+ * @see org.eclipse.linuxtools.lttng.ui.views.control.handlers.BaseEnableEventHandler#enableLogLevel(java.lang.String, org.eclipse.linuxtools.lttng.ui.views.control.model.LogLevelType, org.eclipse.linuxtools.lttng.ui.views.control.model.TraceLogLevel, org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
- void enableFunctionProbe(String eventName, String probe, IProgressMonitor monitor) throws ExecutionException {
- fChannel.enableFunctionProbe(eventName, probe, monitor);
+ public void enableLogLevel(String eventName, LogLevelType logLevelType, TraceLogLevel level, IProgressMonitor monitor) throws ExecutionException {
+ fChannel.enableLogLevel(eventName, logLevelType, level, monitor);
}
-
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.lttng.ui.views.control.handlers.BaseEnableEventHandler#getDomain()
+ */
+ @Override
+ public TraceDomainComponent getDomain() {
+ return (TraceDomainComponent) fChannel.getParent();
+ }
+
/*
* (non-Javadoc)
* @see org.eclipse.core.commands.AbstractHandler#isEnabled()
for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
Object element = (Object) iterator.next();
if (element instanceof TraceChannelComponent) {
- fChannel = (TraceChannelComponent) element;
- fSession = fChannel.getSession();
+ // Add only if corresponding TraceSessionComponents is inactive and not destroyed
+ TraceChannelComponent channel = (TraceChannelComponent) element;
+ TraceSessionComponent session = channel.getSession();
+ if(session.getSessionState() == TraceSessionState.INACTIVE && !session.isDestroyed()) {
+ fChannel = channel;
+ fSession = session;
+ }
}
}
}