import org.eclipse.linuxtools.lttng.ui.views.control.model.TraceEnablement;
import org.eclipse.linuxtools.lttng.ui.views.control.model.TraceEventType;
import org.eclipse.linuxtools.lttng.ui.views.control.model.TraceLogLevel;
+import org.eclipse.linuxtools.lttng.ui.views.control.property.TraceEventPropertySource;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.views.properties.IPropertySource;
/**
- * <b><u>TraceChannelComponent</u></b>
+ * <b><u>TraceEventComponent</u></b>
* <p>
* Implementation of the trace channel component.
* </p>
/**
* The event information.
*/
- private IEventInfo fEventInfo = null;
+ protected IEventInfo fEventInfo = null;
/**
* The image to be displayed when in disabled state.
*/
fEventInfo.setLogLevel(levelName);
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.lttng.ui.views.control.model.impl.TraceControlComponent#getAdapter(java.lang.Class)
+ */
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return new TraceEventPropertySource(this);
+ }
+ return null;
+ }
+
+ /**
+ * @return session name from parent
+ */
+ public String getSessionName() {
+ return ((TraceChannelComponent)getParent()).getSessionName();
+ }
+
+ /**
+ * @return channel name from parent
+ */
+ public String getChannelName() {
+ return getParent().getName();
+ }
+
+ /**
+ * @return if domain is kernel or UST
+ */
+ public boolean isKernel() {
+ return ((TraceChannelComponent)getParent()).isKernel();
+ }
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------