Commit | Line | Data |
---|---|---|
8c8bf09f ASL |
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: | |
4ab33d2b | 10 | * Francois Chouinard (fchouinard@gmail.com) - Initial API and implementation |
8c8bf09f ASL |
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. | |
8c8bf09f ASL |
24 | */ |
25 | public class TmfTraceEvent extends TmfEvent { | |
26 | ||
4ab33d2b | 27 | // ======================================================================== |
8c8bf09f | 28 | // Attributes |
4ab33d2b | 29 | // ======================================================================== |
8c8bf09f ASL |
30 | |
31 | private final String fSourcePath; | |
32 | private final String fFileName; | |
4ab33d2b | 33 | private final int fLineNumber; |
8c8bf09f | 34 | |
4ab33d2b | 35 | // ======================================================================== |
8c8bf09f | 36 | // Constructors |
4ab33d2b | 37 | // ======================================================================== |
8c8bf09f ASL |
38 | |
39 | /** | |
4ab33d2b AO |
40 | * The constructor. |
41 | * | |
8c8bf09f ASL |
42 | * @param timestamp |
43 | * @param source | |
44 | * @param type | |
45 | * @param content | |
46 | * @param reference | |
8c8bf09f ASL |
47 | */ |
48 | public TmfTraceEvent(TmfTimestamp timestamp, TmfEventSource source, TmfEventType type, | |
4ab33d2b AO |
49 | TmfEventContent content, TmfEventReference reference, |
50 | String path, String file, int line) | |
8c8bf09f | 51 | { |
4ab33d2b | 52 | super(timestamp, source, type,content, reference); |
8c8bf09f | 53 | fSourcePath = path; |
4ab33d2b | 54 | fFileName = file; |
8c8bf09f ASL |
55 | fLineNumber = line; |
56 | } | |
57 | ||
4ab33d2b | 58 | // ======================================================================== |
8c8bf09f | 59 | // Accessors |
4ab33d2b | 60 | // ======================================================================== |
8c8bf09f ASL |
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 | ||
8c8bf09f | 83 | } |