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 org
.eclipse
.core
.commands
.ExecutionException
;
15 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
16 import org
.eclipse
.linuxtools
.internal
.lttng2
.core
.control
.model
.TraceSessionState
;
17 import org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.model
.impl
.TraceSessionComponent
;
21 * Command handler implementation to stop one or more trace sessions.
24 * @author Bernd Hufmann
26 public class StopHandler
extends ChangeSessionStateHandler
{
28 // ------------------------------------------------------------------------
30 // ------------------------------------------------------------------------
33 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.ChangeSessionStateHandler#getNewState()
36 public TraceSessionState
getNewState() {
37 return TraceSessionState
.INACTIVE
;
40 // ------------------------------------------------------------------------
42 // ------------------------------------------------------------------------
45 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.ChangeSessionStateHandler#changeState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent, org.eclipse.core.runtime.IProgressMonitor)
48 public void changeState(TraceSessionComponent session
, IProgressMonitor monitor
) throws ExecutionException
{
49 session
.stopSession(monitor
);