Added some more JUnit tests
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.ui / src / org / eclipse / linuxtools / lttng / ui / views / control / model / impl / TraceChannelComponent.java
index 7e48a1a2c140091cd6edaeb0b9db8bcefbace630..d3572a81dd46f06f44692eb5c4103f503e246a91 100644 (file)
@@ -21,7 +21,9 @@ import org.eclipse.linuxtools.lttng.ui.views.control.Messages;
 import org.eclipse.linuxtools.lttng.ui.views.control.model.IChannelInfo;
 import org.eclipse.linuxtools.lttng.ui.views.control.model.IEventInfo;
 import org.eclipse.linuxtools.lttng.ui.views.control.model.ITraceControlComponent;
+import org.eclipse.linuxtools.lttng.ui.views.control.model.LogLevelType;
 import org.eclipse.linuxtools.lttng.ui.views.control.model.TraceEnablement;
+import org.eclipse.linuxtools.lttng.ui.views.control.model.TraceLogLevel;
 import org.eclipse.linuxtools.lttng.ui.views.control.property.TraceChannelPropertySource;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.views.properties.IPropertySource;
@@ -97,7 +99,13 @@ public class TraceChannelComponent extends TraceControlComponent {
         fChannelInfo = channelInfo;
         IEventInfo[] events = fChannelInfo.getEvents();
         for (int i = 0; i < events.length; i++) {
-            TraceEventComponent event = new TraceEventComponent(events[i].getName(), this);
+            TraceEventComponent event = null;
+            if (events[i].getClass() == ProbeEventInfo.class) {
+                event = new TraceProbeEventComponent(events[i].getName(), this);
+            } else {
+                event = new TraceEventComponent(events[i].getName(), this);
+            }
+
             event.setEventInfo(events[i]);
             addChild(event);
         }
@@ -284,45 +292,49 @@ public class TraceChannelComponent extends TraceControlComponent {
     /**
      * Enables a dynamic probe (for kernel domain)
      * @param eventName - event name for probe
+     * @param isFunction - true for dynamic function entry/return probe else false
      * @param probe - the actual probe
      * @throws ExecutionException
      */
-    public void enableProbe(String eventName, String probe) throws ExecutionException {
-        enableProbe(eventName, probe, new NullProgressMonitor());
+    public void enableProbe(String eventName, boolean isFunction, String probe) throws ExecutionException {
+        enableProbe(eventName, isFunction, probe, new NullProgressMonitor());
     }
 
     /**
      * Enables a dynamic probe (for kernel domain)
      * @param eventName - event name for probe
+     * @param isFunction - true for dynamic function entry/return probe else false 
      * @param probe - the actual probe
      * @param monitor - a progress monitor
      * @throws ExecutionException
      */
-    public void enableProbe(String eventName, String probe, IProgressMonitor monitor) throws ExecutionException {
-        getControlService().enableProbe(getSessionName(), getName(), eventName, probe, monitor);
+    public void enableProbe(String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
+        getControlService().enableProbe(getSessionName(), getName(), eventName, isFunction, probe, monitor);
     }
 
     /**
-     * Enables a dynamic function entry/return probe (for kernel domain)
-     * @param eventName - event name for probe
-     * @param probe - the actual probe
+     * Enables events using log level.
+     * @param eventName - a event name
+     * @param logLevelType - a log level type 
+     * @param level - a log level 
      * @throws ExecutionException
      */
-    public void enableFunctionProbe(String eventName, String probe) throws ExecutionException {
-        enableFunctionProbe(eventName, probe, new NullProgressMonitor());
+    public void enableLogLevel(String eventName, LogLevelType logLevelType, TraceLogLevel level) throws ExecutionException {
+        enableLogLevel(eventName, logLevelType, level, new NullProgressMonitor());
     }
-    
+
     /**
-     * Enables a dynamic function entry/return probe (for kernel domain)
-     * @param eventName - event name for probe
-     * @param probe - the actual probe
-     * @param monitor - a progress monitor
+     * Enables events using log level.
+     * @param eventName - a event name
+     * @param logLevelType - a log level type 
+     * @param level - a log level 
+     * @param monitor - a progress monitor  
      * @throws ExecutionException
      */
-    public void enableFunctionProbe(String eventName, String probe, IProgressMonitor monitor) throws ExecutionException {
-        getControlService().enableFunctionProbe(getSessionName(), getName(), eventName, probe, monitor);
+    public void enableLogLevel(String eventName, LogLevelType logLevelType, TraceLogLevel level, IProgressMonitor monitor) throws ExecutionException {
+        getControlService().enableLogLevel(getSessionName(), getName(), eventName, logLevelType, level, monitor);
     }
-    
+
     /**
      * Enables a list of events with no additional parameters.
      * @param eventNames - a list of event names to enabled.
This page took 0.024802 seconds and 5 git commands to generate.