tmf/lttng: Update 2014 copyrights
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.kernel.core / src / org / eclipse / linuxtools / lttng2 / kernel / core / analysis / LttngKernelAnalysisModule.java
CommitLineData
4bc53929 1/*******************************************************************************
60ae41e1 2 * Copyright (c) 2013, 2014 École Polytechnique de Montréal
4bc53929
GB
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 * Geneviève Bastien - Initial API and implementation
11 *******************************************************************************/
12
e3366401 13package org.eclipse.linuxtools.lttng2.kernel.core.analysis;
4bc53929
GB
14
15import org.eclipse.jdt.annotation.NonNull;
16import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
4bc53929
GB
17import org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace;
18import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
19import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
20import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
21import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
4bc53929
GB
22
23/**
24 * State System Module for lttng kernel traces
25 *
26 * @author Geneviève Bastien
27 * @since 3.0
28 */
29public class LttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
30
31 /**
32 * The file name of the History Tree
33 */
34 @NonNull
35 public static final String HISTORY_TREE_FILE_NAME = "stateHistory.ht"; //$NON-NLS-1$
36
37 /** The ID of this analysis module */
38 public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.analysis"; //$NON-NLS-1$
39
40 /**
41 * Constructor adding the views to the analysis
42 */
43 public LttngKernelAnalysisModule() {
44 super();
4bc53929
GB
45 }
46
47 @Override
48 public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
49 if (!(trace instanceof LttngKernelTrace)) {
50 throw new IllegalArgumentException("LttngKernelStateSystemModule: trace should be of type LttngKernelTrace"); //$NON-NLS-1$
51 }
52 super.setTrace(trace);
53 }
54
55 @Override
56 protected LttngKernelTrace getTrace() {
57 /* Cast should be safe because we check the type at the setTrace() */
58 return (LttngKernelTrace) super.getTrace();
59 }
60
61 @Override
62 @NonNull
63 protected ITmfStateProvider createStateProvider() {
64 return new LttngKernelStateProvider(getTrace());
65 }
66
4bc53929
GB
67 @Override
68 @NonNull
69 protected String getSsFileName() {
70 return HISTORY_TREE_FILE_NAME;
71 }
72
73 @Override
74 protected String getFullHelpText() {
e3366401 75 return Messages.LttngKernelAnalysisModule_Help;
4bc53929
GB
76 }
77
78}
This page took 0.029126 seconds and 5 git commands to generate.