Tag initial contribution.
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / event / TmfTraceEvent.java
1 /*******************************************************************************
2 * Copyright (c) 2009 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 * Francois Chouinard (fchouinard@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.event;
14
15 /**
16 * <b><u>TmfTraceEvent</u></b>
17 * <p>
18 * A trace event associates a source code line to an event. The intent is to
19 * provide the capability to open an editor at the line of code that produced
20 * the event.
21 * <p>
22 * TODO: Concept is still a bit vague and should be aligned with the CDT
23 * source lookup service.
24 */
25 public class TmfTraceEvent extends TmfEvent {
26
27 // ========================================================================
28 // Attributes
29 // ========================================================================
30
31 private final String fSourcePath;
32 private final String fFileName;
33 private final int fLineNumber;
34
35 // ========================================================================
36 // Constructors
37 // ========================================================================
38
39 /**
40 * The constructor.
41 *
42 * @param timestamp
43 * @param source
44 * @param type
45 * @param content
46 * @param reference
47 */
48 public TmfTraceEvent(TmfTimestamp timestamp, TmfEventSource source, TmfEventType type,
49 TmfEventContent content, TmfEventReference reference,
50 String path, String file, int line)
51 {
52 super(timestamp, source, type,content, reference);
53 fSourcePath = path;
54 fFileName = file;
55 fLineNumber = line;
56 }
57
58 // ========================================================================
59 // Accessors
60 // ========================================================================
61
62 /**
63 * @return
64 */
65 public String getSourcePath() {
66 return fSourcePath;
67 }
68
69 /**
70 * @return
71 */
72 public String getFileName() {
73 return fFileName;
74 }
75
76 /**
77 * @return
78 */
79 public int getLineNumber() {
80 return fLineNumber;
81 }
82
83 }
This page took 0.03375 seconds and 6 git commands to generate.