[292393] Revisited header search function
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng / src / org / eclipse / linuxtools / lttng / event / LttngEventReference.java
CommitLineData
5d10d135
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:
10 * William Bourque (wbourque@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12
13package org.eclipse.linuxtools.lttng.event;
14
15import org.eclipse.linuxtools.tmf.event.*;
16
17/**
07d9e2ee
FC
18 * <b><u>LttngEventReference</u></b><p>
19 *
5d10d135
ASL
20 * Lttng specific implementation of the TmfEventReference
21 */
22public class LttngEventReference extends TmfEventReference {
23
07d9e2ee 24 private String tracename = "";
5d10d135
ASL
25
26 /**
07d9e2ee 27 * Constructor with parameters.<p>
5d10d135 28 *
07d9e2ee
FC
29 * @param newTracefilePath Complete tracefile path
30 * @param newTraceName The Trace name
5d10d135 31 */
07d9e2ee 32 public LttngEventReference(String newTracefilePath, String newTraceName) {
5d10d135
ASL
33 super(newTracefilePath);
34
07d9e2ee
FC
35 // Save the name of the trace
36 tracename = newTraceName;
5d10d135
ASL
37 }
38
3fbd810a 39 /**
07d9e2ee 40 * Copy Constructor.<p>
3fbd810a 41 *
07d9e2ee 42 * @param oldReference LttngEventReference to copy from.
3fbd810a
FC
43 */
44 public LttngEventReference(LttngEventReference oldReference) {
45 this( oldReference.getValue().toString(), oldReference.getTracepath() );
46 }
47
5d10d135
ASL
48
49 public String getTracepath() {
07d9e2ee 50 return tracename;
5d10d135 51 }
3fbd810a 52
07d9e2ee
FC
53 public void setTracepath(String tracename) {
54 this.tracename = tracename;
5d10d135
ASL
55 }
56
07d9e2ee
FC
57 /**
58 * toString() method.<p>
59 *
60 * We return only tracename, as it will be used directly in the eventsView and it gives a better output.
61 *
62 * @return tracename as String
63 */
3fbd810a
FC
64 @Override
65 public String toString() {
07d9e2ee 66 return tracename;
3fbd810a
FC
67 }
68
5d10d135 69}
This page took 0.027555 seconds and 5 git commands to generate.