X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=org.eclipse.linuxtools.lttng2.ui%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Finternal%2Flttng2%2Fui%2Fviews%2Fcontrol%2Fmodel%2Fimpl%2FTraceEventComponent.java;h=7c2f85a224eb5f0405bdd342d9a78e0a4ad22d38;hb=b793fbe189d9901aaad63d3d58d024fd3bf5c23f;hp=f67b3cff0c999cba0627f28d0e8d351e94995de1;hpb=157906bbd2d4e6008a9353d4a4b8e3ca9ee76080;p=deliverable%2Ftracecompass.git diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceEventComponent.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceEventComponent.java index f67b3cff0c..7c2f85a224 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceEventComponent.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceEventComponent.java @@ -11,6 +11,11 @@ **********************************************************************/ package org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl; +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.ui.Activator; import org.eclipse.linuxtools.internal.lttng2.ui.views.control.Messages; import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IEventInfo; @@ -182,6 +187,13 @@ public class TraceEventComponent extends TraceControlComponent { return ((TraceChannelComponent)getParent()).getSessionName(); } + /** + * @return session from parent + */ + public TraceSessionComponent getSession() { + return ((TraceChannelComponent)getParent()).getSession(); + } + /** * @return channel name from parent */ @@ -199,4 +211,23 @@ public class TraceEventComponent extends TraceControlComponent { // ------------------------------------------------------------------------ // Operations // ------------------------------------------------------------------------ + + /** + * Add contexts to given channels and or events + * @param contexts - a list of contexts to add + * @throws ExecutionException + */ + public void addContexts(List contexts) throws ExecutionException { + addContexts(contexts, new NullProgressMonitor()); + } + + /** + * Add contexts to given channels and or events + * @param contexts - a list of contexts to add + * @param monitor - a progress monitor + * @throws ExecutionException + */ + public void addContexts(List contexts, IProgressMonitor monitor) throws ExecutionException { + getControlService().addContexts(getSessionName(),getChannelName(), getName(), isKernel(), contexts, monitor); + } }