Commit | Line | Data |
---|---|---|
bbb3538a | 1 | /********************************************************************** |
11252342 AM |
2 | * Copyright (c) 2012, 2013 Ericsson |
3 | * | |
bbb3538a 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: | |
bbb3538a BH |
10 | * Bernd Hufmann - Initial API and implementation |
11 | **********************************************************************/ | |
115b4a01 | 12 | package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers; |
bbb3538a BH |
13 | |
14 | import org.eclipse.core.commands.ExecutionException; | |
15 | import org.eclipse.core.runtime.IProgressMonitor; | |
9315aeee | 16 | import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceSessionState; |
115b4a01 | 17 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent; |
bbb3538a BH |
18 | |
19 | /** | |
bbb3538a BH |
20 | * <p> |
21 | * Command handler implementation to start one or more trace sessions. | |
22 | * </p> | |
11252342 | 23 | * |
dbd4432d | 24 | * @author Bernd Hufmann |
bbb3538a BH |
25 | */ |
26 | public class StartHandler extends ChangeSessionStateHandler { | |
27 | ||
28 | // ------------------------------------------------------------------------ | |
29 | // Accessors | |
30 | // ------------------------------------------------------------------------ | |
11252342 | 31 | |
bbb3538a BH |
32 | @Override |
33 | public TraceSessionState getNewState() { | |
34 | return TraceSessionState.ACTIVE; | |
35 | } | |
11252342 | 36 | |
bbb3538a BH |
37 | // ------------------------------------------------------------------------ |
38 | // Operations | |
39 | // ------------------------------------------------------------------------ | |
11252342 | 40 | |
bbb3538a BH |
41 | @Override |
42 | public void changeState(TraceSessionComponent session, IProgressMonitor monitor) throws ExecutionException { | |
43 | session.startSession(monitor); | |
44 | } | |
45 | } |