Add new LTTng commands (create/destroy/start/stop session,
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.ui / src / org / eclipse / linuxtools / lttng / ui / views / control / handlers / StartHandler.java
CommitLineData
bbb3538a
BH
1/**********************************************************************
2 * Copyright (c) 2012 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 **********************************************************************/
12package org.eclipse.linuxtools.lttng.ui.views.control.handlers;
13
14import org.eclipse.core.commands.ExecutionException;
15import org.eclipse.core.runtime.IProgressMonitor;
16import org.eclipse.linuxtools.lttng.ui.views.control.model.TraceSessionState;
17import org.eclipse.linuxtools.lttng.ui.views.control.model.impl.TraceSessionComponent;
18
19/**
20 * <b><u>StartHandler</u></b>
21 * <p>
22 * Command handler implementation to start one or more trace sessions.
23 * </p>
24 */
25public class StartHandler extends ChangeSessionStateHandler {
26
27 // ------------------------------------------------------------------------
28 // Accessors
29 // ------------------------------------------------------------------------
30 /*
31 * (non-Javadoc)
32 * @see org.eclipse.linuxtools.lttng.ui.views.control.handlers.ChangeSessionStateHandler#getNewState()
33 */
34 @Override
35 public TraceSessionState getNewState() {
36 return TraceSessionState.ACTIVE;
37 }
38
39 // ------------------------------------------------------------------------
40 // Operations
41 // ------------------------------------------------------------------------
42 /*
43 * (non-Javadoc)
44 * @see org.eclipse.linuxtools.lttng.ui.views.control.handlers.ChangeSessionStateHandler#changeState(org.eclipse.linuxtools.lttng.ui.views.control.model.impl.TraceSessionComponent, org.eclipse.core.runtime.IProgressMonitor)
45 */
46 @Override
47 public void changeState(TraceSessionComponent session, IProgressMonitor monitor) throws ExecutionException {
48 session.startSession(monitor);
49 }
50}
This page took 0.031629 seconds and 5 git commands to generate.