Commit | Line | Data |
---|---|---|
6503ae0f | 1 | /********************************************************************** |
ed902a2b | 2 | * Copyright (c) 2012, 2014 Ericsson |
11252342 | 3 | * |
6503ae0f BH |
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 | |
11252342 AM |
8 | * |
9 | * Contributors: | |
6503ae0f BH |
10 | * Bernd Hufmann - Initial API and implementation |
11 | **********************************************************************/ | |
9bc60be7 | 12 | package org.eclipse.tracecompass.internal.lttng2.control.ui.views.handlers; |
6503ae0f BH |
13 | |
14 | import java.util.List; | |
15 | ||
16 | import org.eclipse.core.commands.ExecutionException; | |
17 | import org.eclipse.core.runtime.IProgressMonitor; | |
9bc60be7 | 18 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceEnablement; |
207ff523 | 19 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceEventType; |
9bc60be7 | 20 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent; |
6503ae0f BH |
21 | |
22 | /** | |
6503ae0f BH |
23 | * <p> |
24 | * Command handler implementation to disable one or more events session, domain and channel. | |
25 | * </p> | |
11252342 | 26 | * |
dbd4432d | 27 | * @author Bernd Hufmann |
6503ae0f BH |
28 | */ |
29 | public class DisableEventHandler extends ChangeEventStateHandler { | |
30 | ||
31 | // ------------------------------------------------------------------------ | |
32 | // Accessors | |
33 | // ------------------------------------------------------------------------ | |
11252342 | 34 | |
6503ae0f BH |
35 | @Override |
36 | protected TraceEnablement getNewState() { | |
37 | return TraceEnablement.DISABLED; | |
38 | } | |
39 | ||
40 | // ------------------------------------------------------------------------ | |
41 | // Operations | |
42 | // ------------------------------------------------------------------------ | |
11252342 | 43 | |
6503ae0f | 44 | @Override |
207ff523 | 45 | protected void changeState(TraceChannelComponent channel, List<String> eventNames, TraceEventType eventType, IProgressMonitor monitor) throws ExecutionException{ |
6503ae0f BH |
46 | channel.disableEvent(eventNames, monitor); |
47 | } | |
48 | } |