1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
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
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.handlers
;
14 import java
.util
.List
;
16 import org
.eclipse
.core
.commands
.ExecutionException
;
17 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
18 import org
.eclipse
.linuxtools
.internal
.lttng2
.core
.control
.model
.TraceEnablement
;
19 import org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.model
.impl
.TraceDomainComponent
;
23 * Command handler implementation to enable one or more trace channels per session and domain.
26 * @author Bernd Hufmann
28 public class EnableChannelHandler
extends ChangeChannelStateHandler
{
30 // ------------------------------------------------------------------------
32 // ------------------------------------------------------------------------
35 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseChangeChannelStateHandler#getNewState()
38 protected TraceEnablement
getNewState() {
39 return TraceEnablement
.ENABLED
;
42 // ------------------------------------------------------------------------
44 // ------------------------------------------------------------------------
47 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseChangeChannelStateHandler#changeState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceDomainComponent, java.util.List, org.eclipse.core.runtime.IProgressMonitor)
50 protected void changeState(TraceDomainComponent domain
, List
<String
> channelNames
, IProgressMonitor monitor
) throws ExecutionException
{
51 domain
.enableChannels(channelNames
, null, monitor
);