aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Khouzam2012-04-12 11:43:24 (EDT)
committerFrancois Chouinard2012-04-16 14:20:35 (EDT)
commit8c5b11f630b587e89547a612f62f9effd6d85eb1 (patch)
tree13456671b8b3e4753ac8913c1b26cb92ad085a3f
parent2fd7a9dc550d8df9d9a2cb9be39b4de2ef98880d (diff)
downloadorg.eclipse.linuxtools-8c5b11f630b587e89547a612f62f9effd6d85eb1.zip
org.eclipse.linuxtools-8c5b11f630b587e89547a612f62f9effd6d85eb1.tar.gz
org.eclipse.linuxtools-8c5b11f630b587e89547a612f62f9effd6d85eb1.tar.bz2
add Environment variables to ctf interface
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java
index c06820f..a4c7616 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java
@@ -125,6 +125,21 @@ public class CtfTmfTrace extends TmfEventProvider<CtfTmfEvent> implements
// Accessors
// ------------------------------------------------------------------------
+ public int getNbEnvVars() {
+ return this.fTrace.getEnvironment().size();
+ }
+
+
+ public String[] getEnvNames() {
+ String[] s = new String[getNbEnvVars()];
+ return this.fTrace.getEnvironment().keySet().toArray(s);
+ }
+
+ public String getEnvValue(String key) {
+ return this.fTrace.getEnvironment().get(key);
+ }
+
+
/**
* @return the trace path
*/
@@ -145,7 +160,7 @@ public class CtfTmfTrace extends TmfEventProvider<CtfTmfEvent> implements
@Override
public int getIndexPageSize() {
- return 50000; //not true, but it works
+ return 50000; // not true, but it works
}
@Override
@@ -287,7 +302,7 @@ public class CtfTmfTrace extends TmfEventProvider<CtfTmfEvent> implements
@SuppressWarnings("unused")
@Override
- public CtfTmfEvent getNextEvent( ITmfContext context) {
+ public CtfTmfEvent getNextEvent(ITmfContext context) {
iterator.advance();
return iterator.getCurrentEvent();
}
@@ -312,4 +327,6 @@ public class CtfTmfTrace extends TmfEventProvider<CtfTmfEvent> implements
return fTrace;
}
+
+
}