Merge branch 'master' into lttng-kepler
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / signal / TmfTraceOpenedSignal.java
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 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.core.signal;
14
15 import org.eclipse.core.resources.IFile;
16 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
17
18 /**
19 * Signal indicating a trace has been opened.
20 *
21 * Receivers can get ready to receive TmfTraceRangeUpdatedSignal for coalescing
22 * and can expect TmfTraceSelectedSignal to follow.
23 *
24 * @version 1.0
25 * @author Patrick Tasse
26 * @since 2.0
27 */
28 public class TmfTraceOpenedSignal extends TmfSignal {
29
30 private final ITmfTrace fTrace;
31 private final IFile fBookmarksFile;
32
33 /**
34 * Constructor for a new signal.
35 *
36 * @param source
37 * The object sending this signal
38 * @param trace
39 * The trace that has been opened
40 * @param bookmarksFile
41 * Pointer to the bookmark file
42 */
43 public TmfTraceOpenedSignal(Object source, ITmfTrace trace, IFile bookmarksFile) {
44 super(source);
45 fTrace = trace;
46 fBookmarksFile = bookmarksFile;
47 }
48
49 /**
50 * Get the trace object concerning this signal
51 *
52 * @return The trace
53 */
54 public ITmfTrace getTrace() {
55 return fTrace;
56 }
57
58 /**
59 * Get a pointer to the bookmark file of this trace
60 *
61 * @return The IFile object
62 */
63 public IFile getBookmarksFile() {
64 return fBookmarksFile;
65 }
66
67 @Override
68 public String toString() {
69 return "[TmfTraceOpenedSignal (" + fTrace.getName() + ")]"; //$NON-NLS-1$ //$NON-NLS-2$
70 }
71 }
This page took 0.031956 seconds and 5 git commands to generate.