* @param markerName Name of the parent marker
* @param markerFieldPtr C Pointer (converted in long) to marker_field C Structure
*/
- @SuppressWarnings("unused")
private void addMarkerFieldFromC(String markerFieldName, long markerFieldPtr) {
// Create a new Jaf_markerField object and insert it in the map
// the maker field fill itself with LTT data while being constructed
* @param stringToAdd The parsed data to add
* @param formatToAdd The format of the raw data
*/
- @SuppressWarnings("unused")
static private void addStringToParsingFromC(Object contentHolder, String stringToAdd) {
((ParsedObjectContent)contentHolder).setData( stringToAdd);
}
* @param pointerToAdd The parsed data to add (in 64 bits long!)
* @param formatToAdd The format of the raw data
*/
- @SuppressWarnings("unused")
static private void addLongPointerToParsingFromC(Object contentHolder, long pointerToAdd) {
((ParsedObjectContent)contentHolder).setData( new Jni_C_Pointer((long) pointerToAdd));
}
* @param pointerToAdd The parsed data to add (converted in 64 bits long!)
* @param formatToAdd The format of the raw data
*/
- @SuppressWarnings("unused")
static private void addIntPointerToParsingFromC(Object contentHolder, long pointerToAdd) {
((ParsedObjectContent)contentHolder).setData( new Jni_C_Pointer((int) pointerToAdd));
}
* @param shortToAdd The parsed data to add
* @param formatToAdd The format of the raw data
*/
- @SuppressWarnings("unused")
static private void addShortToParsingFromC(Object contentHolder, short shortToAdd) {
((ParsedObjectContent)contentHolder).setData( new Short(shortToAdd));
}
* @param intToAdd The parsed data to add
* @param formatToAdd The format of the raw data
*/
- @SuppressWarnings("unused")
static private void addIntegerToParsingFromC(Object contentHolder, int intToAdd) {
((ParsedObjectContent)contentHolder).setData( new Integer(intToAdd));
}
* @param longToAdd The parsed data to add
* @param formatToAdd The format of the raw data
*/
- @SuppressWarnings("unused")
static private void addLongToParsingFromC(Object contentHolder, long longToAdd) {
((ParsedObjectContent)contentHolder).setData( new Long(longToAdd));
}
* @param floatToAdd The parsed data to add
* @param formatToAdd The format of the raw data
*/
- @SuppressWarnings("unused")
static private void addFloatToParsingFromC(Object contentHolder, float floatToAdd) {
((ParsedObjectContent)contentHolder).setData( new Float(floatToAdd));
}
* @param doubleToAdd The parsed data to add
* @param formatToAdd The format of the raw data
*/
- @SuppressWarnings("unused")
static private void addDoubleToParsingFromC(Object contentHolder, double doubleToAdd) {
((ParsedObjectContent)contentHolder).setData( new Double(doubleToAdd));
}
}
- public void finalize() {
+ @Override
+ public void finalize() {
// If the trace is open, close it
if (thisTracePtr.getPointer() != NULL) {
closeTrace();
* @param markerId Id of the marker (int)
* @param markerInfoPtr C Pointer to a marker_info C structure
*/
- @SuppressWarnings("unused")
private void addMarkersFromC(int markerId, long markerInfoPtr) {
// Create a new tracefile object and insert it in the map
// the tracefile fill itself with LTT data while being constructed
private int majorNumber = 0;
private int minorNumber = 0;
- @SuppressWarnings("unused")
private JniTraceVersion() {
}
return minorNumber;
}
- @SuppressWarnings("unused")
private void setTraceVersionFromC(int newMajor, int newMinor) {
majorNumber = newMajor;
minorNumber = newMinor;
}
+ @Override
public String toString() {
return majorNumber + "." + minorNumber;
}
}
- public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer newMarkerFieldPtr) throws JniException {
+ @Override
+ public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer newMarkerFieldPtr) throws JniException {
return new JniMarkerField_v2_3(newMarkerFieldPtr);
}
public class JniTrace_v2_3 extends JniTrace {
+ @SuppressWarnings("unused")
private static final String LIBRARY_NAME = "liblttvtraceread2.3.so";
protected JniTrace_v2_3() {
}
- public boolean initializeLibrary() {
+ @Override
+ public boolean initializeLibrary() {
// *** FIXME ***
// To change as soon as the library will be able to load multiple version at once
//return ltt_initializeHandle(LIBRARY_NAME);
}
- public JniTracefile allocateNewJniTracefile(Jni_C_Pointer newPtr, JniTrace newParentTrace) throws JniException {
+ @Override
+ public JniTracefile allocateNewJniTracefile(Jni_C_Pointer newPtr, JniTrace newParentTrace) throws JniException {
return new JniTracefile_v2_3(newPtr, newParentTrace);
}
}
- public JniEvent allocateNewJniEvent(Jni_C_Pointer newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
+ @Override
+ public JniEvent allocateNewJniEvent(Jni_C_Pointer newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
return new JniEvent_v2_3(newEventPtr, newMarkersMap, newParentTracefile);
}
- public JniMarker allocateNewJniMarker(Jni_C_Pointer newMarkerPtr) throws JniException {
+ @Override
+ public JniMarker allocateNewJniMarker(Jni_C_Pointer newMarkerPtr) throws JniException {
return new JniMarker_v2_3(newMarkerPtr);
}
}
- public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer newMarkerFieldPtr) throws JniException {
+ @Override
+ public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer newMarkerFieldPtr) throws JniException {
return new JniMarkerField_v2_5(newMarkerFieldPtr);
}
public class JniTrace_v2_5 extends JniTrace {
+ @SuppressWarnings("unused")
private static final String LIBRARY_NAME = "liblttvtraceread2.5.so";
protected JniTrace_v2_5() {
}
- public boolean initializeLibrary() {
+ @Override
+ public boolean initializeLibrary() {
// *** FIXME ***
// To change as soon as the library will be able to load multiple version at once
//return ltt_initializeHandle(LIBRARY_NAME);
return true;
}
- public JniTracefile allocateNewJniTracefile(Jni_C_Pointer newPtr, JniTrace newParentTrace) throws JniException {
+ @Override
+ public JniTracefile allocateNewJniTracefile(Jni_C_Pointer newPtr, JniTrace newParentTrace) throws JniException {
return new JniTracefile_v2_5(newPtr, newParentTrace);
}
}
- public JniEvent allocateNewJniEvent(Jni_C_Pointer newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
+ @Override
+ public JniEvent allocateNewJniEvent(Jni_C_Pointer newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
return new JniEvent_v2_5(newEventPtr, newMarkersMap, newParentTracefile);
}
- public JniMarker allocateNewJniMarker(Jni_C_Pointer newMarkerPtr) throws JniException {
+ @Override
+ public JniMarker allocateNewJniMarker(Jni_C_Pointer newMarkerPtr) throws JniException {
return new JniMarker_v2_5(newMarkerPtr);
}
}
- public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer newMarkerFieldPtr) throws JniException {
+ @Override
+ public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer newMarkerFieldPtr) throws JniException {
return new JniMarkerField_v2_6(newMarkerFieldPtr);
}
public class JniTrace_v2_6 extends JniTrace {
+ @SuppressWarnings("unused")
private static final String LIBRARY_NAME = "liblttvtraceread2.6.so";
protected JniTrace_v2_6() {
}
- public boolean initializeLibrary() {
+ @Override
+ public boolean initializeLibrary() {
// *** FIXME ***
// To change as soon as the library will be able to load multiple version at once
//return ltt_initializeHandle(LIBRARY_NAME);
return true;
}
- public JniTracefile allocateNewJniTracefile(Jni_C_Pointer newPtr, JniTrace newParentTrace) throws JniException {
+ @Override
+ public JniTracefile allocateNewJniTracefile(Jni_C_Pointer newPtr, JniTrace newParentTrace) throws JniException {
return new JniTracefile_v2_6(newPtr, newParentTrace);
}
}
- public JniEvent allocateNewJniEvent(Jni_C_Pointer newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
+ @Override
+ public JniEvent allocateNewJniEvent(Jni_C_Pointer newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
return new JniEvent_v2_6(newEventPtr, newMarkersMap, newParentTracefile);
}
- public JniMarker allocateNewJniMarker(Jni_C_Pointer newMarkerPtr) throws JniException {
+ @Override
+ public JniMarker allocateNewJniMarker(Jni_C_Pointer newMarkerPtr) throws JniException {
return new JniMarker_v2_6(newMarkerPtr);
}
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="stubs"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: org.junit,
org.eclipse.linuxtools.lttng;bundle-version="0.2.0",
- org.eclipse.linuxtools.lttng.ui;bundle-version="0.2.0"
+ org.eclipse.linuxtools.lttng.ui;bundle-version="0.2.0",
+ org.eclipse.linuxtools.tmf;bundle-version="0.2.0"
Bundle-Localization: plugin
-source.. = src/
+source.. = src/,\
+ stubs/
output.. = bin/
bin.includes = META-INF/,\
.,\
import org.eclipse.linuxtools.tmf.event.TmfEvent;
import org.eclipse.linuxtools.tmf.parser.ITmfEventParser;
import org.eclipse.linuxtools.tmf.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.trace.TmfContext;
+import org.eclipse.linuxtools.tmf.trace.TmfTraceContext;
/**
* <b><u>TmfEventParserStub</u></b>
*/
public class LTTngEventParserStub implements ITmfEventParser {
- public TmfEvent parseNextEvent(ITmfTrace stream, TmfContext context)
+ public TmfEvent parseNextEvent(ITmfTrace stream, TmfTraceContext context)
throws IOException {
// TODO Auto-generated method stub
return null;
import org.eclipse.linuxtools.lttng.event.LttngEvent;
import org.eclipse.linuxtools.tmf.event.TmfEvent;
import org.eclipse.linuxtools.tmf.parser.ITmfEventParser;
-import org.eclipse.linuxtools.tmf.trace.ITmfLocation;
-import org.eclipse.linuxtools.tmf.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.trace.TmfContext;
-import org.eclipse.linuxtools.tmf.trace.TmfLocation;
import org.eclipse.linuxtools.tmf.trace.TmfTrace;
+import org.eclipse.linuxtools.tmf.trace.TmfTraceContext;
/**
* <b><u>LTTngTraceStub</u></b>
* @throws FileNotFoundException
*/
public LTTngTraceStub(String filename, int cacheSize) throws FileNotFoundException {
- super(filename, LttngEvent.class, filename, cacheSize);
+ super(LttngEvent.class, filename, cacheSize);
fTrace = new RandomAccessFile(filename, "r");
fParser = new LTTngEventParserStub();
-// indexTrace(true);
+ indexTrace(true);
}
-
- public ITmfTrace createTraceCopy() {
- ITmfTrace returnedValue = null;
- try {
- returnedValue = new LTTngTraceStub(this.getName());
- }
- catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- return returnedValue;
- }
-
+
// ========================================================================
// Accessors
// ========================================================================
/* (non-Javadoc)
* @see org.eclipse.linuxtools.tmf.eventlog.ITmfStreamLocator#seekLocation(java.lang.Object)
*/
- @Override
- @SuppressWarnings("unchecked")
- public TmfContext seekLocation(ITmfLocation<?> location) {
- TmfContext context = null;
+ public TmfTraceContext seekLocation(Object location) {
+ TmfTraceContext context = null;
try {
synchronized(fTrace) {
- fTrace.seek((location != null) ? ((TmfLocation<Long>) location).getLocation() : 0);
- context = new TmfContext(getCurrentLocation(), 0);
+ fTrace.seek((location != null) ? (Long) location : 0);
+ context = new TmfTraceContext(getCurrentLocation(), 0);
// TmfTraceContext context2 = new TmfTraceContext(getCurrentLocation(), 0);
// TmfEvent event = parseEvent(context2);
// context.setTimestamp(event.getTimestamp());
* @see org.eclipse.linuxtools.tmf.eventlog.ITmfStreamLocator#getCurrentLocation()
*/
@Override
- public ITmfLocation<?> getCurrentLocation() {
+ public Object getCurrentLocation() {
try {
- return new TmfLocation<Long>(fTrace.getFilePointer());
+ return new Long(fTrace.getFilePointer());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
* @see org.eclipse.linuxtools.tmf.trace.ITmfTrace#parseEvent()
*/
@Override
- public TmfEvent parseEvent(TmfContext context) {
+ public TmfEvent parseEvent(TmfTraceContext context) {
try {
// paserNextEvent updates the context
TmfEvent event = fParser.parseNextEvent(this, context);
*******************************************************************************/
package org.eclipse.linuxtools.lttng.state;
+import org.eclipse.linuxtools.lttng.event.LttngEvent;
import org.eclipse.linuxtools.lttng.state.model.ILttngStateInputRef;
import org.eclipse.linuxtools.lttng.trace.LTTngTextTrace;
import org.eclipse.linuxtools.lttng.trace.LTTngTrace;
// ========================================================================
// Table data
// =======================================================================
- TmfTrace log = null;
+ TmfTrace<LttngEvent> log = null;
// ========================================================================
// Constructor
// ========================================================================
- LttngStateInputRef(TmfTrace log) {
+ LttngStateInputRef(TmfTrace<LttngEvent> log) {
this.log = log;
if ( log instanceof LTTngTrace) {
* @param log
*
*/
- void init(TmfTrace log) throws LttngStateException {
+ void init(TmfTrace<LttngEvent> log) throws LttngStateException {
if (log == null) {
throw new LttngStateException("No TmfTrace object available!");
}
}
}
+ @Override
public String toString() {
return "running : " + running;
}
// Handle the table item requests
fTable.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
TmfTimestamp ts = (TmfTimestamp) fTable.getSelection()[0].getData();
broadcast(new TmfTimeSynchSignal(fTable, ts));
}
fEvents = new TmfEvent[fTraces.length];
}
+ @Override
public TmfExperimentContext clone() {
try {
return (TmfExperimentContext) super.clone();
this(other.location, other.rank);
}
+ @Override
public TmfTraceContext clone() {
try {
return (TmfTraceContext) super.clone();