lttng.control: Add support for enabling syscall by name
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.control.ui / src / org / eclipse / tracecompass / internal / lttng2 / control / ui / views / handlers / DisableEventHandler.java
1 /**********************************************************************
2 * Copyright (c) 2012, 2014 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org.eclipse.tracecompass.internal.lttng2.control.ui.views.handlers;
13
14 import java.util.List;
15
16 import org.eclipse.core.commands.ExecutionException;
17 import org.eclipse.core.runtime.IProgressMonitor;
18 import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceEnablement;
19 import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceEventType;
20 import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
21
22 /**
23 * <p>
24 * Command handler implementation to disable one or more events session, domain and channel.
25 * </p>
26 *
27 * @author Bernd Hufmann
28 */
29 public class DisableEventHandler extends ChangeEventStateHandler {
30
31 // ------------------------------------------------------------------------
32 // Accessors
33 // ------------------------------------------------------------------------
34
35 @Override
36 protected TraceEnablement getNewState() {
37 return TraceEnablement.DISABLED;
38 }
39
40 // ------------------------------------------------------------------------
41 // Operations
42 // ------------------------------------------------------------------------
43
44 @Override
45 protected void changeState(TraceChannelComponent channel, List<String> eventNames, TraceEventType eventType, IProgressMonitor monitor) throws ExecutionException{
46 channel.disableEvent(eventNames, monitor);
47 }
48 }
This page took 0.033196 seconds and 5 git commands to generate.