From f7703ed6228608266f40ad06131a3b6f056c7e83 Mon Sep 17 00:00:00 2001 From: Francois Chouinard Date: Wed, 25 Apr 2012 21:16:27 -0400 Subject: [PATCH] Simplify TmfEvent constructors and update javadoc --- .../internal/lttng/core/event/LttngEvent.java | 3 +- .../tmf/core/tests/event/TmfEventTest.java | 27 ++------------ .../linuxtools/tmf/core/event/ITmfEvent.java | 28 +++++++++++---- .../tmf/core/event/ITmfEventField.java | 11 +++--- .../tmf/core/event/ITmfEventType.java | 8 ++--- .../tmf/core/event/ITmfTimestamp.java | 4 +-- .../linuxtools/tmf/core/event/TmfEvent.java | 36 ++++++++----------- .../tmf/core/event/TmfEventField.java | 6 ++-- .../tmf/core/event/TmfEventType.java | 5 ++- .../tmf/core/event/TmfEventTypeManager.java | 6 ++-- .../tmf/core/event/TmfSimpleTimestamp.java | 4 +-- .../tmf/core/event/TmfTimeRange.java | 2 +- .../tmf/core/event/TmfTimestamp.java | 2 -- .../tmf/core/trace/ITmfCheckpoint.java | 10 ++++-- .../tmf/core/trace/ITmfContext.java | 8 +++-- .../tmf/core/trace/ITmfEventParser.java | 10 ++++-- .../tmf/core/trace/ITmfLocation.java | 9 +++-- .../linuxtools/tmf/core/trace/ITmfTrace.java | 8 +++-- .../tmf/core/trace/ITmfTraceIndexer.java | 10 ++++-- .../tmf/core/trace/TmfCheckpoint.java | 10 ++++-- .../tmf/core/trace/TmfCheckpointIndexer.java | 10 ++++-- .../linuxtools/tmf/core/trace/TmfContext.java | 9 +++-- .../tmf/core/trace/TmfLocation.java | 8 +++-- .../linuxtools/tmf/core/trace/TmfTrace.java | 12 +++++-- .../tmf/ui/parsers/custom/CustomEvent.java | 2 +- 25 files changed, 145 insertions(+), 103 deletions(-) diff --git a/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/event/LttngEvent.java b/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/event/LttngEvent.java index 5c31875b55..2da279c6eb 100644 --- a/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/event/LttngEvent.java +++ b/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/event/LttngEvent.java @@ -46,8 +46,7 @@ public class LttngEvent extends TmfEvent { public LttngEvent(TmfTrace parent, LttngTimestamp timestamp, String source, LttngEventType type, LttngEventContent content, String reference, JniEvent lttEvent) { - super(timestamp, source, type, reference); - super.setContent(content); + super(parent, timestamp, source, type, content, reference); jniEventReference = lttEvent; super.setTrace(parent); } diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTest.java index d16b7e1798..3ae06dac22 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTest.java @@ -33,6 +33,7 @@ import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp; import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException; import org.eclipse.linuxtools.tmf.core.tests.TmfCoreTestPlugin; import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace; +import org.eclipse.linuxtools.tmf.core.trace.TmfContext; import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub; /** @@ -132,7 +133,7 @@ public class TmfEventTest extends TestCase { public void testDefaultConstructor() { final ITmfEvent event = new TmfEvent(); assertNull("getTrace", event.getTrace()); - assertEquals("getRank", -1, event.getRank()); + assertEquals("getRank", TmfContext.UNKNOWN_RANK, event.getRank()); assertNull("getTimestamp", event.getTimestamp()); assertNull("getSource", event.getSource()); assertNull("getType", event.getType()); @@ -161,7 +162,7 @@ public class TmfEventTest extends TestCase { public void testNoRankConstructor() { final TmfEvent event = new TmfEvent(null, fTimestamp1, fSource, fType, fContent1, fReference1); assertNull("getTrace", event.getTrace()); - assertEquals("getRank", -1, event.getRank()); + assertEquals("getRank", TmfContext.UNKNOWN_RANK, event.getRank()); assertEquals("getTimestamp", fTimestamp1, event.getTimestamp()); assertEquals("getSource", fSource, event.getSource()); assertEquals("getType", fType, event.getType()); @@ -169,28 +170,6 @@ public class TmfEventTest extends TestCase { assertEquals("getReference", fReference1, event.getReference()); } - public void testNoRankContentConstructor() { - final TmfEvent event = new TmfEvent(null, fTimestamp1, fSource, fType, fReference1); - assertNull("getTrace", event.getTrace()); - assertEquals("getRank", -1, event.getRank()); - assertEquals("getTimestamp", fTimestamp1, event.getTimestamp()); - assertEquals("getSource", fSource, event.getSource()); - assertEquals("getType", fType, event.getType()); - assertNull("getContent", event.getContent()); - assertEquals("getReference", fReference1, event.getReference()); - } - - public void testNoTraceRankContentConstructor() { - final TmfEvent event = new TmfEvent(fTimestamp1, fSource, fType, fReference1); - assertNull("getTrace", event.getTrace()); - assertEquals("getRank", -1, event.getRank()); - assertEquals("getTimestamp", fTimestamp1, event.getTimestamp()); - assertEquals("getSource", fSource, event.getSource()); - assertEquals("getType", fType, event.getType()); - assertNull("getContent", event.getContent()); - assertEquals("getReference", fReference1, event.getReference()); - } - public void testConstructorWithTrace() { final ITmfTrace trace = openTrace(); final TmfEvent event = new TmfEvent(trace, 0, fTimestamp1, fSource, fType, fContent1, fReference1); diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEvent.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEvent.java index d27d3c44f8..a3ffdcacff 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEvent.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEvent.java @@ -15,7 +15,7 @@ package org.eclipse.linuxtools.tmf.core.event; import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace; /** - * The basic event structure in TMF. In its canonical form, a data item has: + * The generic event structure in TMF. In its canonical form, an event has: *
    *
  • a parent trace *
  • a rank (order within the trace) @@ -34,7 +34,7 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace; * * @see ITmfTimestamp * @see ITmfEventType - * @see ITmfEvetnField + * @see ITmfEventField * @see TmfEvent */ public interface ITmfEvent extends Cloneable { @@ -44,12 +44,28 @@ public interface ITmfEvent extends Cloneable { // ------------------------------------------------------------------------ /** - * Pre-defined event attributes + * Pre-defined event timestamp attribute (for searching &filtering purposes) */ public static final String EVENT_FIELD_TIMESTAMP = ":timestamp:"; //$NON-NLS-1$ - public static final String EVENT_FIELD_SOURCE = ":source:"; //$NON-NLS-1$ - public static final String EVENT_FIELD_TYPE = ":type:"; //$NON-NLS-1$ - public static final String EVENT_FIELD_CONTENT = ":content:"; //$NON-NLS-1$ + + /** + * Pre-defined event source attribute (for searching &filtering purposes) + */ + public static final String EVENT_FIELD_SOURCE = ":source:"; //$NON-NLS-1$ + + /** + * Pre-defined event type attribute (for searching &filtering purposes) + */ + public static final String EVENT_FIELD_TYPE = ":type:"; //$NON-NLS-1$ + + /** + * Pre-defined event content attribute (for searching &filtering purposes) + */ + public static final String EVENT_FIELD_CONTENT = ":content:"; //$NON-NLS-1$ + + /** + * Pre-defined event reference attribute (for searching &filtering purposes) + */ public static final String EVENT_FIELD_REFERENCE = ":reference:"; //$NON-NLS-1$ // ------------------------------------------------------------------------ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEventField.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEventField.java index 9cd575ec83..d2a23dec54 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEventField.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEventField.java @@ -12,17 +12,16 @@ package org.eclipse.linuxtools.tmf.core.event; - /** - * The TMF event payload structure. Each field can be either a terminal or + * The generic event payload in TMF. Each field can be either a terminal or * further decomposed into subfields. * * @since 1.0 * @version 1.0 * @author Francois Chouinard * - * @see TmfEventField * @see ITmfEvent + * @see ITmfEventField */ public interface ITmfEventField extends Cloneable { @@ -50,7 +49,7 @@ public interface ITmfEventField extends Cloneable { public Object getValue(); /** - * @return the list of subfield names (empty if none) + * @return the list of subfield names (empty array if none) */ public String[] getFieldNames(); @@ -60,7 +59,7 @@ public interface ITmfEventField extends Cloneable { public String getFieldName(int index); /** - * @return the list of subfields (null if none) + * @return the list of subfields (empty array if none) */ public ITmfEventField[] getFields(); @@ -79,7 +78,7 @@ public interface ITmfEventField extends Cloneable { // ------------------------------------------------------------------------ /** - * @return a clone of the event type + * @return a clone of the event field */ public ITmfEventField clone(); diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEventType.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEventType.java index 20c8a92a23..e653471e3c 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEventType.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEventType.java @@ -12,9 +12,8 @@ package org.eclipse.linuxtools.tmf.core.event; - /** - * The TMF event event type. It contains a reference to the full field structure + * The generic event type in TMF. It contains a reference to the full field structure * for that event type. *

    * Types are unique within their context space. @@ -22,8 +21,9 @@ package org.eclipse.linuxtools.tmf.core.event; * @since 1.0 * @version 1.0 * @author Francois Chouinard - * @see TmfEventType + * * @see ITmfEvent + * @see ITmfEventField */ public interface ITmfEventType extends Cloneable { @@ -76,7 +76,7 @@ public interface ITmfEventType extends Cloneable { // ------------------------------------------------------------------------ /** - * @return a clone of the event content + * @return a clone of the event type */ public ITmfEventType clone(); diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfTimestamp.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfTimestamp.java index aad0ef4c52..a5804edfd1 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfTimestamp.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfTimestamp.java @@ -31,8 +31,8 @@ package org.eclipse.linuxtools.tmf.core.event; * @since 1.0 * @version 1.0 * @author Francois Chouinard - * @see TmfTimestamp - * @see TmfSimpleTimestamp + * + * @see ITmfEvent * @see TmfTimeRange */ public interface ITmfTimestamp extends Cloneable, Comparable { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEvent.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEvent.java index 86aa033eef..6e6ac3bb2b 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEvent.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEvent.java @@ -14,6 +14,7 @@ package org.eclipse.linuxtools.tmf.core.event; import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace; +import org.eclipse.linuxtools.tmf.core.trace.TmfContext; /** * A basic implementation of ITmfEvent. @@ -25,6 +26,7 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace; * @since 1.0 * @version 1.0 * @author Francois Chouinard + * * @see ITmfTimestamp * @see ITmfEventType * @see ITmfEventField @@ -49,36 +51,28 @@ public class TmfEvent implements ITmfEvent { // ------------------------------------------------------------------------ /** - * Default constructor + * Default constructor. All fields have their default value (null) and the + * event rank is set to TmfContext.UNKNOWN_RANK. */ public TmfEvent() { - this(null, -1, null, null, null, null, null); + this(null, TmfContext.UNKNOWN_RANK, null, null, null, null, null); } /** - * Constructor - no rank - */ - public TmfEvent(final ITmfTrace trace, final ITmfTimestamp timestamp, final String source, - final ITmfEventType type, final ITmfEventField content, final String reference) - { - this(trace, -1, timestamp, source, type, content, reference); - } + * Standard constructor. The event rank will be set to TmfContext.UNKNOWN_RANK. + * + * @param trace the parent trace + * @param timestamp the event timestamp + * @param source the event source + * @param type the event type + * @param content the event content (payload) + * @param reference the event reference - /** - * Constructor - no rank, no content */ public TmfEvent(final ITmfTrace trace, final ITmfTimestamp timestamp, final String source, - final ITmfEventType type, final String reference) - { - this(trace, -1, timestamp, source, type, null, reference); - } - - /** - * Constructor - no rank, no content, no trace - */ - public TmfEvent(final ITmfTimestamp timestamp, final String source, final ITmfEventType type, final String reference) + final ITmfEventType type, final ITmfEventField content, final String reference) { - this(null, -1, timestamp, source, type, null, reference); + this(trace, TmfContext.UNKNOWN_RANK, timestamp, source, type, content, reference); } /** diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventField.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventField.java index 5124489a3e..6d1ed59824 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventField.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventField.java @@ -26,9 +26,9 @@ import java.util.Map; * @since 1.0 * @version 1.0 * @author Francois Chouinard - * @see ITmfEventField - * @see ITmfEventType + * * @see ITmfEvent + * @see ITmfEventType */ public class TmfEventField implements ITmfEventField { @@ -65,7 +65,7 @@ public class TmfEventField implements ITmfEventField { } /** - * Constructor for a terminal field (i.e. no subfields) + * Constructor for a terminal field (no subfields) * * @param name the event field id * @param value the event field value diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventType.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventType.java index dd12746c6f..48577ab2dd 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventType.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventType.java @@ -13,16 +13,15 @@ package org.eclipse.linuxtools.tmf.core.event; - /** * A basic implementation of ITmfEventType. * * @since 1.0 * @version 1.0 * @author Francois Chouinard - * @see ITmfEventType - * @see ITmfEventField + * * @see ITmfEvent + * @see ITmfEventField */ public class TmfEventType implements ITmfEventType { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventTypeManager.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventTypeManager.java index 375bde90ed..8daf10b148 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventTypeManager.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventTypeManager.java @@ -15,14 +15,14 @@ package org.eclipse.linuxtools.tmf.core.event; import java.util.HashMap; import java.util.Map; - /** - * The TmfEventTypeManager acts as a central repository for the available - * event types. Types are managed in their context space. + * A central repository for the available event types. Types are managed by + * context space. * * @since 1.0 * @version 1.0 * @author Francois Chouinard + * * @see ITmfEventType */ public final class TmfEventTypeManager { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfSimpleTimestamp.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfSimpleTimestamp.java index 717839c6be..3432c5b886 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfSimpleTimestamp.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfSimpleTimestamp.java @@ -19,8 +19,6 @@ package org.eclipse.linuxtools.tmf.core.event; * @since 1.0 * @version 1.0 * @author Francois Chouinard - * @see ITmfTimestamp - * @see TmfTimestamp */ public class TmfSimpleTimestamp extends TmfTimestamp { @@ -29,7 +27,7 @@ public class TmfSimpleTimestamp extends TmfTimestamp { // ------------------------------------------------------------------------ /** - * Default constructor + * Default constructor (value = 0) */ public TmfSimpleTimestamp() { this(0); diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimeRange.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimeRange.java index 534f44133d..794d3746a1 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimeRange.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimeRange.java @@ -19,8 +19,8 @@ package org.eclipse.linuxtools.tmf.core.event; * @since 1.0 * @version 1.0 * @author Francois Chouinard + * * @see ITmfTimestamp - * @see TmfTimestamp */ public final class TmfTimeRange implements Cloneable { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimestamp.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimestamp.java index c25f3c3f3a..7264468d2a 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimestamp.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimestamp.java @@ -21,8 +21,6 @@ package org.eclipse.linuxtools.tmf.core.event; * @since 1.0 * @version 1.0 * @author Francois Chouinard - * @see ITmfTimestamp - * @see TmfSimpleTimestamp */ public class TmfTimestamp implements ITmfTimestamp, Cloneable { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfCheckpoint.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfCheckpoint.java index 2583c5cc5e..e36626b14b 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfCheckpoint.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfCheckpoint.java @@ -15,10 +15,16 @@ package org.eclipse.linuxtools.tmf.core.trace; import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp; /** - * ITmfCheckpoint - *

    * The basic trace checkpoint structure in TMF. The purpose of the checkpoint is * to associate a trace location to an event timestamp. + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * + * @see TmfCheckpoint + * @see ITmfTimestamp + * @see ITmfLocation */ public interface ITmfCheckpoint extends Cloneable, Comparable { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfContext.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfContext.java index 1d55cdd4fe..4ba1ec14d9 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfContext.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfContext.java @@ -14,13 +14,17 @@ package org.eclipse.linuxtools.tmf.core.trace; /** - * ITmfContext - *

    * The basic trace context structure in TMF. The purpose of the context is to * associate a trace location to an event of a specific rank (order). *

    * The context should be sufficient to allow the trace to position itself so * that performing a trace read operation will yield the corresponding event. + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * + * @see ITmfLocation */ public interface ITmfContext extends Cloneable { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfEventParser.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfEventParser.java index 01cb88de66..dc64d3d0c0 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfEventParser.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfEventParser.java @@ -16,8 +16,14 @@ package org.eclipse.linuxtools.tmf.core.trace; import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; /** - * ITmfEventParser - *

    + * The TMF trace parser API. + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * + * @see ITmfEvent + * @see ITmfContext */ public interface ITmfEventParser { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfLocation.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfLocation.java index 813a31edec..6edf7c01fa 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfLocation.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfLocation.java @@ -13,14 +13,19 @@ package org.eclipse.linuxtools.tmf.core.trace; + /** - * ITmfLocation - *

    * An ITmfLocation is the equivalent of a random-access file position, holding * enough information to allow the positioning of the trace 'pointer' to read an * arbitrary event. *

    * This location is trace-specific but must be comparable. + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * + * @see TmfLocation */ public interface ITmfLocation> extends Cloneable { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java index cdbd4a2bd1..d03b4b0954 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java @@ -23,8 +23,6 @@ import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException; import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest; /** - * ITmfTrace - *

    * The event stream structure in TMF. In its basic form, a trace has: *

      *
    • an associated Eclipse resource @@ -101,9 +99,15 @@ import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest; * request.waitForCompletion(); * } * + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * * @see ITmfEvent * @see ITmfEventProvider * @see ITmfEventRequest + * @see TmfTrace */ public interface ITmfTrace extends ITmfDataProvider { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java index 2048a1170f..0a4520652b 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java @@ -16,8 +16,14 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp; /** - * ITmfTraceIndexer - *

      + * The trace indexer API. + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * + * @see ITmfTrace + * @see ITmfEvent */ public interface ITmfTraceIndexer> { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpoint.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpoint.java index d0c4690dfd..61f6a71b1b 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpoint.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpoint.java @@ -16,9 +16,15 @@ package org.eclipse.linuxtools.tmf.core.trace; import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp; /** - * TmfCheckpoint - *

      * This class maps an event timestamp to a generic location. + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * + * @see ITmfCheckpoint + * @see ITmfLocation + * @see ITmfTimestamp */ public class TmfCheckpoint implements ITmfCheckpoint { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java index ed82a926cf..efef5e33d0 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java @@ -29,8 +29,6 @@ import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest; import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal; /** - * TmfTraceIndexer - *

      * A simple trace indexer that builds an array of trace checkpoints. Checkpoints * are stored at fixed intervals (event rank) in ascending timestamp order. *

      @@ -41,6 +39,14 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal; *

      * Locating a specific checkpoint is trivial for both rank (rank % interval) and * timestamp (bsearch in the array). + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * + * @see ITmfTraceIndexer + * @see ITmfTrace + * @see ITmfEvent */ public class TmfCheckpointIndexer> implements ITmfTraceIndexer { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfContext.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfContext.java index 1b67039e5a..281f554c0f 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfContext.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfContext.java @@ -14,11 +14,16 @@ package org.eclipse.linuxtools.tmf.core.trace; /** - * TmfContext - *

      * Trace context structure. It ties a trace location to an event rank. The * context should be enough to restore the trace state so the corresponding * event can be read. + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * + * @see ITmfContext + * @see ITmfLocation */ public class TmfContext implements ITmfContext, Cloneable { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfLocation.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfLocation.java index 7b00f324ef..c19f73665a 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfLocation.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfLocation.java @@ -16,10 +16,14 @@ package org.eclipse.linuxtools.tmf.core.trace; import java.lang.reflect.Method; /** - * TmfLocation - *

      * A convenience implementation on of ITmfLocation. The generic class (L) must * be comparable. + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * + * @see ITmfLocation */ public class TmfLocation> implements ITmfLocation { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java index d415982139..b14809f7c5 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java @@ -28,8 +28,6 @@ import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest; import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest; /** - * TmfTrace - *

      * Abstract implementation of ITmfTrace. *

      * Since the concept of 'location' is trace specific, the concrete classes have @@ -47,6 +45,16 @@ import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest; * The concrete class can either specify its own indexer or use the provided * TmfCheckpointIndexer (default). In this case, the trace cache size will be * used as checkpoint interval. + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * + * @see ITmfTrace + * @see TmfEventProvider + * @see ITmfEvent + * @see ITmfTraceIndexer + * @see ITmfEventParser */ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace { diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomEvent.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomEvent.java index 48b443aa09..6eb91b7be6 100644 --- a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomEvent.java +++ b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomEvent.java @@ -49,7 +49,7 @@ public class CustomEvent extends TmfEvent { } public CustomEvent(CustomTraceDefinition definition, ITmfTrace parentTrace, ITmfTimestamp timestamp, String source, TmfEventType type, String reference) { - super(parentTrace, timestamp, source, type, reference); + super(parentTrace, timestamp, source, type, null, reference); fDefinition = definition; fData = new HashMap(); } -- 2.34.1