lttng: Disallow adding contexts on events for v2.2 or later (419455)
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / model / impl / TraceEventComponent.java
index 2a64ffbbbf163f9acf7097bb9c3254f22e070a0d..31ce99c81c3694540104a9d787e0ab64aa06bc96 100644 (file)
@@ -16,7 +16,6 @@ import java.util.List;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.IEventInfo;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceEnablement;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceEventType;
@@ -81,10 +80,7 @@ public class TraceEventComponent extends TraceControlComponent {
     // ------------------------------------------------------------------------
     // Accessors
     // ------------------------------------------------------------------------
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getImage()
-     */
+
     @Override
     public Image getImage() {
         if (fEventInfo.getState() == TraceEnablement.DISABLED) {
@@ -186,10 +182,6 @@ public class TraceEventComponent extends TraceControlComponent {
         fEventInfo.setFilterExpression(filter);
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getAdapter(java.lang.Class)
-     */
     @Override
     public Object getAdapter(Class adapter) {
         if (adapter == IPropertySource.class) {
@@ -198,6 +190,13 @@ public class TraceEventComponent extends TraceControlComponent {
         return null;
     }
 
+    /**
+     * @return target node component.
+     */
+    public TargetNodeComponent getTargetNode() {
+        return ((TraceChannelComponent)getParent()).getTargetNode();
+    }
+
     /**
      * @return session name from parent
      */
@@ -230,18 +229,6 @@ public class TraceEventComponent extends TraceControlComponent {
     // Operations
     // ------------------------------------------------------------------------
 
-    /**
-     * Add contexts to given channels and or events
-     *
-     * @param contexts
-     *            - a list of contexts to add
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void addContexts(List<String> contexts) throws ExecutionException {
-        addContexts(contexts, new NullProgressMonitor());
-    }
-
     /**
      * Add contexts to given channels and or events
      *
This page took 0.024542 seconds and 5 git commands to generate.