tmf: Move timestamps to their own package
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 14 Feb 2013 16:37:10 +0000 (11:37 -0500)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 25 Feb 2013 21:19:02 +0000 (16:19 -0500)
Eventually, for trace synchronization among other things, we
will need to use trace-specific timestamp factories. It will
be much better organized if timestamps have their own package
(they are not specific to events anyway).

The trace sync/timestamp factory rework is really big, and it
probably won't make Kepler. However, doing this move right now
will allow us to introduce timestamp factories and the such
post-Kepler, without breaking the 2.0 API.

Change-Id: Iffe4dc4758d9e0627f78aad6cbd9c6013097f800
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/10496
Tested-by: Hudson CI
Reviewed-by: Bernd Hufmann <bhufmann@gmail.com>
IP-Clean: Bernd Hufmann <bhufmann@gmail.com>

118 files changed:
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesView.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfEventProviderTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfLocationTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfTraceTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/headless/RequestBenchmark.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfSimpleTimestampTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimeRangeTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimestampDeltaTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimestampTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedEventRequestTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfEventRequestTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointIndexTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointIndexTest2.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfContextTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentCheckpointIndexTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfLocationTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfMultiTraceExperimentTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfTraceTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfAsyncSequenceDiagramEventTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfSyncSequenceDiagramEventTest.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfSyntheticEventProviderStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/request/TmfEventRequestStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfEventParserStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfTraceStub.java
org.eclipse.linuxtools.tmf.core/META-INF/MANIFEST.MF
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedEventRequest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/HistoryBuilder.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ThreadedHistoryTreeBackend.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentCheckpoint.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfLocation.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTimestamp.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEvent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfLostEvent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfTimestamp.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEvent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventPropertySource.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfLostEvent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfSimpleTimestamp.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimeRange.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimestamp.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimestampDelta.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimestampFormat.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterCompareNode.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/ITmfEventRequest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfEventRequest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfRangeSynchSignal.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfTimeSynchSignal.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfTraceRangeUpdatedSignal.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfTraceUpdatedSignal.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/AbstractStateChangeInput.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/ITmfStatistics.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/StatsStateProvider.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfEventsStatistics.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/ITmfTimestamp.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfSimpleTimestamp.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimeRange.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestamp.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestampDelta.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestampFormat.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfCheckpoint.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpoint.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTimestampLocation.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/uml2sd/ITmfAsyncSequenceDiagramEvent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/uml2sd/ITmfSyncSequenceDiagramEvent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/uml2sd/TmfAsyncSequenceDiagramEvent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/uml2sd/TmfSyncSequenceDiagramEvent.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfBaseColumnDataProviderTest.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfBaseStatisticsDataTest.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfTreeContentProviderTest.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/views/uml2sd/loader/IUml2SdSignalValidator.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/views/uml2sd/loader/TmfUml2SDSyncLoaderFindTest.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/views/uml2sd/loader/TmfUml2SDSyncLoaderSignalTest.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/views/uml2sd/loader/TmfUml2SDSyncLoaderTimeTest.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/views/uml2sd/loader/Uml2SDSignalValidator.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/views/uml2sd/loader/Uml2SDTestTimestamp.java
org.eclipse.linuxtools.tmf.ui.tests/widgetStubs/org/eclipse/linuxtools/tmf/ui/tests/uml2sd/load/TestLoaders.java
org.eclipse.linuxtools.tmf.ui.tests/widgetStubs/org/eclipse/linuxtools/tmf/ui/tests/uml2sd/trace/TmfUml2SDTestTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomEvent.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTraceDefinition.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtEvent.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlEvent.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomTxtParserOutputWizardPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomXmlParserOutputWizardPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/properties/TmfTimePreferences.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/properties/TmfTimestampFormatPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsViewer.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/Histogram.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramCurrentTimeControl.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramRequest.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramTimeRangeControl.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timechart/TimeChartView.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/DrawableToolTip.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/SDWidget.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/TimeCompressionBar.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/core/AsyncMessage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/core/BasicFrame.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/core/ExecutionOccurrence.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/core/Frame.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/core/ITimeRange.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/core/SDTimeEvent.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/core/SyncMessage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/dialogs/MinMaxDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/loader/TmfUml2SDSyncLoader.java

index 1c259065c7b6825992487c9a1a6694506d008bc9..e4a673531657f60de54289783683b7d85eff2ea7 100644 (file)
@@ -32,9 +32,6 @@ import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
 import org.eclipse.linuxtools.lttng2.kernel.core.trace.CtfKernelTrace;
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateSystemDisposedException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
@@ -46,6 +43,9 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
 import org.eclipse.linuxtools.tmf.ui.editors.ITmfTraceEditor;
index 0348a7f3b6f7c83af0e7167157b05377e649b2bd..72d36e45b0dee88a733a410301a41554b79a3e8d 100644 (file)
@@ -29,9 +29,6 @@ import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesEntry.Type;
 import org.eclipse.linuxtools.lttng2.kernel.core.trace.CtfKernelTrace;
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateSystemDisposedException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
@@ -43,6 +40,9 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
 import org.eclipse.linuxtools.tmf.ui.editors.ITmfTraceEditor;
index 274882b1d3c8120aa1b53b23ff6293d27c021387..df427debc6949374747b75e4025887c24711ab27 100644 (file)
@@ -21,11 +21,11 @@ import java.util.Vector;
 import org.eclipse.linuxtools.internal.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.signal.TmfEndSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfStartSynchSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.tests.stubs.component.TmfEventProviderStub;
 import org.eclipse.linuxtools.tmf.tests.stubs.component.TmfSyntheticEventProviderStub;
 import org.eclipse.linuxtools.tmf.tests.stubs.event.TmfSyntheticEventStub;
index d3407d59070b70eb6d317de56b12fcd43e310d6f..8ff7c68f5533775dd82245db9490d9f6fa972b27 100644 (file)
@@ -18,8 +18,8 @@ import static org.junit.Assert.assertNotNull;
 
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfLocation;
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfLocationInfo;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.junit.Before;
 import org.junit.Test;
 
index 5a179ff9cc3bbdb95a54939b37c55afa5983cfcc..ed481b195a42a3174f281f03c5e0bb0247060f80 100644 (file)
@@ -27,13 +27,13 @@ import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.signal.TmfEndSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
 import org.eclipse.linuxtools.tmf.core.tests.shared.CtfTmfTestTraces;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.junit.After;
 import org.junit.Before;
index c9adc374e2986ffccee1be851bea0f455081335c..4b85437ca590a48896a454bab3ead8e2eb5f436f 100644 (file)
@@ -18,8 +18,8 @@ import java.util.Vector;
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
 
index e8737e3a2d99989b26de4b6853e8deb9f41c62ad..9816bd41670e021c4560044dceca343faad99bb7 100644 (file)
@@ -34,9 +34,9 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
-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.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
index 796883e572e70a2f648ce73076e7afafaf7b80fe..3d3c82052af2fb8477af240069d173ca4281e696 100644 (file)
@@ -22,9 +22,9 @@ import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfSimpleTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfSimpleTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.junit.Test;
 
 /**
index 19bf8230cedba8494b1791bc5becb00d4b6ff308..995f18eba5746018472bdbbe3ebe1ab90d58213b 100644 (file)
@@ -19,9 +19,9 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.junit.Test;
 
 /**
index 958048b5bc1d01576ea296b60046c2ef8e95a92a..6fe69008148ede02507a1108796c17df2e01c771 100644 (file)
@@ -17,10 +17,10 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestampDelta;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestampDelta;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestampFormat;
 import org.junit.Test;
 
 /**
index 0c79c494ddde9ab1950f60e4255ae0f5a7091727..9de7c980536aa761380b9cf7569346932af44257 100644 (file)
@@ -23,9 +23,9 @@ import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestampFormat;
 import org.junit.Test;
 
 /**
index e656b0a4411a7b0ccdd043f65b954ff745b1f7e4..3a10a06683cb9802ea7d119fd75d1857b0e470b6 100644 (file)
@@ -30,8 +30,6 @@ import org.eclipse.linuxtools.internal.tmf.core.request.TmfCoalescedDataRequest;
 import org.eclipse.linuxtools.internal.tmf.core.request.TmfCoalescedEventRequest;
 import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
@@ -40,6 +38,8 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
 import org.eclipse.linuxtools.tmf.core.tests.TmfCoreTestPlugin;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.tests.stubs.request.TmfEventRequestStub;
 import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
 import org.junit.Before;
index 626d0b45b0c5d6370014ae610db0d6845bc91be3..6cbc309527fe09b8b3aa047747f9edcdff5c8b0f 100644 (file)
@@ -18,10 +18,10 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.tests.stubs.request.TmfEventRequestStub;
 import org.junit.Before;
 import org.junit.Test;
index d940f1d0760222098dceffe35bd4f31ed443a7ca..8bf458ede74d22942a34719a6a9b6168cc233cc1 100644 (file)
@@ -26,9 +26,9 @@ import java.util.List;
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-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.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfCheckpoint;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.core.trace.TmfCheckpointIndexer;
index b6bd11e5de7c7cd4f49ad6bcbf327407e68b0f0d..0b64b8eed54fbe5c65b381d5a29859141723c165 100644 (file)
@@ -26,9 +26,9 @@ import java.util.List;
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-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.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfCheckpoint;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.TmfCheckpointIndexer;
index d8d818725458bb3781c6d82c453ebd48aa6a8156..dbbe26a861c6194901fa354f0d4aae877e1f5f01 100644 (file)
@@ -20,8 +20,8 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
 import org.eclipse.linuxtools.tmf.core.trace.TmfCheckpoint;
 import org.eclipse.linuxtools.tmf.core.trace.TmfLongLocation;
index 07116f55c03fb48b2b7295553e0f4bdb797a5cbe..1503ac20f718a9bff5071c9ab96f3be7191babd0 100644 (file)
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.TmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.TmfLongLocation;
index 8fbe14f4065810e0f82564a3606d6ae8c886a6fb..e71a184e0233012596e3b663d977f8c612d26e0f 100644 (file)
@@ -26,10 +26,10 @@ import java.util.List;
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-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.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfCheckpoint;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
index 8516300e127d6a2defe91893f3af7e852f995fc3..3cf52b9b46b10f3162081d72fa3f35618e54ddcb 100644 (file)
@@ -34,14 +34,14 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.linuxtools.internal.tmf.core.trace.TmfExperimentContext;
 import org.eclipse.linuxtools.internal.tmf.core.trace.TmfExperimentLocation;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
 import org.eclipse.linuxtools.tmf.core.statistics.ITmfStatistics;
 import org.eclipse.linuxtools.tmf.core.tests.TmfCoreTestPlugin;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
index 73062946685929fb0e047ed87c8929a8799b0e1a..9be8cc8488cc699e289b4a79f52957ae991910d8 100644 (file)
@@ -18,7 +18,7 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
 import org.eclipse.linuxtools.tmf.core.trace.TmfLongLocation;
 import org.eclipse.linuxtools.tmf.core.trace.TmfTimestampLocation;
index 33fac1a74b1a00f34f83bfb05cb6d7de7a0e09b5..7c686500e842b427288403e31976b9eff54ec132 100644 (file)
@@ -29,13 +29,13 @@ import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.linuxtools.internal.tmf.core.trace.TmfExperimentContext;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.tests.TmfCoreTestPlugin;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
index 482ceb5ca7a7987fbfbc7a2275b26c83575ef73f..340f202248677e59be79434e394dd89894e1e396 100644 (file)
@@ -33,15 +33,15 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.linuxtools.internal.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
 import org.eclipse.linuxtools.tmf.core.statistics.ITmfStatistics;
 import org.eclipse.linuxtools.tmf.core.tests.TmfCoreTestPlugin;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
index a3e43c533966224c544e9644d51f8a1e2a43e838..47636363129e551c2030eabe674f8a315485e9bb 100644 (file)
@@ -23,7 +23,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.uml2sd.TmfAsyncSequenceDiagramEvent;
 
 import org.junit.Test;
index f14840f74464dcb0997884f43658cc7fb45bd81a..fc81861ab5906afc870b285b8f867dd40dc4cac3 100644 (file)
@@ -23,7 +23,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.uml2sd.TmfSyncSequenceDiagramEvent;
 
 import org.junit.Test;
index a1f2797a5b5c607ee181f27eb6ee00b2eab02836..fd2e79fd41faa3f9028442351643b80457a7b3bb 100644 (file)
@@ -18,10 +18,10 @@ import org.eclipse.linuxtools.internal.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;
 import org.eclipse.linuxtools.tmf.core.component.TmfEventProvider;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.TmfContext;
 import org.eclipse.linuxtools.tmf.tests.stubs.event.TmfSyntheticEventStub;
index 3e2ba6a74b9c1582eb8e1d5e533868796d970e5a..95058300495797a87db8568f09767361ea77f8ed 100644 (file)
@@ -13,8 +13,8 @@
 package org.eclipse.linuxtools.tmf.tests.stubs.request;
 
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 
 /**
  * <b><u>TmfEventRequestStub</u></b>
index 4eaa78a7b0c14c83edf36b838430769611bfcfea..d17bd03a0b45d30a53aedb395201e5ceb7b9aaa6 100644 (file)
@@ -22,7 +22,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfEventParser;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
index 6968ce890369801f9c0caab7c4d598dca8ed7688..d5bc423f94ca0bc60f112255940bb2f726c38e1d 100644 (file)
@@ -21,9 +21,9 @@ import java.util.concurrent.locks.ReentrantLock;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfEventParser;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
index af21aa7293ac09bfd86d6d1695aa441144eeb353..44f5c102720f1869ec72e7522b28d440500f85bf 100644 (file)
@@ -34,6 +34,7 @@ Export-Package: org.eclipse.linuxtools.internal.tmf.core;x-friends:="org.eclipse
  org.eclipse.linuxtools.tmf.core.statesystem,
  org.eclipse.linuxtools.tmf.core.statevalue,
  org.eclipse.linuxtools.tmf.core.statistics,
+ org.eclipse.linuxtools.tmf.core.timestamp,
  org.eclipse.linuxtools.tmf.core.trace,
  org.eclipse.linuxtools.tmf.core.uml2sd,
  org.eclipse.linuxtools.tmf.core.util
index 80f1ae852800a651d1541855fb076a5cb076d5d8..967c6f147c609af42f9e96693a4bb3b550055c19 100644 (file)
@@ -14,11 +14,11 @@ package org.eclipse.linuxtools.internal.tmf.core.request;
 
 import org.eclipse.linuxtools.internal.tmf.core.TmfCoreTracer;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 
 /**
  * The TMF coalesced event request
index 055fc2f7ad30a1c26232db49e0f466a64385a4b3..1dd11eab7e9e94b5347f437987d976d0e4e4df2f 100644 (file)
@@ -17,7 +17,6 @@ import java.io.IOException;
 import org.eclipse.linuxtools.internal.tmf.core.statesystem.backends.IStateHistoryBackend;
 import org.eclipse.linuxtools.tmf.core.component.TmfComponent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
@@ -28,6 +27,7 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfTraceRangeUpdatedSignal;
 import org.eclipse.linuxtools.tmf.core.statesystem.IStateChangeInput;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystemBuilder;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
 
index 5bc09c78555a3fd4f51bfc0186020f29094d7532..2bf82f9bd93bb80988f6fe7cc5d5ba71b6ec48b8 100644 (file)
@@ -17,10 +17,10 @@ import java.io.IOException;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.BlockingQueue;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TimeRangeException;
 import org.eclipse.linuxtools.tmf.core.statevalue.ITmfStateValue;
 import org.eclipse.linuxtools.tmf.core.statevalue.TmfStateValue;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 
 /**
  * Variant of the HistoryTreeBackend which runs all the interval-insertion logic
index f3a3cfc1ed1c73dea486a7cda0f6b6ab150d16c8..56c1e47bce91ff9ff6b5a4023a687fd20f05474f 100644 (file)
@@ -12,7 +12,7 @@
 
 package org.eclipse.linuxtools.internal.tmf.core.trace;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.TmfContext;
 
 /**
index cb54d2e2f47c6cf229e009c3df6d1615b867a6f0..2bb41057b46f8c775790cbeb2a0ea63b72a22a5c 100644 (file)
@@ -16,9 +16,9 @@ package org.eclipse.linuxtools.tmf.core.component;
 import org.eclipse.linuxtools.internal.tmf.core.TmfCoreTracer;
 import org.eclipse.linuxtools.internal.tmf.core.request.TmfCoalescedEventRequest;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
  * An extension of TmfDataProvider timestamped events providers.
index a41066b50a97701f99717ffcfd85459688cbf759..2d76c3f5ee3d1290fdbfc68e8dc5a96ce37b9560 100644 (file)
@@ -12,7 +12,7 @@
  *******************************************************************************/
 package org.eclipse.linuxtools.tmf.core.ctfadaptor;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.TmfLocation;
 
 /**
@@ -43,6 +43,7 @@ public final class CtfLocation extends TmfLocation {
      *
      * @param timestamp
      *            The timestamp of this location
+     * @since 2.0
      */
     public CtfLocation(final ITmfTimestamp timestamp) {
         this(timestamp.getValue(), 0);
index b3514d04316577e9aa790ccd4a8dac6de0491f33..a1ef50d114e658611d40de7545ba67d1133ec159 100644 (file)
@@ -12,8 +12,8 @@
 
 package org.eclipse.linuxtools.tmf.core.ctfadaptor;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 
 /**
  * The CTF adapter for the TMF timestamp. It's basically the same as a
index cff663efa24646bf492a0715d438256e2c31d69d..c7981f683a866afbfaa3062619cf6f1adc0d164f 100644 (file)
@@ -18,9 +18,9 @@ import org.eclipse.core.resources.IResource;
 import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfEventParser;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
index e8defc0a2baf7fa583545f7b8d0f34096cf40348..952ee50ececd896e67fc556d3a108418e9f96124 100644 (file)
@@ -13,6 +13,7 @@
 package org.eclipse.linuxtools.tmf.core.event;
 
 import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 /**
@@ -84,6 +85,7 @@ public interface ITmfEvent extends IAdaptable {
 
     /**
      * @return the event timestamp
+     * @since 2.0
      */
     public ITmfTimestamp getTimestamp();
 
index 4cc5f796a3988698019ebf423c44306230594a6b..27653afc259e2a5476bd17b785da9ba05b39103f 100644 (file)
@@ -12,6 +12,8 @@
 
 package org.eclipse.linuxtools.tmf.core.event;
 
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+
 /**
  * The generic lost event structure in TMF.
  *
@@ -39,6 +41,7 @@ public interface ITmfLostEvent extends ITmfEvent {
 
     /**
      * @return the 'problem' time range
+     * @since 2.0
      */
     public TmfTimeRange getTimeRange();
 
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
deleted file mode 100644 (file)
index 469c9ff..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.core.event;
-
-/**
- * The fundamental time reference in the TMF.
- * <p>
- * It defines a generic timestamp interface in its most basic form:
- * <ul>
- * <li>timestamp = [value] * 10**[scale] +/- [precision]
- * </ul>
- * Where:
- * <ul>
- * <li>[value] is an unstructured integer value
- * <li>[scale] is the magnitude of the value wrt some application-specific
- * base unit (e.g. the second)
- * <li>[precision] indicates the error on the value (useful for comparing
- * timestamps in different scales). Default: 0.
- * </ul>
- *
- * @version 2.0
- * @author Francois Chouinard
- *
- * @see ITmfEvent
- * @see TmfTimeRange
- */
-public interface ITmfTimestamp extends Comparable<ITmfTimestamp> {
-
-    // ------------------------------------------------------------------------
-    // Constants
-    // ------------------------------------------------------------------------
-
-    /**
-     * The millisecond scale factor (10e0)
-     * @since 2.0
-     */
-    public static final int SECOND_SCALE = 0;
-
-    /**
-     * The millisecond scale factor (10e-3)
-     * @since 2.0
-     */
-    public static final int MILLISECOND_SCALE = -3;
-
-    /**
-     * The microsecond scale factor (10e-6)
-     * @since 2.0
-     */
-    public static final int MICROSECOND_SCALE = -6;
-
-    /**
-     * The nanosecond scale factor (10e-9)
-     * @since 2.0
-     */
-    public static final int NANOSECOND_SCALE = -9;
-
-    // ------------------------------------------------------------------------
-    // Getters
-    // ------------------------------------------------------------------------
-
-    /**
-     * @return the timestamp value (magnitude)
-     */
-    public long getValue();
-
-    /**
-     * @return the timestamp scale (exponent)
-     */
-    public int getScale();
-
-    /**
-     * @return the timestamp precision (measurement tolerance)
-     */
-    public int getPrecision();
-
-    // ------------------------------------------------------------------------
-    // Operations
-    // ------------------------------------------------------------------------
-
-    /**
-     * Normalize (adjust scale and offset) of the timestamp
-     *
-     * @param offset the offset to apply to the timestamp value (after scaling)
-     * @param scale the new timestamp scale
-     * @return a new 'adjusted' ITmfTimestamp
-     */
-    public ITmfTimestamp normalize(long offset, int scale);
-
-    /**
-     * Compares [this] and [ts] within timestamp precision
-     *
-     * @param ts the other timestamp
-     * @param withinPrecision consider the precision when testing for equality
-     * @return -1, 0 or 1 (less than, equals, greater than)
-     */
-    public int compareTo(ITmfTimestamp ts, boolean withinPrecision);
-
-    /**
-     * Returns the difference between [this] and [ts] as a timestamp
-     *
-     * @param ts the other timestamp
-     * @return the time difference (this - other) as an ITmfTimestamp
-     */
-    public ITmfTimestamp getDelta(ITmfTimestamp ts);
-
-    // ------------------------------------------------------------------------
-    // Comparable
-    // ------------------------------------------------------------------------
-
-    /* (non-Javadoc)
-     * @see java.lang.Comparable#compareTo(java.lang.Object)
-     */
-    @Override
-    int compareTo(ITmfTimestamp ts);
-
-    /**
-     * Format the timestamp as per the format provided
-     *
-     * @param format the timestamp formatter
-     * @return the formatted timestamp
-     * @since 2.0
-     */
-    public String toString(final TmfTimestampFormat format);
-
-}
index f48517446c50ddef7a5307f05be612c77451e5bd..218385ad010e2f80c43dfb7f3470b42b90014ecd 100644 (file)
@@ -14,6 +14,7 @@
 
 package org.eclipse.linuxtools.tmf.core.event;
 
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.ui.views.properties.IPropertySource;
@@ -64,6 +65,7 @@ public class TmfEvent implements ITmfEvent {
      * @param type the event type
      * @param content the event content (payload)
      * @param reference the event reference
+     * @since 2.0
 
      */
     public TmfEvent(final ITmfTrace trace, final ITmfTimestamp timestamp, final String source,
@@ -82,6 +84,7 @@ public class TmfEvent implements ITmfEvent {
      * @param type the event type
      * @param content the event content (payload)
      * @param reference the event reference
+     * @since 2.0
      */
     public TmfEvent(final ITmfTrace trace, final long rank, final ITmfTimestamp timestamp, final String source,
             final ITmfEventType type, final ITmfEventField content, final String reference)
@@ -127,6 +130,9 @@ public class TmfEvent implements ITmfEvent {
         return fRank;
     }
 
+    /**
+     * @since 2.0
+     */
     @Override
     public ITmfTimestamp getTimestamp() {
         return fTimestamp;
index 7b5262e3a5b69c8b234a522177b8753864275bea..a22e0e0fda7de5c9c0247cdfe589b9a93eba7c35 100644 (file)
@@ -15,6 +15,7 @@ package org.eclipse.linuxtools.tmf.core.event;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
 import org.eclipse.ui.views.properties.IPropertySource;
 import org.eclipse.ui.views.properties.PropertyDescriptor;
index a4223affaf10bdbbf1bd9b3e1eacfd91c7d0e650..72716aa826bbc9d982a61f45024a764134df9736 100644 (file)
@@ -12,6 +12,8 @@
 
 package org.eclipse.linuxtools.tmf.core.event;
 
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
@@ -54,6 +56,7 @@ public class TmfLostEvent extends TmfEvent implements ITmfLostEvent {
      * @param reference the event reference
      * @param timeRange the 'problematic' time range
      * @param nbLostEvents the number of lost events in the time range
+     * @since 2.0
      */
     public TmfLostEvent(final ITmfTrace trace, final long rank, final ITmfTimestamp timestamp,
             final String source, final ITmfEventType type, final String reference, final TmfTimeRange timeRange, final long nbLostEvents)
@@ -84,6 +87,9 @@ public class TmfLostEvent extends TmfEvent implements ITmfLostEvent {
     // ITmfLostEvent
     // ------------------------------------------------------------------------
 
+    /**
+     * @since 2.0
+     */
     @Override
     public TmfTimeRange getTimeRange() {
         return fTimeRange;
@@ -100,6 +106,7 @@ public class TmfLostEvent extends TmfEvent implements ITmfLostEvent {
 
     /**
      * @param timeRange the 'problematic' time range
+     * @since 2.0
      */
     protected void setTimeRange(final TmfTimeRange timeRange) {
         fTimeRange = timeRange;
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
deleted file mode 100644 (file)
index 1f25f66..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Francois Chouinard - Initial API and implementation
- *   Francois Chouinard - Standardize on the default toString()
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.core.event;
-
-/**
- * A simplified timestamp where scale and precision are set to 0.
- *
- * @version 1.1
- * @author Francois Chouinard
- */
-public class TmfSimpleTimestamp extends TmfTimestamp {
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-    /**
-     * Default constructor (value = 0)
-     */
-    public TmfSimpleTimestamp() {
-        this(0);
-    }
-
-    /**
-     * Full constructor
-     *
-     * @param value the timestamp value
-     */
-    public TmfSimpleTimestamp(final long value) {
-        super(value, 0, 0);
-    }
-
-    /**
-     * Copy constructor.
-     *
-     * If the parameter is not a TmfSimpleTimestamp, the timestamp will be
-     * scaled to seconds, and the precision will be discarded.
-     *
-     * @param timestamp
-     *            The timestamp to copy
-     */
-    public TmfSimpleTimestamp(final ITmfTimestamp timestamp) {
-        super(timestamp.normalize(0, ITmfTimestamp.SECOND_SCALE).getValue(), 0, 0);
-    }
-
-    // ------------------------------------------------------------------------
-    // ITmfTimestamp
-    // ------------------------------------------------------------------------
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#normalize(long, int)
-     */
-    @Override
-    public ITmfTimestamp normalize(final long offset, final int scale) {
-        if (scale == 0) {
-            return new TmfSimpleTimestamp(getValue() + offset);
-        }
-        return super.normalize(offset, scale);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp, boolean)
-     */
-    @Override
-    public int compareTo(final ITmfTimestamp ts, final boolean withinPrecision) {
-        if (ts instanceof TmfSimpleTimestamp) {
-            final long delta = getValue() - ts.getValue();
-            return (delta == 0) ? 0 : (delta > 0) ? 1 : -1;
-        }
-        return super.compareTo(ts, withinPrecision);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#getDelta(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
-     */
-    @Override
-    public ITmfTimestamp getDelta(final ITmfTimestamp ts) {
-        if (ts instanceof TmfSimpleTimestamp) {
-            return new TmfTimestampDelta(getValue() - ts.getValue());
-        }
-        return super.getDelta(ts);
-    }
-
-    // ------------------------------------------------------------------------
-    // Object
-    // ------------------------------------------------------------------------
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        return super.hashCode();
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals(final Object other) {
-        if (this == other) {
-            return true;
-        }
-        if (other == null) {
-            return false;
-        }
-        if (!(other instanceof TmfSimpleTimestamp)) {
-            return super.equals(other);
-        }
-        final TmfSimpleTimestamp ts = (TmfSimpleTimestamp) other;
-
-        return compareTo(ts, false) == 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
deleted file mode 100644 (file)
index 556122c..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Francois Chouinard - Initial API and implementation
- *   Francois Chouinard - Updated as per TMF Event Model 1.0
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.core.event;
-
-/**
- * A utility class to define and manage time ranges.
- *
- * @version 1.0
- * @author Francois Chouinard
- *
- * @see ITmfTimestamp
- */
-public final class TmfTimeRange {
-
-    // ------------------------------------------------------------------------
-    // Constants
-    // ------------------------------------------------------------------------
-
-    /**
-     * The full possible time range
-     */
-    public static final TmfTimeRange ETERNITY =
-            new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH);
-
-    /**
-     * The null time range
-     */
-    public static final TmfTimeRange NULL_RANGE = new TmfTimeRange();
-
-    // ------------------------------------------------------------------------
-    // Attributes
-    // ------------------------------------------------------------------------
-
-    private final ITmfTimestamp fStartTime;
-    private final ITmfTimestamp fEndTime;
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-    /**
-     * Default constructor
-     */
-    private TmfTimeRange() {
-        fStartTime = TmfTimestamp.BIG_BANG;
-        fEndTime = TmfTimestamp.BIG_BANG;
-    }
-
-    /**
-     * Full constructor
-     *
-     * @param startTime start of the time range
-     * @param endTime end of the time range
-     */
-    public TmfTimeRange(final ITmfTimestamp startTime, final ITmfTimestamp endTime) {
-        if (startTime == null || endTime == null) {
-            throw new IllegalArgumentException();
-        }
-        fStartTime = startTime;
-        fEndTime = endTime;
-    }
-
-    /**
-     * Copy constructor
-     *
-     * @param range the other time range
-     */
-    public TmfTimeRange(final TmfTimeRange range) {
-        if (range == null) {
-            throw new IllegalArgumentException();
-        }
-        fStartTime = range.getStartTime();
-        fEndTime = range.getEndTime();
-    }
-
-    // ------------------------------------------------------------------------
-    // Getters
-    // ------------------------------------------------------------------------
-
-    /**
-     * @return the time range start time
-     */
-    public ITmfTimestamp getStartTime() {
-        return fStartTime;
-    }
-
-    /**
-     * @return the time range end time
-     */
-    public ITmfTimestamp getEndTime() {
-        return fEndTime;
-    }
-
-    // ------------------------------------------------------------------------
-    // Predicates
-    // ------------------------------------------------------------------------
-
-    /**
-     * Check if the timestamp is within the time range
-     *
-     * @param ts the timestamp to check
-     * @return true if [startTime] <= [ts] <= [endTime]
-     */
-    public boolean contains(final ITmfTimestamp ts) {
-        // Zero acts as a "universal donor" timestamp
-        if (ts.equals(TmfTimestamp.ZERO)) {
-            return true;
-        }
-        return (fStartTime.compareTo(ts, true) <= 0) && (fEndTime.compareTo(ts, true) >= 0);
-    }
-
-    /**
-     * Check if the time range is within the time range
-     *
-     * @param range the other time range
-     * @return true if [range] is fully contained
-     */
-    public boolean contains(final TmfTimeRange range) {
-        final ITmfTimestamp startTime = range.getStartTime();
-        final ITmfTimestamp endTime = range.getEndTime();
-        return (fStartTime.compareTo(startTime, true) <= 0) && (fEndTime.compareTo(endTime, true) >= 0);
-    }
-
-    // ------------------------------------------------------------------------
-    // Operations
-    // ------------------------------------------------------------------------
-
-    /**
-     * Get intersection of two time ranges
-     *
-     * @param range the other time range
-     * @return the intersection time range, or null if no intersection exists
-     */
-    public TmfTimeRange getIntersection(final TmfTimeRange range) {
-        if (fStartTime.compareTo(range.fEndTime, true) > 0 || fEndTime.compareTo(range.fStartTime, true) < 0) {
-            return null; // no intersection
-        }
-
-        return new TmfTimeRange(fStartTime.compareTo(range.fStartTime, true) < 0
-                ? range.fStartTime
-                : fStartTime, fEndTime.compareTo(range.fEndTime, true) > 0
-                        ? range.fEndTime
-                        : fEndTime);
-    }
-
-    // ------------------------------------------------------------------------
-    // Object
-    // ------------------------------------------------------------------------
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + fEndTime.hashCode();
-        result = prime * result + fStartTime.hashCode();
-        return result;
-    }
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (!(obj instanceof TmfTimeRange)) {
-            return false;
-        }
-        final TmfTimeRange other = (TmfTimeRange) obj;
-        if (!fEndTime.equals(other.fEndTime)) {
-            return false;
-        }
-        if (!fStartTime.equals(other.fStartTime)) {
-            return false;
-        }
-        return true;
-    }
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
-    @Override
-    @SuppressWarnings("nls")
-    public String toString() {
-        return "TmfTimeRange [fStartTime=" + fStartTime + ", fEndTime=" + fEndTime + "]";
-    }
-
-}
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
deleted file mode 100644 (file)
index 299caa5..0000000
+++ /dev/null
@@ -1,365 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010, 2012 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Francois Chouinard - Initial API and implementation
- *   Thomas Gatterweh  - Updated scaling / synchronization
- *   Francois Chouinard - Refactoring to align with TMF Event Model 1.0
- *   Francois Chouinard - Implement augmented interface
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.core.event;
-
-/**
- * A generic timestamp implementation. The timestamp is represented by the
- * tuple { value, scale, precision }. By default, timestamps are scaled in
- * seconds.
- *
- * @version 1.1
- * @author Francois Chouinard
- */
-public class TmfTimestamp implements ITmfTimestamp {
-
-    // ------------------------------------------------------------------------
-    // Constants
-    // ------------------------------------------------------------------------
-
-    /**
-     * The beginning of time
-     */
-    public static final ITmfTimestamp BIG_BANG =
-            new TmfTimestamp(Long.MIN_VALUE, Integer.MAX_VALUE, 0);
-
-    /**
-     * The end of time
-     */
-    public static final ITmfTimestamp BIG_CRUNCH =
-            new TmfTimestamp(Long.MAX_VALUE, Integer.MAX_VALUE, 0);
-
-    /**
-     * A more practical definition of "beginning of time"
-     * @since 2.0
-     */
-    public static final ITmfTimestamp PROJECT_IS_FUNDED = BIG_BANG;
-
-    /**
-     * A more practical definition of "end of time"
-     * @since 2.0
-     */
-    public static final ITmfTimestamp PROJECT_IS_CANNED = BIG_CRUNCH;
-
-    /**
-     * Zero
-     */
-    public static final ITmfTimestamp ZERO =
-            new TmfTimestamp(0, 0, 0);
-
-    // ------------------------------------------------------------------------
-    // Attributes
-    // ------------------------------------------------------------------------
-
-    /**
-     * The timestamp raw value (mantissa)
-     */
-    private final long fValue;
-
-    /**
-     * The timestamp scale (magnitude)
-     */
-    private final int fScale;
-
-    /**
-     * The value precision (tolerance)
-     */
-    private final int fPrecision;
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-    /**
-     * Default constructor
-     */
-    public TmfTimestamp() {
-        this(0, ITmfTimestamp.SECOND_SCALE, 0);
-    }
-
-    /**
-     * Simple constructor (scale = precision = 0)
-     *
-     * @param value the timestamp value
-     */
-    public TmfTimestamp(final long value) {
-        this(value, ITmfTimestamp.SECOND_SCALE, 0);
-    }
-
-    /**
-     * Simple constructor (precision = 0)
-     *
-     * @param value the timestamp value
-     * @param scale the timestamp scale
-     */
-    public TmfTimestamp(final long value, final int scale) {
-        this(value, scale, 0);
-    }
-
-    /**
-     * Full constructor
-     *
-     * @param value the timestamp value
-     * @param scale the timestamp scale
-     * @param precision the timestamp precision
-     */
-    public TmfTimestamp(final long value, final int scale, final int precision) {
-        fValue = value;
-        fScale = scale;
-        fPrecision = Math.abs(precision);
-    }
-
-    /**
-     * Copy constructor
-     *
-     * @param timestamp the timestamp to copy
-     */
-    public TmfTimestamp(final ITmfTimestamp timestamp) {
-        if (timestamp == null) {
-            throw new IllegalArgumentException();
-        }
-        fValue = timestamp.getValue();
-        fScale = timestamp.getScale();
-        fPrecision = timestamp.getPrecision();
-    }
-
-    // ------------------------------------------------------------------------
-    // ITmfTimestamp
-    // ------------------------------------------------------------------------
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getValue()
-     */
-    @Override
-    public long getValue() {
-        return fValue;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getScale()
-     */
-    @Override
-    public int getScale() {
-        return fScale;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getPrecision()
-     */
-    @Override
-    public int getPrecision() {
-        return fPrecision;
-    }
-
-    private static final long scalingFactors[] = new long[] {
-        1L,
-        10L,
-        100L,
-        1000L,
-        10000L,
-        100000L,
-        1000000L,
-        10000000L,
-        100000000L,
-        1000000000L,
-        10000000000L,
-        100000000000L,
-        1000000000000L,
-        10000000000000L,
-        100000000000000L,
-        1000000000000000L,
-        10000000000000000L,
-        100000000000000000L,
-        1000000000000000000L,
-    };
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#normalize(long, int)
-     */
-    @Override
-    public ITmfTimestamp normalize(final long offset, final int scale) {
-
-        long value = fValue;
-        int precision = fPrecision;
-
-        // Handle the trivial case
-        if (fScale == scale && offset == 0) {
-            return this;
-        }
-
-        // In case of big bang and big crunch just return this (no need to normalize)
-        if (this.equals(BIG_BANG) || this.equals(BIG_CRUNCH)) {
-            return this;
-        }
-
-        // First, scale the timestamp
-        if (fScale != scale) {
-            final int scaleDiff = Math.abs(fScale - scale);
-            if (scaleDiff >= scalingFactors.length) {
-                throw new ArithmeticException("Scaling exception"); //$NON-NLS-1$
-            }
-
-            final long scalingFactor = scalingFactors[scaleDiff];
-            if (scale < fScale) {
-                value *= scalingFactor;
-                precision *= scalingFactor;
-            } else {
-                value /= scalingFactor;
-                precision /= scalingFactor;
-            }
-        }
-
-        // Then, apply the offset
-        if (offset < 0) {
-            value = (value < Long.MIN_VALUE - offset) ? Long.MIN_VALUE : value + offset;
-        } else {
-            value = (value > Long.MAX_VALUE - offset) ? Long.MAX_VALUE : value + offset;
-        }
-
-        return new TmfTimestamp(value, scale, precision);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp, boolean)
-     */
-    @Override
-    public int compareTo(final ITmfTimestamp ts, final boolean withinPrecision) {
-
-        // Check the corner cases (we can't use equals() because it uses compareTo()...)
-        if (ts == null) {
-            return 1;
-        }
-        if (this == ts || (fValue == ts.getValue() && fScale == ts.getScale())) {
-            return 0;
-        }
-        if ((fValue == BIG_BANG.getValue() && fScale == BIG_BANG.getScale()) || (ts.getValue() == BIG_CRUNCH.getValue() && ts.getScale() == BIG_CRUNCH.getScale())) {
-            return -1;
-        }
-        if ((fValue == BIG_CRUNCH.getValue() && fScale == BIG_CRUNCH.getScale()) || (ts.getValue() == BIG_BANG.getValue() && ts.getScale() == BIG_BANG.getScale())) {
-            return 1;
-        }
-
-        try {
-            final ITmfTimestamp nts = ts.normalize(0, fScale);
-            final long delta = fValue - nts.getValue();
-            if ((delta == 0) || (withinPrecision && (Math.abs(delta) <= (fPrecision + nts.getPrecision())))) {
-                return 0;
-            }
-            return (delta > 0) ? 1 : -1;
-        }
-        catch (final ArithmeticException e) {
-            // Scaling error. We can figure it out nonetheless.
-
-            // First, look at the sign of the mantissa
-            final long value = ts.getValue();
-            if (fValue == 0 && value == 0) {
-                return 0;
-            }
-            if (fValue < 0 && value >= 0) {
-                return -1;
-            }
-            if (fValue >= 0 && value < 0) {
-                return 1;
-            }
-
-            // Otherwise, just compare the scales
-            final int scale = ts.getScale();
-            return (fScale > scale) ? (fValue >= 0) ? 1 : -1 : (fValue >= 0) ? -1 : 1;
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getDelta(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
-     */
-    @Override
-    public ITmfTimestamp getDelta(final ITmfTimestamp ts) {
-        final ITmfTimestamp nts = ts.normalize(0, fScale);
-        final long value = fValue - nts.getValue();
-        return new TmfTimestampDelta(value, fScale, fPrecision + nts.getPrecision());
-    }
-
-    // ------------------------------------------------------------------------
-    // Comparable
-    // ------------------------------------------------------------------------
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
-     */
-    @Override
-    public int compareTo(final ITmfTimestamp ts) {
-        return compareTo(ts, false);
-    }
-
-    // ------------------------------------------------------------------------
-    // Object
-    // ------------------------------------------------------------------------
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + (int) (fValue ^ (fValue >>> 32));
-        result = prime * result + fScale;
-        result = prime * result + fPrecision;
-        return result;
-    }
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals(final Object other) {
-        if (this == other) {
-            return true;
-        }
-        if (other == null) {
-            return false;
-        }
-        if (!(other instanceof TmfTimestamp)) {
-            return false;
-        }
-        final TmfTimestamp ts = (TmfTimestamp) other;
-        return compareTo(ts, false) == 0;
-    }
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
-    @Override
-    public String toString() {
-        return toString(TmfTimestampFormat.getDefaulTimeFormat());
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#toString(org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat)
-     */
-    /**
-     * @since 2.0
-     */
-    @Override
-    public String toString(final TmfTimestampFormat format) {
-        try {
-            ITmfTimestamp ts = normalize(0, ITmfTimestamp.NANOSECOND_SCALE);
-            return format.format(ts.getValue());
-        }
-        catch (ArithmeticException e) {
-            return format.format(0);
-        }
-    }
-
-}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimestampDelta.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimestampDelta.java
deleted file mode 100644 (file)
index 03e31fe..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Bernd Hufmann - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.tmf.core.event;
-
-import java.util.TimeZone;
-
-/**
- * A generic timestamp implementation for delta between timestamps.
- * The toString() method takes negative values into consideration.
- *
- * @author Bernd Hufmann
- * @since 2.0
- */
-public class TmfTimestampDelta extends TmfTimestamp {
-
-    // ------------------------------------------------------------------------
-    // Members
-    // ------------------------------------------------------------------------
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-    /**
-     * Default constructor
-     */
-    public TmfTimestampDelta() {
-        super();
-    }
-
-    /**
-     * Simple constructor (scale = precision = 0)
-     *
-     * @param value the timestamp value
-     */
-
-    public TmfTimestampDelta(long value) {
-        super(value);
-    }
-
-    /**
-     * Simple constructor (precision = 0)
-     *
-     * @param value the timestamp value
-     * @param scale the timestamp scale
-     */
-    public TmfTimestampDelta(long value, int scale) {
-        super(value, scale);
-    }
-
-
-    /**
-     * Copy constructor
-     *
-     * @param timestamp the timestamp to copy
-     */
-    public TmfTimestampDelta(ITmfTimestamp timestamp) {
-        super(timestamp);
-    }
-
-    /**
-     * Full constructor
-     *
-     * @param value the timestamp value
-     * @param scale the timestamp scale
-     * @param precision the timestamp precision
-     */
-    public TmfTimestampDelta(long value, int scale, int precision) {
-        super(value, scale, precision);
-    }
-
-    // ------------------------------------------------------------------------
-    // Operations
-    // ------------------------------------------------------------------------
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#normalize(long, int)
-     */
-    @Override
-    public ITmfTimestamp normalize(final long offset, final int scale) {
-        ITmfTimestamp nts = super.normalize(offset, scale);
-        return new TmfTimestampDelta(nts.getValue(), nts.getScale(), nts.getPrecision());
-    }
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
-    @Override
-    public String toString() {
-        return toString(TmfTimestampFormat.getDefaulIntervalFormat());
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#toString(org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat)
-     */
-    @Override
-    public String toString(TmfTimestampFormat format) {
-        if (getValue() < 0) {
-            TmfTimestampDelta tmpTs = new TmfTimestampDelta(-getValue(), getScale(), getPrecision());
-            return "-" + tmpTs.toString(format); //$NON-NLS-1$
-        }
-        TmfTimestampFormat deltaFormat = new TmfTimestampFormat(format.toPattern());
-        deltaFormat.setTimeZone(TimeZone.getTimeZone("UTC")); //$NON-NLS-1$
-        return super.toString(deltaFormat);
-    }
-}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimestampFormat.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTimestampFormat.java
deleted file mode 100644 (file)
index 9e7c32f..0000000
+++ /dev/null
@@ -1,615 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.core.event;
-
-import java.text.DecimalFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTimestampFormatUpdateSignal;
-
-/**
- * A formatting and parsing facility that can handle timestamps that span the
- * epoch with a precision down to the nanosecond. It can  be understood as a
- * simplified and more constrained version of SimpleDateFormat as it limits the
- * number of allowed pattern characters and the acceptable timestamp formats.
- * <p>
- * The timestamp representation is broken down into a number of optional
- * components that can be assembled into a fairly simple way.
- *
- * <h4>Date Pattern</h4>
- * <blockquote>
- * <table border=0 cellspacing=3 cellpadding=0 >
- *     <tr bgcolor="#ccccff">
- *         <th align=left>Format
- *         <th align=left>Description
- *         <th align=left>Value Range
- *         <th align=left>Example
- *     <tr>
- *         <td><code>yyyy</code>
- *         <td>Year
- *         <td><code>1970-...</code>
- *         <td><code>2012</code>
- *     <tr bgcolor="#eeeeff">
- *         <td><code>MM</code>
- *         <td>Month in year
- *         <td><code>01-12</code>
- *         <td><code>09</code>
- *     <tr>
- *         <td><code>dd</code>
- *         <td>Day in month
- *         <td><code>01-31</code>
- *         <td><code>22</code>
- * </table>
- * </blockquote>
- *
- * <h4>Time Pattern</h4>
- * <blockquote>
- * <table border=0 cellspacing=3 cellpadding=0 >
- *     <tr bgcolor="#ccccff">
- *         <th align=left>Format
- *         <th align=left>Description
- *         <th align=left>Value Range
- *         <th align=left>Example
- *     <tr>
- *         <td><code>HH</code>
- *         <td>Hour in day
- *         <td><code>00-23</code>
- *         <td><code>07</code>
- *     <tr bgcolor="#eeeeff">
- *         <td><code>mm</code>
- *         <td>Minute in hour
- *         <td><code>00-59</code>
- *         <td><code>35</code>
- *     <tr>
- *         <td><code>ss</code>
- *         <td>Second in minute
- *         <td><code>00-59</code>
- *         <td><code>41</code>
- *     <tr bgcolor="#eeeeff">
- *         <td><code>T</code>
- *         <td>The seconds since the epoch
- *         <td><code>00-...</code>
- *         <td><code>1332170682</code>
- * </table>
- * </blockquote>
- *
- * <h4>Sub-Seconds Pattern</h4>
- * <blockquote>
- * <table border=0 cellspacing=3 cellpadding=0 >
- *     <tr bgcolor="#ccccff">
- *         <th align=left>Format
- *         <th align=left>Description
- *         <th align=left>Value Range
- *         <th align=left>Example
- *     <tr>
- *         <td><code>SSS</code>
- *         <td>Millisecond in second
- *         <td><code>000-999</code>
- *         <td><code>123</code>
- *     <tr bgcolor="#eeeeff">
- *         <td><code>CCC</code>
- *         <td>Microseconds in ms
- *         <td><code>000-999</code>
- *         <td><code>456</code>
- *     <tr>
- *         <td><code>NNN</code>
- *         <td>Nanosecond in &#181s
- *         <td><code>000-999</code>
- *         <td><code>789</code>
- * </table>
- * </blockquote>
- *
- * <strong>Note: </strong>If "T" is used, no other Date or Time pattern
- * can be used. Also, "T" should be used for time intervals.
- * <p>
- * <strong>Note: </strong>Each sub-field can be separated by a single,
- * optional character delimiter. However, the between Date/Time and the
- * Sub-seconds pattern is mandatory (if there is a fractional part) and
- * has to be separated from Date/time by "." (period).
- * <p>
- * The recognized delimiters are:
- * <ul>
- * <li>Space ("<code> </code>")
- * <li>Period (<code>".</code>")
- * <li>Comma ("<code>,</code>")
- * <li>Dash ("<code>-</code>")
- * <li>Underline ("<code>_</code>")
- * <li>Colon ("<code>:</code>")
- * <li>Semicolon ("<code>;</code>")
- * <li>Slash ("<code>/</code>")
- * <li>Double-quote ("<code>"</code>")
- * </ul>
- *
- * <h4>Examples</h4>
- * The following examples show how timestamp patterns are interpreted in
- * the U.S. locale. The given timestamp is 1332170682539677389L, the number
- * of nanoseconds since 1970/01/01.
- *
- * <blockquote>
- * <table border=0 cellspacing=3 cellpadding=0>
- *     <tr bgcolor="#ccccff">
- *         <th align=left>Date and Time Pattern
- *         <th align=left>Result
- *     <tr>
- *         <td><code>"yyyy-MM-dd HH:mm:ss.SSS.CCC.NNN"</code>
- *         <td><code>2012-03-19 11:24:42.539.677.389</code>
- *     <tr bgcolor="#eeeeff">
- *         <td><code>"yyyy-MM-dd HH:mm:ss.SSS.CCC"</code>
- *         <td><code>2012-03-19 11:24:42.539.677</code>
- *     <tr>
- *         <td><code>"yyyy-D HH:mm:ss.SSS.CCC"</code>
- *         <td><code>2012-79 11:24:42.539.677</code>
- *     <tr bgcolor="#eeeeff">
- *         <td><code>"ss.SSSCCCNNN"</code>
- *         <td><code>42.539677389</code>
- *     <tr>
- *         <td><code>"T.SSS CCC NNN"</code>
- *         <td><code>1332170682.539 677 389</code>
- *     <tr bgcolor="#eeeeff">
- *         <td><code>"T"</code>
- *         <td><code>1332170682</code>
- * </table>
- * </blockquote>
- * <p>
- * @version 1.0
- * @since 2.0
- * @author Francois Chouinard
- */
-public class TmfTimestampFormat extends SimpleDateFormat {
-
-    // ------------------------------------------------------------------------
-    // Constants
-    // ------------------------------------------------------------------------
-
-    /**
-     * This class' serialization ID
-     */
-    private static final long serialVersionUID = 2835829763122454020L;
-
-    /**
-     * The default timestamp pattern
-     */
-    public static final String DEFAULT_TIME_PATTERN = "HH:mm:ss.SSS CCC NNN"; //$NON-NLS-1$
-
-    /**
-     * The LTTng 0.x legacy timestamp format
-     */
-    public static final String DEFAULT_INTERVAL_PATTERN = "TTT.SSS CCC NNN"; //$NON-NLS-1$
-
-    // Fractions of seconds supported patterns
-    private static final String DOT_RE = "\\.";                 //$NON-NLS-1$
-    private static final String SEP_RE = "[ \\.,-_:;/\\\"]?";   //$NON-NLS-1$
-    private static final String DGTS_3_RE  = "(\\d{3})";        //$NON-NLS-1$
-    private static final String DGTS_13_RE = "(\\d{1,3})";      //$NON-NLS-1$
-
-    private static final String MILLISEC_RE = DOT_RE + DGTS_13_RE;
-    private static final String MICROSEC_RE = DOT_RE + DGTS_3_RE + SEP_RE + DGTS_13_RE;
-    private static final String NANOSEC_RE  = DOT_RE + DGTS_3_RE + SEP_RE + DGTS_3_RE + SEP_RE + DGTS_13_RE;
-
-    private static final Pattern MILLISEC_PAT = Pattern.compile(MILLISEC_RE);
-    private static final Pattern MICROSEC_PAT = Pattern.compile(MICROSEC_RE);
-    private static final Pattern NANOSEC_PAT  = Pattern.compile(NANOSEC_RE);
-
-    // ------------------------------------------------------------------------
-    // Attributes
-    // ------------------------------------------------------------------------
-
-    // The default timestamp pattern
-    private static String fDefaultTimePattern = null;
-    private static TmfTimestampFormat fDefaultTimeFormat = null;
-
-    // The default time interval format
-    private static String fDefaultIntervalPattern = null;
-    private static TmfTimestampFormat fDefaultIntervalFormat = null;
-
-    // The timestamp pattern
-    private String fPattern;
-
-    // The timestamp pattern
-    private List<String> fSupplPatterns = new ArrayList<String>();
-
-    /**
-     * The supplementary pattern letters. Can be redefined by sub-classes
-     * to either override existing letters or augment the letter set.
-     * If so, the format() method must provide the (re-)implementation of the
-     * pattern.
-     */
-    protected String fSupplPatternLetters = "TSCN"; //$NON-NLS-1$
-
-    /*
-     * The bracketing symbols used to mitigate the risk of a format string
-     * that contains escaped sequences that would conflict with our format
-     * extension.
-     */
-    /** The open bracket symbol */
-    protected String fOpenBracket   = "[&"; //$NON-NLS-1$
-
-    /** The closing bracket symbol */
-    protected String fCloseBracket  = "&]"; //$NON-NLS-1$
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-    /**
-     * The default constructor (uses the default pattern)
-     */
-    public TmfTimestampFormat() {
-        this(fDefaultTimePattern);
-    }
-
-    /**
-     * The normal constructor
-     *
-     * @param pattern the format pattern
-     */
-    public TmfTimestampFormat(String pattern) {
-        applyPattern(pattern);
-    }
-
-    /**
-     * The copy constructor
-     *
-     * @param other the other format pattern
-     */
-    public TmfTimestampFormat(TmfTimestampFormat other) {
-        this(other.fPattern);
-    }
-
-    // ------------------------------------------------------------------------
-    // Getters/setters
-    // ------------------------------------------------------------------------
-
-    /**
-     * @param pattern the new default time pattern
-     */
-    public static void setDefaultTimeFormat(final String pattern) {
-        fDefaultTimePattern = pattern;
-        fDefaultTimeFormat = new TmfTimestampFormat(fDefaultTimePattern);
-        TmfSignalManager.dispatchSignal(new TmfTimestampFormatUpdateSignal(null));
-    }
-
-    /**
-     * @return the default time format pattern
-     */
-    public static TmfTimestampFormat getDefaulTimeFormat() {
-        if (fDefaultTimeFormat == null) {
-            fDefaultTimeFormat = new TmfTimestampFormat(DEFAULT_TIME_PATTERN);
-        }
-        return fDefaultTimeFormat;
-    }
-
-    /**
-     * @param pattern the new default interval pattern
-     */
-    public static void setDefaultIntervalFormat(final String pattern) {
-        fDefaultIntervalPattern = pattern;
-        fDefaultIntervalFormat = new TmfTimestampFormat(fDefaultIntervalPattern);
-        TmfSignalManager.dispatchSignal(new TmfTimestampFormatUpdateSignal(null));
-    }
-
-    /**
-     * @return the default interval format pattern
-     */
-    public static TmfTimestampFormat getDefaulIntervalFormat() {
-        if (fDefaultIntervalFormat == null) {
-            fDefaultIntervalFormat = new TmfTimestampFormat(DEFAULT_INTERVAL_PATTERN);
-        }
-        return fDefaultIntervalFormat;
-    }
-
-    /* (non-Javadoc)
-     * @see java.text.SimpleDateFormat#applyPattern(java.lang.String)
-     */
-    @Override
-    public void applyPattern(String pattern) {
-        fPattern = pattern;
-        String quotedPattern = quoteSpecificTags(pattern);
-        super.applyPattern(quotedPattern);
-    }
-
-    /* (non-Javadoc)
-     * @see java.text.SimpleDateFormat#toPattern()
-     */
-    @Override
-    public String toPattern() {
-        return fPattern;
-    }
-
-    // ------------------------------------------------------------------------
-    // Operations
-    // ------------------------------------------------------------------------
-
-    /**
-     * Format the timestamp according to its pattern.
-     *
-     * @param value the timestamp value to format (in ns)
-     * @return the formatted timestamp
-     */
-    public synchronized String format(long value) {
-
-        // Split the timestamp value into its sub-components
-        long sec = value / 1000000000;            // seconds
-        long ms  = value % 1000000000 / 1000000;  // milliseconds
-        long cs  = value % 1000000    / 1000;     // microseconds
-        long ns  = value % 1000;                  // nanoseconds
-
-        // Let the base class fill the stuff it knows about
-        StringBuffer result = new StringBuffer(super.format(sec * 1000 + ms));
-
-        // In the case where there is no separation between 2 supplementary
-        // fields, the pattern will have the form "..'[pat-1]''[pat-2]'.." and
-        // the base class format() will interpret the 2 adjacent quotes as a
-        // wanted character in the result string as ("..[pat-1]'[pat-2]..").
-        // Remove these extra quotes before filling the supplementary fields.
-        int loc = result.indexOf(fCloseBracket + "'" + fOpenBracket); //$NON-NLS-1$
-        while (loc != -1) {
-            result.deleteCharAt(loc + fCloseBracket.length());
-            loc = result.indexOf(fCloseBracket + "'" + fOpenBracket); //$NON-NLS-1$
-        }
-
-        // Fill in our extensions
-        for (String pattern : fSupplPatterns) {
-            int length = pattern.length();
-
-            // Prepare the format buffer
-            StringBuffer fmt = new StringBuffer(length);
-            for (int i = 0; i < length; i++) {
-                fmt.append("0"); //$NON-NLS-1$
-            }
-            DecimalFormat dfmt = new DecimalFormat(fmt.toString());
-            String fmtVal = ""; //$NON-NLS-1$;
-
-            // Format the proper value as per the pattern
-            switch (pattern.charAt(0)) {
-                case 'T':
-                    fmtVal = dfmt.format(sec);
-                    break;
-                case 'S':
-                    fmtVal = dfmt.format(ms);
-                    break;
-                case 'C':
-                    fmtVal = dfmt.format(cs);
-                    break;
-                case 'N':
-                    fmtVal = dfmt.format(ns);
-                    break;
-                default:
-                    break;
-            }
-
-            // Substitute the placeholder with the formatted value
-            String ph = new StringBuffer(fOpenBracket + pattern + fCloseBracket).toString();
-            loc = result.indexOf(ph);
-            result.replace(loc, loc + length + fOpenBracket.length() + fCloseBracket.length(), fmtVal);
-        }
-
-        return result.toString();
-    }
-
-    /**
-     * Parse a string according to the format pattern
-     *
-     * @param string the source string
-     * @param ref the reference (base) time
-     * @return the parsed value
-     * @throws ParseException if the string has an invalid format
-     */
-    public synchronized long parseValue(final String string, final long ref) throws ParseException {
-
-        // Trivial case
-        if (string == null || string.length() == 0) {
-            return 0;
-        }
-
-        // The timestamp sub-components
-        long seconds  = -1;
-        long millisec =  0;
-        long microsec =  0;
-        long nanosec  =  0;
-
-        // Since we are processing the fractional part, substitute it with
-        // its pattern so the base parser doesn't complain
-        StringBuilder sb = new StringBuilder(string);
-        int dot = string.indexOf('.');
-        if (dot == -1) {
-            sb.append('.');
-            dot = string.length();
-        }
-        sb = new StringBuilder(string.substring(0, dot));
-        String basePattern = super.toPattern();
-        int dot2 = basePattern.indexOf('.');
-        if (dot2 != -1) {
-            sb.append(basePattern.substring(dot2));
-        }
-
-        // Fill in our extensions
-        for (String pattern : fSupplPatterns) {
-            String pat = fOpenBracket + pattern + fCloseBracket;
-            Matcher matcher;
-
-            // Extract the substring corresponding to the extra pattern letters
-            // and replace with the pattern so the base parser can do its job.
-            switch (pattern.charAt(0)) {
-                case 'T':
-                    // Remove everything up to the first "." and  compute the
-                    // number of seconds since the epoch. If there is no period,
-                    // assume an integer value and return immediately
-                    if (dot < 1) {
-                        return new DecimalFormat("0").parse(string).longValue() * 1000000000; //$NON-NLS-1$
-                    }
-                    seconds = new DecimalFormat("0").parse(string.substring(0, dot)).longValue(); //$NON-NLS-1$
-                    sb.delete(0, dot);
-                    sb.insert(0, pat);
-                    break;
-                case 'S':
-                    matcher = MILLISEC_PAT.matcher(string.substring(dot));
-                    if (matcher.find()) {
-                        millisec = new Long(matcher.group(1));
-                        for (int l = matcher.group(1).length(); l < 3; l++) {
-                            millisec *= 10;
-                        }
-                    }
-                    stripQuotes(sb, pattern);
-                    break;
-                case 'C':
-                    matcher = MICROSEC_PAT.matcher(string.substring(dot));
-                    if (matcher.find()) {
-                        microsec = new Long(matcher.group(2));
-                        for (int l = matcher.group(2).length(); l < 3; l++) {
-                            microsec *= 10;
-                        }
-                    }
-                    stripQuotes(sb, pattern);
-                    break;
-                case 'N':
-                    matcher = NANOSEC_PAT.matcher(string.substring(dot));
-                    if (matcher.find()) {
-                        nanosec = new Long(matcher.group(3));
-                        for (int l = matcher.group(3).length(); l < 3; l++) {
-                            nanosec *= 10;
-                        }
-                    }
-                    stripQuotes(sb, pattern);
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        // If there was no "T" (thus not an interval), parse as a date
-        if (seconds == -1) {
-            Date baseDate = super.parse(sb.toString());
-
-            Calendar refTime = Calendar.getInstance(getTimeZone());
-            refTime.setTimeInMillis(ref / 1000000);
-            Calendar newTime = Calendar.getInstance(getTimeZone());
-            newTime.setTimeInMillis(baseDate.getTime());
-
-            int[] fields = new int[] { Calendar.YEAR, Calendar.MONTH, Calendar.DATE, Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND };
-            for (int field : fields) {
-                int value = newTime.get(field);
-                // Do some adjustments...
-                if (field == Calendar.YEAR) {
-                    value -= 1970;
-                } else if (field == Calendar.DATE) {
-                    value -= 1;
-                }
-                // ... and fill-in the empty fields
-                if (value == 0) {
-                    newTime.set(field, refTime.get(field));
-                } else {
-                    break; // Get out as soon as we have a significant value
-                }
-            }
-            seconds = newTime.getTimeInMillis() / 1000;
-        }
-
-        // Compute the value in ns
-        return seconds * 1000000000 +  millisec * 1000000 +  microsec * 1000 +  nanosec;
-    }
-
-    /**
-     * Parse a string according to the format pattern
-     *
-     * @param string the source string
-     * @return the parsed value
-     * @throws ParseException if the string has an invalid format
-     */
-    public long parseValue(final String string) throws ParseException {
-        long result = parseValue(string, 0);
-        return result;
-
-    }
-
-    // ------------------------------------------------------------------------
-    // Helper functions
-    // ------------------------------------------------------------------------
-
-    /**
-     * Copy the pattern but quote (bracket with "[&" and "&]") the
-     * TmfTimestampFormat specific tags so these fields are treated as
-     * comments by the base class.
-     *
-     * It also keeps track of the corresponding quoted fields so they can be
-     * properly populated later on (by format()).
-     *
-     * @param pattern the 'extended' pattern
-     * @return the quoted and bracketed pattern
-     */
-    private String quoteSpecificTags(final String pattern) {
-
-        StringBuffer result = new StringBuffer();
-
-        int length = pattern.length();
-        boolean inQuote = false;
-
-        for (int i = 0; i < length; i++) {
-            char c = pattern.charAt(i);
-            result.append(c);
-            if (c == '\'') {
-                // '' is treated as a single quote regardless of being
-                // in a quoted section.
-                if ((i + 1) < length) {
-                    c = pattern.charAt(i + 1);
-                    if (c == '\'') {
-                        i++;
-                        result.append(c);
-                        continue;
-                    }
-                }
-                inQuote = !inQuote;
-                continue;
-            }
-            if (!inQuote) {
-                if (fSupplPatternLetters.indexOf(c) != -1) {
-                    StringBuilder pat = new StringBuilder();
-                    pat.append(c);
-                    result.insert(result.length() - 1, "'" + fOpenBracket); //$NON-NLS-1$
-                    while ((i + 1) < length && pattern.charAt(i + 1) == c) {
-                        result.append(c);
-                        pat.append(c);
-                        i++;
-                    }
-                    result.append(fCloseBracket + "'"); //$NON-NLS-1$
-                    fSupplPatterns.add(pat.toString());
-                }
-            }
-        }
-        return result.toString();
-    }
-
-    /**
-     * Remove the quotes from the pattern
-     *
-     * @param sb
-     * @param pattern
-     */
-    private void stripQuotes(StringBuilder sb, String pattern) {
-        String pt = "'" + fOpenBracket + pattern + fCloseBracket + "'";  //$NON-NLS-1$//$NON-NLS-2$
-        int l = sb.indexOf(pt);
-        if (l != -1) {
-            sb.delete(l + pt.length() - 1, l + pt.length());
-            sb.delete(l, l + 1);
-        }
-    }
-
-}
index e7fc83784df8c0c63092dbf1db1127a69d82ac76..e42624840cc6022ec5014b34778d9cfd70261682 100644 (file)
@@ -18,7 +18,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 
 
 /**
index 54c9819107cb4e9c629cf560b01f9d2a5dbba5d8..63d208f28dd294948049f038698befb91fdeeaad 100644 (file)
@@ -12,7 +12,7 @@
 
 package org.eclipse.linuxtools.tmf.core.request;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 
 /**
  * The TMF event request
@@ -24,6 +24,7 @@ public interface ITmfEventRequest extends ITmfDataRequest {
 
     /**
      * @return the requested time range
+     * @since 2.0
      */
     public TmfTimeRange getRange();
 
index 653eaf6a7920402e798caccc6dc4672250bd3efe..ab39054f4f7372d04c499d35feb2bd5f67c7aa34 100644 (file)
@@ -14,7 +14,7 @@ package org.eclipse.linuxtools.tmf.core.request;
 
 import org.eclipse.linuxtools.internal.tmf.core.TmfCoreTracer;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 
 /**
  * An extension of TmfDataRequest for timestamped events.
@@ -178,6 +178,7 @@ public abstract class TmfEventRequest extends TmfDataRequest implements ITmfEven
 
     /**
      * @return the requested time range
+     * @since 2.0
      */
     @Override
        public TmfTimeRange getRange() {
index b55ebffc211869d7703b0a8489db90d769a018c2..da72abe80aab696c2c2f26f8a3cd91fe472fd0f9 100644 (file)
@@ -12,8 +12,8 @@
 
 package org.eclipse.linuxtools.tmf.core.signal;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 
 /**
  * A new active time range has been selected
@@ -36,6 +36,7 @@ public class TmfRangeSynchSignal extends TmfSignal {
      * @param ts
      *            The current selected timestamp, independent from the time
      *            range
+     * @since 2.0
      */
     public TmfRangeSynchSignal(Object source, TmfTimeRange range, ITmfTimestamp ts) {
         super(source);
@@ -45,6 +46,7 @@ public class TmfRangeSynchSignal extends TmfSignal {
 
     /**
      * @return This signal's time range
+     * @since 2.0
      */
     public TmfTimeRange getCurrentRange() {
         return fCurrentRange;
@@ -52,6 +54,7 @@ public class TmfRangeSynchSignal extends TmfSignal {
 
     /**
      * @return This signal's current selected timestamp
+     * @since 2.0
      */
     public ITmfTimestamp getCurrentTime() {
         return fCurrentTime;
index 1827c206fb7722f941f898569e90d613caf969f4..5ce9df662d78f660de692a6c71e38dda0f0f6da7 100644 (file)
@@ -12,7 +12,7 @@
 
 package org.eclipse.linuxtools.tmf.core.signal;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
  * A new current time is selected (for component synchronization)
@@ -31,6 +31,7 @@ public class TmfTimeSynchSignal extends TmfSignal {
      *            Object sending this signal
      * @param ts
      *            Synchronize to which timestamp
+     * @since 2.0
      */
     public TmfTimeSynchSignal(Object source, ITmfTimestamp ts) {
         super(source);
@@ -39,6 +40,7 @@ public class TmfTimeSynchSignal extends TmfSignal {
 
     /**
      * @return The synchronization timestamp of this signal
+     * @since 2.0
      */
     public ITmfTimestamp getCurrentTime() {
         return fCurrentTime;
index fde7152135ec95c9fdaefff9bf78b439f70d5d6d..30e573087348535d34530488c7339f10fbb77159 100644 (file)
@@ -12,7 +12,7 @@
 
 package org.eclipse.linuxtools.tmf.core.signal;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 /**
index b2c709f4710c9b741d4561556774004cf538c11c..c3dccc0e36baacdc9712d42bceb1b475102e0057 100644 (file)
@@ -12,7 +12,7 @@
 
 package org.eclipse.linuxtools.tmf.core.signal;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 /**
@@ -37,6 +37,7 @@ public class TmfTraceUpdatedSignal extends TmfSignal {
      *            The trace that was updated
      * @param range
      *            The new time range of the trace
+     * @since 2.0
      */
     public TmfTraceUpdatedSignal(Object source, ITmfTrace trace, TmfTimeRange range) {
         super(source);
@@ -53,6 +54,7 @@ public class TmfTraceUpdatedSignal extends TmfSignal {
 
     /**
      * @return The time range indicated by this signal
+     * @since 2.0
      */
     public TmfTimeRange getRange() {
         return fTimeRange;
index b8a3a080707c6965f00405b49738d985033a865d..022ae551aa9262746bf219380e74d9b414c7db8b 100644 (file)
@@ -17,8 +17,8 @@ import java.util.concurrent.BlockingQueue;
 
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEventFactory;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 
index 4d6900fedc4c0afae4ab558383894b851f18c73f..3b4cfe1fff84b6df8a61311303a53082521e98b1 100644 (file)
@@ -15,8 +15,8 @@ package org.eclipse.linuxtools.tmf.core.statistics;
 import java.util.List;
 import java.util.Map;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.signal.TmfStatsUpdatedSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
  * Provider for statistics, which is assigned to a trace. This can be used to
index d2ce4c2fd9ae528efd0a66df4a25654e113ecaa3..c5be16a5cb9df97cb02411374251c5434a0b8a56 100644 (file)
 package org.eclipse.linuxtools.tmf.core.statistics;
 
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
 import org.eclipse.linuxtools.tmf.core.exceptions.TimeRangeException;
 import org.eclipse.linuxtools.tmf.core.statesystem.AbstractStateChangeInput;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystemBuilder;
 import org.eclipse.linuxtools.tmf.core.statistics.TmfStateStatistics.Attributes;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 /**
index 4bd9e4dc3d81a6f1c2f1bd4b2263549e12f87592..fd90421eb1748041cace75d9aec4a8ca7025b0d6 100644 (file)
@@ -20,15 +20,15 @@ import java.util.Map;
 import java.util.TreeMap;
 
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
 import org.eclipse.linuxtools.tmf.core.signal.TmfStatsUpdatedSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 /**
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/ITmfTimestamp.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/ITmfTimestamp.java
new file mode 100644 (file)
index 0000000..f7b14a3
--- /dev/null
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.core.timestamp;
+
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+
+/**
+ * The fundamental time reference in the TMF.
+ * <p>
+ * It defines a generic timestamp interface in its most basic form:
+ * <ul>
+ * <li>timestamp = [value] * 10**[scale] +/- [precision]
+ * </ul>
+ * Where:
+ * <ul>
+ * <li>[value] is an unstructured integer value
+ * <li>[scale] is the magnitude of the value wrt some application-specific
+ * base unit (e.g. the second)
+ * <li>[precision] indicates the error on the value (useful for comparing
+ * timestamps in different scales). Default: 0.
+ * </ul>
+ *
+ * @author Francois Chouinard
+ * @version 2.0
+ * @since 2.0
+ *
+ * @see ITmfEvent
+ * @see TmfTimeRange
+ */
+public interface ITmfTimestamp extends Comparable<ITmfTimestamp> {
+
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+
+    /**
+     * The millisecond scale factor (10e0)
+     * @since 2.0
+     */
+    public static final int SECOND_SCALE = 0;
+
+    /**
+     * The millisecond scale factor (10e-3)
+     * @since 2.0
+     */
+    public static final int MILLISECOND_SCALE = -3;
+
+    /**
+     * The microsecond scale factor (10e-6)
+     * @since 2.0
+     */
+    public static final int MICROSECOND_SCALE = -6;
+
+    /**
+     * The nanosecond scale factor (10e-9)
+     * @since 2.0
+     */
+    public static final int NANOSECOND_SCALE = -9;
+
+    // ------------------------------------------------------------------------
+    // Getters
+    // ------------------------------------------------------------------------
+
+    /**
+     * @return the timestamp value (magnitude)
+     */
+    public long getValue();
+
+    /**
+     * @return the timestamp scale (exponent)
+     */
+    public int getScale();
+
+    /**
+     * @return the timestamp precision (measurement tolerance)
+     */
+    public int getPrecision();
+
+    // ------------------------------------------------------------------------
+    // Operations
+    // ------------------------------------------------------------------------
+
+    /**
+     * Normalize (adjust scale and offset) of the timestamp
+     *
+     * @param offset the offset to apply to the timestamp value (after scaling)
+     * @param scale the new timestamp scale
+     * @return a new 'adjusted' ITmfTimestamp
+     */
+    public ITmfTimestamp normalize(long offset, int scale);
+
+    /**
+     * Compares [this] and [ts] within timestamp precision
+     *
+     * @param ts the other timestamp
+     * @param withinPrecision consider the precision when testing for equality
+     * @return -1, 0 or 1 (less than, equals, greater than)
+     */
+    public int compareTo(ITmfTimestamp ts, boolean withinPrecision);
+
+    /**
+     * Returns the difference between [this] and [ts] as a timestamp
+     *
+     * @param ts the other timestamp
+     * @return the time difference (this - other) as an ITmfTimestamp
+     */
+    public ITmfTimestamp getDelta(ITmfTimestamp ts);
+
+    // ------------------------------------------------------------------------
+    // Comparable
+    // ------------------------------------------------------------------------
+
+    /* (non-Javadoc)
+     * @see java.lang.Comparable#compareTo(java.lang.Object)
+     */
+    @Override
+    int compareTo(ITmfTimestamp ts);
+
+    /**
+     * Format the timestamp as per the format provided
+     *
+     * @param format the timestamp formatter
+     * @return the formatted timestamp
+     * @since 2.0
+     */
+    public String toString(final TmfTimestampFormat format);
+
+}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfSimpleTimestamp.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfSimpleTimestamp.java
new file mode 100644 (file)
index 0000000..c46326a
--- /dev/null
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Francois Chouinard - Initial API and implementation
+ *   Francois Chouinard - Standardize on the default toString()
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.core.timestamp;
+
+/**
+ * A simplified timestamp where scale and precision are set to 0.
+ *
+ * @author Francois Chouinard
+ * @version 1.1
+ * @since 2.0
+ */
+public class TmfSimpleTimestamp extends TmfTimestamp {
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Default constructor (value = 0)
+     */
+    public TmfSimpleTimestamp() {
+        this(0);
+    }
+
+    /**
+     * Full constructor
+     *
+     * @param value the timestamp value
+     */
+    public TmfSimpleTimestamp(final long value) {
+        super(value, 0, 0);
+    }
+
+    /**
+     * Copy constructor.
+     *
+     * If the parameter is not a TmfSimpleTimestamp, the timestamp will be
+     * scaled to seconds, and the precision will be discarded.
+     *
+     * @param timestamp
+     *            The timestamp to copy
+     */
+    public TmfSimpleTimestamp(final ITmfTimestamp timestamp) {
+        super(timestamp.normalize(0, ITmfTimestamp.SECOND_SCALE).getValue(), 0, 0);
+    }
+
+    // ------------------------------------------------------------------------
+    // ITmfTimestamp
+    // ------------------------------------------------------------------------
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#normalize(long, int)
+     */
+    @Override
+    public ITmfTimestamp normalize(final long offset, final int scale) {
+        if (scale == 0) {
+            return new TmfSimpleTimestamp(getValue() + offset);
+        }
+        return super.normalize(offset, scale);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp, boolean)
+     */
+    @Override
+    public int compareTo(final ITmfTimestamp ts, final boolean withinPrecision) {
+        if (ts instanceof TmfSimpleTimestamp) {
+            final long delta = getValue() - ts.getValue();
+            return (delta == 0) ? 0 : (delta > 0) ? 1 : -1;
+        }
+        return super.compareTo(ts, withinPrecision);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#getDelta(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
+     */
+    @Override
+    public ITmfTimestamp getDelta(final ITmfTimestamp ts) {
+        if (ts instanceof TmfSimpleTimestamp) {
+            return new TmfTimestampDelta(getValue() - ts.getValue());
+        }
+        return super.getDelta(ts);
+    }
+
+    // ------------------------------------------------------------------------
+    // Object
+    // ------------------------------------------------------------------------
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return super.hashCode();
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(final Object other) {
+        if (this == other) {
+            return true;
+        }
+        if (other == null) {
+            return false;
+        }
+        if (!(other instanceof TmfSimpleTimestamp)) {
+            return super.equals(other);
+        }
+        final TmfSimpleTimestamp ts = (TmfSimpleTimestamp) other;
+
+        return compareTo(ts, false) == 0;
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimeRange.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimeRange.java
new file mode 100644 (file)
index 0000000..d33a3bb
--- /dev/null
@@ -0,0 +1,207 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2012 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Francois Chouinard - Initial API and implementation
+ *   Francois Chouinard - Updated as per TMF Event Model 1.0
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.core.timestamp;
+
+/**
+ * A utility class to define and manage time ranges.
+ *
+ * @author Francois Chouinard
+ * @version 1.0
+ * @since 2.0
+ *
+ * @see ITmfTimestamp
+ */
+public final class TmfTimeRange {
+
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+
+    /**
+     * The full possible time range
+     */
+    public static final TmfTimeRange ETERNITY =
+            new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH);
+
+    /**
+     * The null time range
+     */
+    public static final TmfTimeRange NULL_RANGE = new TmfTimeRange();
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+    private final ITmfTimestamp fStartTime;
+    private final ITmfTimestamp fEndTime;
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Default constructor
+     */
+    private TmfTimeRange() {
+        fStartTime = TmfTimestamp.BIG_BANG;
+        fEndTime = TmfTimestamp.BIG_BANG;
+    }
+
+    /**
+     * Full constructor
+     *
+     * @param startTime start of the time range
+     * @param endTime end of the time range
+     */
+    public TmfTimeRange(final ITmfTimestamp startTime, final ITmfTimestamp endTime) {
+        if (startTime == null || endTime == null) {
+            throw new IllegalArgumentException();
+        }
+        fStartTime = startTime;
+        fEndTime = endTime;
+    }
+
+    /**
+     * Copy constructor
+     *
+     * @param range the other time range
+     */
+    public TmfTimeRange(final TmfTimeRange range) {
+        if (range == null) {
+            throw new IllegalArgumentException();
+        }
+        fStartTime = range.getStartTime();
+        fEndTime = range.getEndTime();
+    }
+
+    // ------------------------------------------------------------------------
+    // Getters
+    // ------------------------------------------------------------------------
+
+    /**
+     * @return the time range start time
+     */
+    public ITmfTimestamp getStartTime() {
+        return fStartTime;
+    }
+
+    /**
+     * @return the time range end time
+     */
+    public ITmfTimestamp getEndTime() {
+        return fEndTime;
+    }
+
+    // ------------------------------------------------------------------------
+    // Predicates
+    // ------------------------------------------------------------------------
+
+    /**
+     * Check if the timestamp is within the time range
+     *
+     * @param ts the timestamp to check
+     * @return true if [startTime] <= [ts] <= [endTime]
+     */
+    public boolean contains(final ITmfTimestamp ts) {
+        // Zero acts as a "universal donor" timestamp
+        if (ts.equals(TmfTimestamp.ZERO)) {
+            return true;
+        }
+        return (fStartTime.compareTo(ts, true) <= 0) && (fEndTime.compareTo(ts, true) >= 0);
+    }
+
+    /**
+     * Check if the time range is within the time range
+     *
+     * @param range the other time range
+     * @return true if [range] is fully contained
+     */
+    public boolean contains(final TmfTimeRange range) {
+        final ITmfTimestamp startTime = range.getStartTime();
+        final ITmfTimestamp endTime = range.getEndTime();
+        return (fStartTime.compareTo(startTime, true) <= 0) && (fEndTime.compareTo(endTime, true) >= 0);
+    }
+
+    // ------------------------------------------------------------------------
+    // Operations
+    // ------------------------------------------------------------------------
+
+    /**
+     * Get intersection of two time ranges
+     *
+     * @param range the other time range
+     * @return the intersection time range, or null if no intersection exists
+     */
+    public TmfTimeRange getIntersection(final TmfTimeRange range) {
+        if (fStartTime.compareTo(range.fEndTime, true) > 0 || fEndTime.compareTo(range.fStartTime, true) < 0) {
+            return null; // no intersection
+        }
+
+        return new TmfTimeRange(fStartTime.compareTo(range.fStartTime, true) < 0
+                ? range.fStartTime
+                : fStartTime, fEndTime.compareTo(range.fEndTime, true) > 0
+                        ? range.fEndTime
+                        : fEndTime);
+    }
+
+    // ------------------------------------------------------------------------
+    // Object
+    // ------------------------------------------------------------------------
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + fEndTime.hashCode();
+        result = prime * result + fStartTime.hashCode();
+        return result;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(final Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (!(obj instanceof TmfTimeRange)) {
+            return false;
+        }
+        final TmfTimeRange other = (TmfTimeRange) obj;
+        if (!fEndTime.equals(other.fEndTime)) {
+            return false;
+        }
+        if (!fStartTime.equals(other.fStartTime)) {
+            return false;
+        }
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    @SuppressWarnings("nls")
+    public String toString() {
+        return "TmfTimeRange [fStartTime=" + fStartTime + ", fEndTime=" + fEndTime + "]";
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestamp.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestamp.java
new file mode 100644 (file)
index 0000000..484b716
--- /dev/null
@@ -0,0 +1,366 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010, 2012 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Francois Chouinard - Initial API and implementation
+ *   Thomas Gatterweh  - Updated scaling / synchronization
+ *   Francois Chouinard - Refactoring to align with TMF Event Model 1.0
+ *   Francois Chouinard - Implement augmented interface
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.core.timestamp;
+
+/**
+ * A generic timestamp implementation. The timestamp is represented by the
+ * tuple { value, scale, precision }. By default, timestamps are scaled in
+ * seconds.
+ *
+ * @author Francois Chouinard
+ * @version 1.1
+ * @since 2.0
+ */
+public class TmfTimestamp implements ITmfTimestamp {
+
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+
+    /**
+     * The beginning of time
+     */
+    public static final ITmfTimestamp BIG_BANG =
+            new TmfTimestamp(Long.MIN_VALUE, Integer.MAX_VALUE, 0);
+
+    /**
+     * The end of time
+     */
+    public static final ITmfTimestamp BIG_CRUNCH =
+            new TmfTimestamp(Long.MAX_VALUE, Integer.MAX_VALUE, 0);
+
+    /**
+     * A more practical definition of "beginning of time"
+     * @since 2.0
+     */
+    public static final ITmfTimestamp PROJECT_IS_FUNDED = BIG_BANG;
+
+    /**
+     * A more practical definition of "end of time"
+     * @since 2.0
+     */
+    public static final ITmfTimestamp PROJECT_IS_CANNED = BIG_CRUNCH;
+
+    /**
+     * Zero
+     */
+    public static final ITmfTimestamp ZERO =
+            new TmfTimestamp(0, 0, 0);
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+    /**
+     * The timestamp raw value (mantissa)
+     */
+    private final long fValue;
+
+    /**
+     * The timestamp scale (magnitude)
+     */
+    private final int fScale;
+
+    /**
+     * The value precision (tolerance)
+     */
+    private final int fPrecision;
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Default constructor
+     */
+    public TmfTimestamp() {
+        this(0, ITmfTimestamp.SECOND_SCALE, 0);
+    }
+
+    /**
+     * Simple constructor (scale = precision = 0)
+     *
+     * @param value the timestamp value
+     */
+    public TmfTimestamp(final long value) {
+        this(value, ITmfTimestamp.SECOND_SCALE, 0);
+    }
+
+    /**
+     * Simple constructor (precision = 0)
+     *
+     * @param value the timestamp value
+     * @param scale the timestamp scale
+     */
+    public TmfTimestamp(final long value, final int scale) {
+        this(value, scale, 0);
+    }
+
+    /**
+     * Full constructor
+     *
+     * @param value the timestamp value
+     * @param scale the timestamp scale
+     * @param precision the timestamp precision
+     */
+    public TmfTimestamp(final long value, final int scale, final int precision) {
+        fValue = value;
+        fScale = scale;
+        fPrecision = Math.abs(precision);
+    }
+
+    /**
+     * Copy constructor
+     *
+     * @param timestamp the timestamp to copy
+     */
+    public TmfTimestamp(final ITmfTimestamp timestamp) {
+        if (timestamp == null) {
+            throw new IllegalArgumentException();
+        }
+        fValue = timestamp.getValue();
+        fScale = timestamp.getScale();
+        fPrecision = timestamp.getPrecision();
+    }
+
+    // ------------------------------------------------------------------------
+    // ITmfTimestamp
+    // ------------------------------------------------------------------------
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getValue()
+     */
+    @Override
+    public long getValue() {
+        return fValue;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getScale()
+     */
+    @Override
+    public int getScale() {
+        return fScale;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getPrecision()
+     */
+    @Override
+    public int getPrecision() {
+        return fPrecision;
+    }
+
+    private static final long scalingFactors[] = new long[] {
+        1L,
+        10L,
+        100L,
+        1000L,
+        10000L,
+        100000L,
+        1000000L,
+        10000000L,
+        100000000L,
+        1000000000L,
+        10000000000L,
+        100000000000L,
+        1000000000000L,
+        10000000000000L,
+        100000000000000L,
+        1000000000000000L,
+        10000000000000000L,
+        100000000000000000L,
+        1000000000000000000L,
+    };
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#normalize(long, int)
+     */
+    @Override
+    public ITmfTimestamp normalize(final long offset, final int scale) {
+
+        long value = fValue;
+        int precision = fPrecision;
+
+        // Handle the trivial case
+        if (fScale == scale && offset == 0) {
+            return this;
+        }
+
+        // In case of big bang and big crunch just return this (no need to normalize)
+        if (this.equals(BIG_BANG) || this.equals(BIG_CRUNCH)) {
+            return this;
+        }
+
+        // First, scale the timestamp
+        if (fScale != scale) {
+            final int scaleDiff = Math.abs(fScale - scale);
+            if (scaleDiff >= scalingFactors.length) {
+                throw new ArithmeticException("Scaling exception"); //$NON-NLS-1$
+            }
+
+            final long scalingFactor = scalingFactors[scaleDiff];
+            if (scale < fScale) {
+                value *= scalingFactor;
+                precision *= scalingFactor;
+            } else {
+                value /= scalingFactor;
+                precision /= scalingFactor;
+            }
+        }
+
+        // Then, apply the offset
+        if (offset < 0) {
+            value = (value < Long.MIN_VALUE - offset) ? Long.MIN_VALUE : value + offset;
+        } else {
+            value = (value > Long.MAX_VALUE - offset) ? Long.MAX_VALUE : value + offset;
+        }
+
+        return new TmfTimestamp(value, scale, precision);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp, boolean)
+     */
+    @Override
+    public int compareTo(final ITmfTimestamp ts, final boolean withinPrecision) {
+
+        // Check the corner cases (we can't use equals() because it uses compareTo()...)
+        if (ts == null) {
+            return 1;
+        }
+        if (this == ts || (fValue == ts.getValue() && fScale == ts.getScale())) {
+            return 0;
+        }
+        if ((fValue == BIG_BANG.getValue() && fScale == BIG_BANG.getScale()) || (ts.getValue() == BIG_CRUNCH.getValue() && ts.getScale() == BIG_CRUNCH.getScale())) {
+            return -1;
+        }
+        if ((fValue == BIG_CRUNCH.getValue() && fScale == BIG_CRUNCH.getScale()) || (ts.getValue() == BIG_BANG.getValue() && ts.getScale() == BIG_BANG.getScale())) {
+            return 1;
+        }
+
+        try {
+            final ITmfTimestamp nts = ts.normalize(0, fScale);
+            final long delta = fValue - nts.getValue();
+            if ((delta == 0) || (withinPrecision && (Math.abs(delta) <= (fPrecision + nts.getPrecision())))) {
+                return 0;
+            }
+            return (delta > 0) ? 1 : -1;
+        }
+        catch (final ArithmeticException e) {
+            // Scaling error. We can figure it out nonetheless.
+
+            // First, look at the sign of the mantissa
+            final long value = ts.getValue();
+            if (fValue == 0 && value == 0) {
+                return 0;
+            }
+            if (fValue < 0 && value >= 0) {
+                return -1;
+            }
+            if (fValue >= 0 && value < 0) {
+                return 1;
+            }
+
+            // Otherwise, just compare the scales
+            final int scale = ts.getScale();
+            return (fScale > scale) ? (fValue >= 0) ? 1 : -1 : (fValue >= 0) ? -1 : 1;
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getDelta(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
+     */
+    @Override
+    public ITmfTimestamp getDelta(final ITmfTimestamp ts) {
+        final ITmfTimestamp nts = ts.normalize(0, fScale);
+        final long value = fValue - nts.getValue();
+        return new TmfTimestampDelta(value, fScale, fPrecision + nts.getPrecision());
+    }
+
+    // ------------------------------------------------------------------------
+    // Comparable
+    // ------------------------------------------------------------------------
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
+     */
+    @Override
+    public int compareTo(final ITmfTimestamp ts) {
+        return compareTo(ts, false);
+    }
+
+    // ------------------------------------------------------------------------
+    // Object
+    // ------------------------------------------------------------------------
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + (int) (fValue ^ (fValue >>> 32));
+        result = prime * result + fScale;
+        result = prime * result + fPrecision;
+        return result;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(final Object other) {
+        if (this == other) {
+            return true;
+        }
+        if (other == null) {
+            return false;
+        }
+        if (!(other instanceof TmfTimestamp)) {
+            return false;
+        }
+        final TmfTimestamp ts = (TmfTimestamp) other;
+        return compareTo(ts, false) == 0;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return toString(TmfTimestampFormat.getDefaulTimeFormat());
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#toString(org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat)
+     */
+    /**
+     * @since 2.0
+     */
+    @Override
+    public String toString(final TmfTimestampFormat format) {
+        try {
+            ITmfTimestamp ts = normalize(0, ITmfTimestamp.NANOSECOND_SCALE);
+            return format.format(ts.getValue());
+        }
+        catch (ArithmeticException e) {
+            return format.format(0);
+        }
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestampDelta.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestampDelta.java
new file mode 100644 (file)
index 0000000..f6c2540
--- /dev/null
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Bernd Hufmann - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.tmf.core.timestamp;
+
+import java.util.TimeZone;
+
+/**
+ * A generic timestamp implementation for delta between timestamps.
+ * The toString() method takes negative values into consideration.
+ *
+ * @author Bernd Hufmann
+ * @since 2.0
+ */
+public class TmfTimestampDelta extends TmfTimestamp {
+
+    // ------------------------------------------------------------------------
+    // Members
+    // ------------------------------------------------------------------------
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+    /**
+     * Default constructor
+     */
+    public TmfTimestampDelta() {
+        super();
+    }
+
+    /**
+     * Simple constructor (scale = precision = 0)
+     *
+     * @param value the timestamp value
+     */
+
+    public TmfTimestampDelta(long value) {
+        super(value);
+    }
+
+    /**
+     * Simple constructor (precision = 0)
+     *
+     * @param value the timestamp value
+     * @param scale the timestamp scale
+     */
+    public TmfTimestampDelta(long value, int scale) {
+        super(value, scale);
+    }
+
+
+    /**
+     * Copy constructor
+     *
+     * @param timestamp the timestamp to copy
+     */
+    public TmfTimestampDelta(ITmfTimestamp timestamp) {
+        super(timestamp);
+    }
+
+    /**
+     * Full constructor
+     *
+     * @param value the timestamp value
+     * @param scale the timestamp scale
+     * @param precision the timestamp precision
+     */
+    public TmfTimestampDelta(long value, int scale, int precision) {
+        super(value, scale, precision);
+    }
+
+    // ------------------------------------------------------------------------
+    // Operations
+    // ------------------------------------------------------------------------
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#normalize(long, int)
+     */
+    @Override
+    public ITmfTimestamp normalize(final long offset, final int scale) {
+        ITmfTimestamp nts = super.normalize(offset, scale);
+        return new TmfTimestampDelta(nts.getValue(), nts.getScale(), nts.getPrecision());
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return toString(TmfTimestampFormat.getDefaulIntervalFormat());
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#toString(org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat)
+     */
+    @Override
+    public String toString(TmfTimestampFormat format) {
+        if (getValue() < 0) {
+            TmfTimestampDelta tmpTs = new TmfTimestampDelta(-getValue(), getScale(), getPrecision());
+            return "-" + tmpTs.toString(format); //$NON-NLS-1$
+        }
+        TmfTimestampFormat deltaFormat = new TmfTimestampFormat(format.toPattern());
+        deltaFormat.setTimeZone(TimeZone.getTimeZone("UTC")); //$NON-NLS-1$
+        return super.toString(deltaFormat);
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestampFormat.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestampFormat.java
new file mode 100644 (file)
index 0000000..dea98a7
--- /dev/null
@@ -0,0 +1,615 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.core.timestamp;
+
+import java.text.DecimalFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTimestampFormatUpdateSignal;
+
+/**
+ * A formatting and parsing facility that can handle timestamps that span the
+ * epoch with a precision down to the nanosecond. It can  be understood as a
+ * simplified and more constrained version of SimpleDateFormat as it limits the
+ * number of allowed pattern characters and the acceptable timestamp formats.
+ * <p>
+ * The timestamp representation is broken down into a number of optional
+ * components that can be assembled into a fairly simple way.
+ *
+ * <h4>Date Pattern</h4>
+ * <blockquote>
+ * <table border=0 cellspacing=3 cellpadding=0 >
+ *     <tr bgcolor="#ccccff">
+ *         <th align=left>Format
+ *         <th align=left>Description
+ *         <th align=left>Value Range
+ *         <th align=left>Example
+ *     <tr>
+ *         <td><code>yyyy</code>
+ *         <td>Year
+ *         <td><code>1970-...</code>
+ *         <td><code>2012</code>
+ *     <tr bgcolor="#eeeeff">
+ *         <td><code>MM</code>
+ *         <td>Month in year
+ *         <td><code>01-12</code>
+ *         <td><code>09</code>
+ *     <tr>
+ *         <td><code>dd</code>
+ *         <td>Day in month
+ *         <td><code>01-31</code>
+ *         <td><code>22</code>
+ * </table>
+ * </blockquote>
+ *
+ * <h4>Time Pattern</h4>
+ * <blockquote>
+ * <table border=0 cellspacing=3 cellpadding=0 >
+ *     <tr bgcolor="#ccccff">
+ *         <th align=left>Format
+ *         <th align=left>Description
+ *         <th align=left>Value Range
+ *         <th align=left>Example
+ *     <tr>
+ *         <td><code>HH</code>
+ *         <td>Hour in day
+ *         <td><code>00-23</code>
+ *         <td><code>07</code>
+ *     <tr bgcolor="#eeeeff">
+ *         <td><code>mm</code>
+ *         <td>Minute in hour
+ *         <td><code>00-59</code>
+ *         <td><code>35</code>
+ *     <tr>
+ *         <td><code>ss</code>
+ *         <td>Second in minute
+ *         <td><code>00-59</code>
+ *         <td><code>41</code>
+ *     <tr bgcolor="#eeeeff">
+ *         <td><code>T</code>
+ *         <td>The seconds since the epoch
+ *         <td><code>00-...</code>
+ *         <td><code>1332170682</code>
+ * </table>
+ * </blockquote>
+ *
+ * <h4>Sub-Seconds Pattern</h4>
+ * <blockquote>
+ * <table border=0 cellspacing=3 cellpadding=0 >
+ *     <tr bgcolor="#ccccff">
+ *         <th align=left>Format
+ *         <th align=left>Description
+ *         <th align=left>Value Range
+ *         <th align=left>Example
+ *     <tr>
+ *         <td><code>SSS</code>
+ *         <td>Millisecond in second
+ *         <td><code>000-999</code>
+ *         <td><code>123</code>
+ *     <tr bgcolor="#eeeeff">
+ *         <td><code>CCC</code>
+ *         <td>Microseconds in ms
+ *         <td><code>000-999</code>
+ *         <td><code>456</code>
+ *     <tr>
+ *         <td><code>NNN</code>
+ *         <td>Nanosecond in &#181s
+ *         <td><code>000-999</code>
+ *         <td><code>789</code>
+ * </table>
+ * </blockquote>
+ *
+ * <strong>Note: </strong>If "T" is used, no other Date or Time pattern
+ * can be used. Also, "T" should be used for time intervals.
+ * <p>
+ * <strong>Note: </strong>Each sub-field can be separated by a single,
+ * optional character delimiter. However, the between Date/Time and the
+ * Sub-seconds pattern is mandatory (if there is a fractional part) and
+ * has to be separated from Date/time by "." (period).
+ * <p>
+ * The recognized delimiters are:
+ * <ul>
+ * <li>Space ("<code> </code>")
+ * <li>Period (<code>".</code>")
+ * <li>Comma ("<code>,</code>")
+ * <li>Dash ("<code>-</code>")
+ * <li>Underline ("<code>_</code>")
+ * <li>Colon ("<code>:</code>")
+ * <li>Semicolon ("<code>;</code>")
+ * <li>Slash ("<code>/</code>")
+ * <li>Double-quote ("<code>"</code>")
+ * </ul>
+ *
+ * <h4>Examples</h4>
+ * The following examples show how timestamp patterns are interpreted in
+ * the U.S. locale. The given timestamp is 1332170682539677389L, the number
+ * of nanoseconds since 1970/01/01.
+ *
+ * <blockquote>
+ * <table border=0 cellspacing=3 cellpadding=0>
+ *     <tr bgcolor="#ccccff">
+ *         <th align=left>Date and Time Pattern
+ *         <th align=left>Result
+ *     <tr>
+ *         <td><code>"yyyy-MM-dd HH:mm:ss.SSS.CCC.NNN"</code>
+ *         <td><code>2012-03-19 11:24:42.539.677.389</code>
+ *     <tr bgcolor="#eeeeff">
+ *         <td><code>"yyyy-MM-dd HH:mm:ss.SSS.CCC"</code>
+ *         <td><code>2012-03-19 11:24:42.539.677</code>
+ *     <tr>
+ *         <td><code>"yyyy-D HH:mm:ss.SSS.CCC"</code>
+ *         <td><code>2012-79 11:24:42.539.677</code>
+ *     <tr bgcolor="#eeeeff">
+ *         <td><code>"ss.SSSCCCNNN"</code>
+ *         <td><code>42.539677389</code>
+ *     <tr>
+ *         <td><code>"T.SSS CCC NNN"</code>
+ *         <td><code>1332170682.539 677 389</code>
+ *     <tr bgcolor="#eeeeff">
+ *         <td><code>"T"</code>
+ *         <td><code>1332170682</code>
+ * </table>
+ * </blockquote>
+ * <p>
+ * @version 1.0
+ * @since 2.0
+ * @author Francois Chouinard
+ */
+public class TmfTimestampFormat extends SimpleDateFormat {
+
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+
+    /**
+     * This class' serialization ID
+     */
+    private static final long serialVersionUID = 2835829763122454020L;
+
+    /**
+     * The default timestamp pattern
+     */
+    public static final String DEFAULT_TIME_PATTERN = "HH:mm:ss.SSS CCC NNN"; //$NON-NLS-1$
+
+    /**
+     * The LTTng 0.x legacy timestamp format
+     */
+    public static final String DEFAULT_INTERVAL_PATTERN = "TTT.SSS CCC NNN"; //$NON-NLS-1$
+
+    // Fractions of seconds supported patterns
+    private static final String DOT_RE = "\\.";                 //$NON-NLS-1$
+    private static final String SEP_RE = "[ \\.,-_:;/\\\"]?";   //$NON-NLS-1$
+    private static final String DGTS_3_RE  = "(\\d{3})";        //$NON-NLS-1$
+    private static final String DGTS_13_RE = "(\\d{1,3})";      //$NON-NLS-1$
+
+    private static final String MILLISEC_RE = DOT_RE + DGTS_13_RE;
+    private static final String MICROSEC_RE = DOT_RE + DGTS_3_RE + SEP_RE + DGTS_13_RE;
+    private static final String NANOSEC_RE  = DOT_RE + DGTS_3_RE + SEP_RE + DGTS_3_RE + SEP_RE + DGTS_13_RE;
+
+    private static final Pattern MILLISEC_PAT = Pattern.compile(MILLISEC_RE);
+    private static final Pattern MICROSEC_PAT = Pattern.compile(MICROSEC_RE);
+    private static final Pattern NANOSEC_PAT  = Pattern.compile(NANOSEC_RE);
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+    // The default timestamp pattern
+    private static String fDefaultTimePattern = null;
+    private static TmfTimestampFormat fDefaultTimeFormat = null;
+
+    // The default time interval format
+    private static String fDefaultIntervalPattern = null;
+    private static TmfTimestampFormat fDefaultIntervalFormat = null;
+
+    // The timestamp pattern
+    private String fPattern;
+
+    // The timestamp pattern
+    private List<String> fSupplPatterns = new ArrayList<String>();
+
+    /**
+     * The supplementary pattern letters. Can be redefined by sub-classes
+     * to either override existing letters or augment the letter set.
+     * If so, the format() method must provide the (re-)implementation of the
+     * pattern.
+     */
+    protected String fSupplPatternLetters = "TSCN"; //$NON-NLS-1$
+
+    /*
+     * The bracketing symbols used to mitigate the risk of a format string
+     * that contains escaped sequences that would conflict with our format
+     * extension.
+     */
+    /** The open bracket symbol */
+    protected String fOpenBracket   = "[&"; //$NON-NLS-1$
+
+    /** The closing bracket symbol */
+    protected String fCloseBracket  = "&]"; //$NON-NLS-1$
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * The default constructor (uses the default pattern)
+     */
+    public TmfTimestampFormat() {
+        this(fDefaultTimePattern);
+    }
+
+    /**
+     * The normal constructor
+     *
+     * @param pattern the format pattern
+     */
+    public TmfTimestampFormat(String pattern) {
+        applyPattern(pattern);
+    }
+
+    /**
+     * The copy constructor
+     *
+     * @param other the other format pattern
+     */
+    public TmfTimestampFormat(TmfTimestampFormat other) {
+        this(other.fPattern);
+    }
+
+    // ------------------------------------------------------------------------
+    // Getters/setters
+    // ------------------------------------------------------------------------
+
+    /**
+     * @param pattern the new default time pattern
+     */
+    public static void setDefaultTimeFormat(final String pattern) {
+        fDefaultTimePattern = pattern;
+        fDefaultTimeFormat = new TmfTimestampFormat(fDefaultTimePattern);
+        TmfSignalManager.dispatchSignal(new TmfTimestampFormatUpdateSignal(null));
+    }
+
+    /**
+     * @return the default time format pattern
+     */
+    public static TmfTimestampFormat getDefaulTimeFormat() {
+        if (fDefaultTimeFormat == null) {
+            fDefaultTimeFormat = new TmfTimestampFormat(DEFAULT_TIME_PATTERN);
+        }
+        return fDefaultTimeFormat;
+    }
+
+    /**
+     * @param pattern the new default interval pattern
+     */
+    public static void setDefaultIntervalFormat(final String pattern) {
+        fDefaultIntervalPattern = pattern;
+        fDefaultIntervalFormat = new TmfTimestampFormat(fDefaultIntervalPattern);
+        TmfSignalManager.dispatchSignal(new TmfTimestampFormatUpdateSignal(null));
+    }
+
+    /**
+     * @return the default interval format pattern
+     */
+    public static TmfTimestampFormat getDefaulIntervalFormat() {
+        if (fDefaultIntervalFormat == null) {
+            fDefaultIntervalFormat = new TmfTimestampFormat(DEFAULT_INTERVAL_PATTERN);
+        }
+        return fDefaultIntervalFormat;
+    }
+
+    /* (non-Javadoc)
+     * @see java.text.SimpleDateFormat#applyPattern(java.lang.String)
+     */
+    @Override
+    public void applyPattern(String pattern) {
+        fPattern = pattern;
+        String quotedPattern = quoteSpecificTags(pattern);
+        super.applyPattern(quotedPattern);
+    }
+
+    /* (non-Javadoc)
+     * @see java.text.SimpleDateFormat#toPattern()
+     */
+    @Override
+    public String toPattern() {
+        return fPattern;
+    }
+
+    // ------------------------------------------------------------------------
+    // Operations
+    // ------------------------------------------------------------------------
+
+    /**
+     * Format the timestamp according to its pattern.
+     *
+     * @param value the timestamp value to format (in ns)
+     * @return the formatted timestamp
+     */
+    public synchronized String format(long value) {
+
+        // Split the timestamp value into its sub-components
+        long sec = value / 1000000000;            // seconds
+        long ms  = value % 1000000000 / 1000000;  // milliseconds
+        long cs  = value % 1000000    / 1000;     // microseconds
+        long ns  = value % 1000;                  // nanoseconds
+
+        // Let the base class fill the stuff it knows about
+        StringBuffer result = new StringBuffer(super.format(sec * 1000 + ms));
+
+        // In the case where there is no separation between 2 supplementary
+        // fields, the pattern will have the form "..'[pat-1]''[pat-2]'.." and
+        // the base class format() will interpret the 2 adjacent quotes as a
+        // wanted character in the result string as ("..[pat-1]'[pat-2]..").
+        // Remove these extra quotes before filling the supplementary fields.
+        int loc = result.indexOf(fCloseBracket + "'" + fOpenBracket); //$NON-NLS-1$
+        while (loc != -1) {
+            result.deleteCharAt(loc + fCloseBracket.length());
+            loc = result.indexOf(fCloseBracket + "'" + fOpenBracket); //$NON-NLS-1$
+        }
+
+        // Fill in our extensions
+        for (String pattern : fSupplPatterns) {
+            int length = pattern.length();
+
+            // Prepare the format buffer
+            StringBuffer fmt = new StringBuffer(length);
+            for (int i = 0; i < length; i++) {
+                fmt.append("0"); //$NON-NLS-1$
+            }
+            DecimalFormat dfmt = new DecimalFormat(fmt.toString());
+            String fmtVal = ""; //$NON-NLS-1$;
+
+            // Format the proper value as per the pattern
+            switch (pattern.charAt(0)) {
+                case 'T':
+                    fmtVal = dfmt.format(sec);
+                    break;
+                case 'S':
+                    fmtVal = dfmt.format(ms);
+                    break;
+                case 'C':
+                    fmtVal = dfmt.format(cs);
+                    break;
+                case 'N':
+                    fmtVal = dfmt.format(ns);
+                    break;
+                default:
+                    break;
+            }
+
+            // Substitute the placeholder with the formatted value
+            String ph = new StringBuffer(fOpenBracket + pattern + fCloseBracket).toString();
+            loc = result.indexOf(ph);
+            result.replace(loc, loc + length + fOpenBracket.length() + fCloseBracket.length(), fmtVal);
+        }
+
+        return result.toString();
+    }
+
+    /**
+     * Parse a string according to the format pattern
+     *
+     * @param string the source string
+     * @param ref the reference (base) time
+     * @return the parsed value
+     * @throws ParseException if the string has an invalid format
+     */
+    public synchronized long parseValue(final String string, final long ref) throws ParseException {
+
+        // Trivial case
+        if (string == null || string.length() == 0) {
+            return 0;
+        }
+
+        // The timestamp sub-components
+        long seconds  = -1;
+        long millisec =  0;
+        long microsec =  0;
+        long nanosec  =  0;
+
+        // Since we are processing the fractional part, substitute it with
+        // its pattern so the base parser doesn't complain
+        StringBuilder sb = new StringBuilder(string);
+        int dot = string.indexOf('.');
+        if (dot == -1) {
+            sb.append('.');
+            dot = string.length();
+        }
+        sb = new StringBuilder(string.substring(0, dot));
+        String basePattern = super.toPattern();
+        int dot2 = basePattern.indexOf('.');
+        if (dot2 != -1) {
+            sb.append(basePattern.substring(dot2));
+        }
+
+        // Fill in our extensions
+        for (String pattern : fSupplPatterns) {
+            String pat = fOpenBracket + pattern + fCloseBracket;
+            Matcher matcher;
+
+            // Extract the substring corresponding to the extra pattern letters
+            // and replace with the pattern so the base parser can do its job.
+            switch (pattern.charAt(0)) {
+                case 'T':
+                    // Remove everything up to the first "." and  compute the
+                    // number of seconds since the epoch. If there is no period,
+                    // assume an integer value and return immediately
+                    if (dot < 1) {
+                        return new DecimalFormat("0").parse(string).longValue() * 1000000000; //$NON-NLS-1$
+                    }
+                    seconds = new DecimalFormat("0").parse(string.substring(0, dot)).longValue(); //$NON-NLS-1$
+                    sb.delete(0, dot);
+                    sb.insert(0, pat);
+                    break;
+                case 'S':
+                    matcher = MILLISEC_PAT.matcher(string.substring(dot));
+                    if (matcher.find()) {
+                        millisec = new Long(matcher.group(1));
+                        for (int l = matcher.group(1).length(); l < 3; l++) {
+                            millisec *= 10;
+                        }
+                    }
+                    stripQuotes(sb, pattern);
+                    break;
+                case 'C':
+                    matcher = MICROSEC_PAT.matcher(string.substring(dot));
+                    if (matcher.find()) {
+                        microsec = new Long(matcher.group(2));
+                        for (int l = matcher.group(2).length(); l < 3; l++) {
+                            microsec *= 10;
+                        }
+                    }
+                    stripQuotes(sb, pattern);
+                    break;
+                case 'N':
+                    matcher = NANOSEC_PAT.matcher(string.substring(dot));
+                    if (matcher.find()) {
+                        nanosec = new Long(matcher.group(3));
+                        for (int l = matcher.group(3).length(); l < 3; l++) {
+                            nanosec *= 10;
+                        }
+                    }
+                    stripQuotes(sb, pattern);
+                    break;
+                default:
+                    break;
+            }
+        }
+
+        // If there was no "T" (thus not an interval), parse as a date
+        if (seconds == -1) {
+            Date baseDate = super.parse(sb.toString());
+
+            Calendar refTime = Calendar.getInstance(getTimeZone());
+            refTime.setTimeInMillis(ref / 1000000);
+            Calendar newTime = Calendar.getInstance(getTimeZone());
+            newTime.setTimeInMillis(baseDate.getTime());
+
+            int[] fields = new int[] { Calendar.YEAR, Calendar.MONTH, Calendar.DATE, Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND };
+            for (int field : fields) {
+                int value = newTime.get(field);
+                // Do some adjustments...
+                if (field == Calendar.YEAR) {
+                    value -= 1970;
+                } else if (field == Calendar.DATE) {
+                    value -= 1;
+                }
+                // ... and fill-in the empty fields
+                if (value == 0) {
+                    newTime.set(field, refTime.get(field));
+                } else {
+                    break; // Get out as soon as we have a significant value
+                }
+            }
+            seconds = newTime.getTimeInMillis() / 1000;
+        }
+
+        // Compute the value in ns
+        return seconds * 1000000000 +  millisec * 1000000 +  microsec * 1000 +  nanosec;
+    }
+
+    /**
+     * Parse a string according to the format pattern
+     *
+     * @param string the source string
+     * @return the parsed value
+     * @throws ParseException if the string has an invalid format
+     */
+    public long parseValue(final String string) throws ParseException {
+        long result = parseValue(string, 0);
+        return result;
+
+    }
+
+    // ------------------------------------------------------------------------
+    // Helper functions
+    // ------------------------------------------------------------------------
+
+    /**
+     * Copy the pattern but quote (bracket with "[&" and "&]") the
+     * TmfTimestampFormat specific tags so these fields are treated as
+     * comments by the base class.
+     *
+     * It also keeps track of the corresponding quoted fields so they can be
+     * properly populated later on (by format()).
+     *
+     * @param pattern the 'extended' pattern
+     * @return the quoted and bracketed pattern
+     */
+    private String quoteSpecificTags(final String pattern) {
+
+        StringBuffer result = new StringBuffer();
+
+        int length = pattern.length();
+        boolean inQuote = false;
+
+        for (int i = 0; i < length; i++) {
+            char c = pattern.charAt(i);
+            result.append(c);
+            if (c == '\'') {
+                // '' is treated as a single quote regardless of being
+                // in a quoted section.
+                if ((i + 1) < length) {
+                    c = pattern.charAt(i + 1);
+                    if (c == '\'') {
+                        i++;
+                        result.append(c);
+                        continue;
+                    }
+                }
+                inQuote = !inQuote;
+                continue;
+            }
+            if (!inQuote) {
+                if (fSupplPatternLetters.indexOf(c) != -1) {
+                    StringBuilder pat = new StringBuilder();
+                    pat.append(c);
+                    result.insert(result.length() - 1, "'" + fOpenBracket); //$NON-NLS-1$
+                    while ((i + 1) < length && pattern.charAt(i + 1) == c) {
+                        result.append(c);
+                        pat.append(c);
+                        i++;
+                    }
+                    result.append(fCloseBracket + "'"); //$NON-NLS-1$
+                    fSupplPatterns.add(pat.toString());
+                }
+            }
+        }
+        return result.toString();
+    }
+
+    /**
+     * Remove the quotes from the pattern
+     *
+     * @param sb
+     * @param pattern
+     */
+    private void stripQuotes(StringBuilder sb, String pattern) {
+        String pt = "'" + fOpenBracket + pattern + fCloseBracket + "'";  //$NON-NLS-1$//$NON-NLS-2$
+        int l = sb.indexOf(pt);
+        if (l != -1) {
+            sb.delete(l + pt.length() - 1, l + pt.length());
+            sb.delete(l, l + 1);
+        }
+    }
+
+}
index a510bec37911c9659a090e56e56159abc2093a18..e0600458eb61d3e4af244363271aac669f2bcd2e 100644 (file)
@@ -13,7 +13,7 @@
 
 package org.eclipse.linuxtools.tmf.core.trace;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
  * The basic trace checkpoint structure in TMF. The purpose of the checkpoint is
@@ -32,7 +32,8 @@ public interface ITmfCheckpoint extends Comparable<ITmfCheckpoint> {
     // ------------------------------------------------------------------------
 
     /**
-     * @return the timestamp of the event referred to by the checkpoint
+     * @return the timestamp of the event referred to by the context
+     * @since 2.0
      */
     public ITmfTimestamp getTimestamp();
 
index 340cfdf9489dec353110ac9db7b8f1ef9705c52b..d678b522ae74a5e54ce0ae19b9af21c952c80a7e 100644 (file)
@@ -19,11 +19,11 @@ import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
 import org.eclipse.linuxtools.tmf.core.statistics.ITmfStatistics;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 
 /**
  * The event stream structure in TMF. In its basic form, a trace has:
@@ -212,16 +212,19 @@ public interface ITmfTrace extends ITmfDataProvider {
 
     /**
      * @return the trace time range
+     * @since 2.0
      */
     public TmfTimeRange getTimeRange();
 
     /**
      * @return the timestamp of the first trace event
+     * @since 2.0
      */
     public ITmfTimestamp getStartTime();
 
     /**
      * @return the timestamp of the last trace event
+     * @since 2.0
      */
     public ITmfTimestamp getEndTime();
 
@@ -292,6 +295,7 @@ public interface ITmfTrace extends ITmfDataProvider {
      *
      * @param timestamp the timestamp of desired event
      * @return a context which can later be used to read the corresponding event
+     * @since 2.0
      */
     public ITmfContext seekEvent(ITmfTimestamp timestamp);
 
index 41f162aacba1c2fb06fa0d40bd97ec8fb19805cb..ff2bb8cb788fbef4e39e9e611d81aeee826a8af3 100644 (file)
@@ -13,8 +13,8 @@
 package org.eclipse.linuxtools.tmf.core.trace;
 
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 
 /**
  * The generic trace indexer in TMF with support for incremental indexing.
@@ -66,6 +66,7 @@ public interface ITmfTraceIndexer {
      * @param waitForCompletion
      *            Should we block the calling thread until the build is
      *            complete?
+     * @since 2.0
      */
     public void buildIndex(long offset, TmfTimeRange range, boolean waitForCompletion);
 
@@ -82,6 +83,7 @@ public interface ITmfTraceIndexer {
      *
      * @param context The trace context to save
      * @param timestamp The timestamp matching this context
+     * @since 2.0
      */
     public void updateIndex(ITmfContext context, ITmfTimestamp timestamp);
 
@@ -91,6 +93,7 @@ public interface ITmfTraceIndexer {
      *
      * @param timestamp the requested timestamp
      * @return the checkpoint context
+     * @since 2.0
      */
     public ITmfContext seekIndex(ITmfTimestamp timestamp);
 
index edc27cec860ceb12ac20de5ec642f996bf6a3ca3..a286b87ef9034201d1234c5015b5e6684ed52e3a 100644 (file)
@@ -14,7 +14,7 @@
 
 package org.eclipse.linuxtools.tmf.core.trace;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
  * A basic implementation of ITmfCheckpoint. It simply maps an event timestamp
@@ -46,7 +46,7 @@ public class TmfCheckpoint implements ITmfCheckpoint {
      * Full constructor
      *
      * @param timestamp the checkpoint timestamp
-     * @param location the checkpoint location
+     * @param location the corresponding trace location
      * @since 2.0
      */
     public TmfCheckpoint(final ITmfTimestamp timestamp, final ITmfLocation location) {
@@ -71,8 +71,8 @@ public class TmfCheckpoint implements ITmfCheckpoint {
     // ITmfCheckpoint
     // ------------------------------------------------------------------------
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfCheckpoint#getTimestamp()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getTimestamp() {
index 3b0db1abdd38809f6a7f98232411c29dac753d42..027f88c518b482ce6943243ee5de84e85a49dfdd 100644 (file)
@@ -23,13 +23,13 @@ import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.linuxtools.internal.tmf.core.Messages;
 import org.eclipse.linuxtools.tmf.core.component.TmfDataProvider;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 
 /**
  * A simple indexer that manages the trace index as an array of trace
@@ -130,15 +130,8 @@ public class TmfCheckpointIndexer implements ITmfTraceIndexer {
     // ITmfTraceIndexer - buildIndex
     // ------------------------------------------------------------------------
 
-    /* (non-Javadoc)
-     *
-     * The index is a list of contexts that point to events at regular interval
-     * (rank-wise) in the trace. After it is built, the index can be used to
-     * quickly access any event by rank or timestamp (using seekIndex()).
-     *
-     * The index is built simply by reading the trace
-     *
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTraceIndexer#buildIndex(long, org.eclipse.linuxtools.tmf.core.event.TmfTimeRange, boolean)
+    /**
+     * @since 2.0
      */
     @Override
     public void buildIndex(final long offset, final TmfTimeRange range, final boolean waitForCompletion) {
@@ -234,8 +227,8 @@ public class TmfCheckpointIndexer implements ITmfTraceIndexer {
     // ITmfTraceIndexer - updateIndex
     // ------------------------------------------------------------------------
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTraceIndexer#updateIndex(org.eclipse.linuxtools.tmf.core.trace.ITmfContext, org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
+    /**
+     * @since 2.0
      */
     @Override
     public synchronized void updateIndex(final ITmfContext context, final ITmfTimestamp timestamp) {
@@ -253,8 +246,8 @@ public class TmfCheckpointIndexer implements ITmfTraceIndexer {
     // ITmfTraceIndexer - seekIndex
     // ------------------------------------------------------------------------
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTraceIndexer#seekIndex(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
+    /**
+     * @since 2.0
      */
     @Override
     public synchronized ITmfContext seekIndex(final ITmfTimestamp timestamp) {
index 296a77f97ea4afc8f83e477266c18574dd8a407d..275788f575f68995e157939cea908897919ea554 100644 (file)
@@ -22,9 +22,6 @@ import org.eclipse.linuxtools.internal.tmf.core.trace.TmfExperimentContext;
 import org.eclipse.linuxtools.internal.tmf.core.trace.TmfExperimentLocation;
 import org.eclipse.linuxtools.internal.tmf.core.trace.TmfLocationArray;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
@@ -32,6 +29,9 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfClearExperimentSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceRangeUpdatedSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 
 /**
  * TmfExperiment presents a time-ordered, unified view of a set of ITmfTrace:s
@@ -206,6 +206,7 @@ public class TmfExperiment extends TmfTrace implements ITmfEventParser {
      *
      * @param index the event index (rank)
      * @return the corresponding event timestamp
+     * @since 2.0
      */
     public ITmfTimestamp getTimestamp(final int index) {
         final ITmfContext context = seekEvent(index);
index 8c60870bb157413c99540a3ec40da1019c291be8..1d3c1fd6d10e73feb57cddb5d01bc684c0445e57 100644 (file)
@@ -13,7 +13,7 @@
 
 package org.eclipse.linuxtools.tmf.core.trace;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
  * A concrete implementation of TmfLocation based on ITmfTimestamp:s
index 4dd8ff33d668dd95c6ecf9d756fb6c6788c6eecf..555e72583f3fbd7c41159118cc83f1e4509077f4 100644 (file)
@@ -24,9 +24,6 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.linuxtools.tmf.core.component.TmfEventProvider;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
@@ -38,6 +35,9 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfTraceRangeUpdatedSignal;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
 import org.eclipse.linuxtools.tmf.core.statistics.ITmfStatistics;
 import org.eclipse.linuxtools.tmf.core.statistics.TmfStateStatistics;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 
 /**
  * Abstract implementation of ITmfTrace.
@@ -421,41 +421,35 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
     // ITmfTrace - Trace characteristics getters
     // ------------------------------------------------------------------------
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getNbEvents()
-     */
     @Override
     public synchronized long getNbEvents() {
         return fNbEvents;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getTimeRange()
+    /**
+     * @since 2.0
      */
     @Override
     public TmfTimeRange getTimeRange() {
         return new TmfTimeRange(fStartTime, fEndTime);
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getStartTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getStartTime() {
         return fStartTime;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getEndTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getEndTime() {
         return fEndTime;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getCurrentTime()
-     */
     /**
      * @since 2.0
      */
@@ -464,9 +458,6 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
         return fCurrentTime;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getCurrentRange()
-     */
     /**
      * @since 2.0
      */
@@ -475,10 +466,6 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
         return fCurrentRange;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getInitialRangeOffset()
-     */
     /**
      * @since 2.0
      */
@@ -515,6 +502,7 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
      * Update the trace events time range
      *
      * @param range the new time range
+     * @since 2.0
      */
     protected void setTimeRange(final TmfTimeRange range) {
         fStartTime = range.getStartTime();
@@ -525,6 +513,7 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
      * Update the trace chronologically first event timestamp
      *
      * @param startTime the new first event timestamp
+     * @since 2.0
      */
     protected void setStartTime(final ITmfTimestamp startTime) {
         fStartTime = startTime;
@@ -534,6 +523,7 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
      * Update the trace chronologically last event timestamp
      *
      * @param endTime the new last event timestamp
+     * @since 2.0
      */
     protected void setEndTime(final ITmfTimestamp endTime) {
         fEndTime = endTime;
@@ -570,9 +560,6 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
     // ITmfTrace - SeekEvent operations (returning a trace context)
     // ------------------------------------------------------------------------
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#seekEvent(long)
-     */
     @Override
     public synchronized ITmfContext seekEvent(final long rank) {
 
@@ -597,8 +584,8 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
         return context;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#seekEvent(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
+    /**
+     * @since 2.0
      */
     @Override
     public synchronized ITmfContext seekEvent(final ITmfTimestamp timestamp) {
@@ -637,9 +624,6 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
     // ITmfTrace - Read operations (returning an actual event)
     // ------------------------------------------------------------------------
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#readNextEvent(org.eclipse.linuxtools.tmf.core.trace.ITmfContext)
-     */
     @Override
     public synchronized ITmfEvent getNext(final ITmfContext context) {
         // parseEvent() does not update the context
@@ -668,6 +652,7 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
      *
      * @param context the current trace context
      * @param timestamp the corresponding timestamp
+     * @since 2.0
      */
     protected synchronized void updateAttributes(final ITmfContext context, final ITmfTimestamp timestamp) {
         if (fStartTime.equals(TmfTimestamp.BIG_BANG) || (fStartTime.compareTo(timestamp, false) > 0)) {
@@ -829,9 +814,6 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace {
     // toString
     // ------------------------------------------------------------------------
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
     @Override
     @SuppressWarnings("nls")
     public synchronized String toString() {
index cede55c9eb855d12bee4964b711a02f17cbdba4f..017c550e9f2fa7c61bee370b873ffcfa9daa4ffb 100644 (file)
@@ -1,31 +1,32 @@
 /**********************************************************************
  * Copyright (c) 2011 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.tmf.core.uml2sd;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
  * <p>
- * Interface for asynchronous sequence diagram events. 
+ * Interface for asynchronous sequence diagram events.
  * </p>
- * 
+ *
  * @version 1.0
  * @author Bernd Hufmann
  */
 public interface ITmfAsyncSequenceDiagramEvent extends ITmfSyncSequenceDiagramEvent {
     /**
      * Returns end timestamp of message (i.e. receive time)
-     * 
+     *
      * @return end timestamp of message (i.e. receive time)
+     * @since 2.0
      */
     public ITmfTimestamp getEndTime();
 }
index 20f595c235fe1532c0dab2107ee5fef2e688a9b6..b90eb7ace7d87cdc96eb7c3834ca62839bc965bc 100644 (file)
@@ -1,53 +1,54 @@
 /**********************************************************************
  * Copyright (c) 2011 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.tmf.core.uml2sd;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
  * <p>
- * Interface for synchronous sequence diagram events. 
+ * Interface for synchronous sequence diagram events.
  * </p>
- * 
+ *
  * @version 1.0
  * @author Bernd Hufmann
  */
 public interface ITmfSyncSequenceDiagramEvent {
-    
+
     /**
      * Returns Name of message.
-     * 
+     *
      * @return Name of message
      */
     public String getName();
-    
+
     /**
      * Returns name of sender of message.
-     * 
+     *
      * @return name of sender of message
      */
     public String getSender();
-    
+
     /**
      * Returns Name of receiver of message.
-     * 
+     *
      * @return Name of receiver of message
      */
     public String getReceiver();
 
     /**
      * Returns Start time of message (i.e. send time).
-     * 
+     *
      * @return Start timestamp of message (i.e. send time)
+     * @since 2.0
      */
     public ITmfTimestamp getStartTime();
 }
index 2b48bee3d62996b62c05bdbb5c3f1f3f73d0ed76..d8ba9ebdc988f60c0537c55641fbed18d53ef57b 100644 (file)
@@ -12,7 +12,7 @@
 package org.eclipse.linuxtools.tmf.core.uml2sd;
 
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
  * <p>
@@ -57,9 +57,8 @@ public class TmfAsyncSequenceDiagramEvent extends TmfSyncSequenceDiagramEvent im
     // Operations
     // ------------------------------------------------------------------------
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.uml2sd.ITmfAsyncSequenceDiagramEvent#getEndTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getEndTime() {
index bf1656353d1c190cc326d4839d02bbb909f23b84..dd084a8eef5bc7ad86906de592bdb1e33974b2fd 100644 (file)
@@ -12,7 +12,7 @@
 package org.eclipse.linuxtools.tmf.core.uml2sd;
 
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
  * <p>
@@ -103,9 +103,8 @@ public class TmfSyncSequenceDiagramEvent implements ITmfSyncSequenceDiagramEvent
         return fName;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.uml2sd.ITmfSyncSequenceDiagramEvent#getStartTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getStartTime() {
index 1719c359ebe04bb40ce5046112d1adb5d8124e4f..c826e144c0988b19f36646077eb1ec7f4656fa46 100644 (file)
@@ -28,7 +28,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.Messages;
 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfBaseColumnData;
 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfBaseColumnData.ITmfColumnPercentageProvider;
index 8ab457586ef71ddf0a7fa24fc70c97ef4f1339ce..6cf67e74a9f99a74d621c1f429e1170e07609a9d 100755 (executable)
@@ -30,7 +30,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.Messages;
 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfStatisticsTree;
 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfStatisticsTreeNode;
index 009a81e3fac2ff5ad062554710cad9d276a29aea..94b257fbe512669fc3d691e86b4891a18d6e6fd9 100755 (executable)
@@ -27,7 +27,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.Messages;
 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfStatisticsTree;
 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfStatisticsTreeNode;
index 9032afa9fda0af023ce4090fdda137f12fef1d3e..b2f88cc783bac40706e6c4d277511b4b884e39fb 100644 (file)
@@ -11,8 +11,8 @@
  *******************************************************************************/
 package org.eclipse.linuxtools.tmf.ui.tests.views.uml2sd.loader;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 
 /**
  *  Interface for testing signal handling within TmfUml2SD
index d675ffcc433212b2065e9606c8f78de23242dafd..b66c0df4f51279d4505283ece4de864e57c3c5c6 100644 (file)
@@ -20,8 +20,8 @@ import static org.junit.Assert.assertTrue;
 
 import java.util.List;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.Lifeline;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs.Criteria;
index 606e7d49d4e5979aea7f5a78ef8650d0b28e1f78..2ab02a61f378fe461f8363de8d3e47e4ecdce264 100644 (file)
@@ -17,9 +17,9 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
index 06ad8a1015596844604d54500c0ec49eeb961b39..ab6cfe34d06d902da82da25038e1d3945608a96d 100644 (file)
@@ -19,10 +19,10 @@ import static org.junit.Assert.assertTrue;
 
 import java.util.List;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.loader.TmfSyncMessage;
 import org.junit.AfterClass;
index dd83c3b66e61550376bc60ff976f5248d8c16b3f..99de4debc50457e0f182b376a85eddf900aa0625 100644 (file)
 package org.eclipse.linuxtools.tmf.ui.tests.views.uml2sd.loader;
 
 import org.eclipse.linuxtools.tmf.core.component.TmfComponent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.signal.TmfEndSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfStartSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 
 /**
  *  Class to implement that certain signals are sent as well as are sent with correct content.
index 4f82fabeecd84a0d0c98a7d74ae0bc8ba792256e..36593616bc7ea044f0c18773a52d65de78677a0c 100644 (file)
@@ -11,7 +11,7 @@
  *******************************************************************************/
 package org.eclipse.linuxtools.tmf.ui.tests.views.uml2sd.loader;
 
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 
 /**
  * Timestamp implementation for UML2SD test cases.
index 69506361718b0c08f25da3b8669292b7c617bd5e..50a9bde4a058f0c2e0d3c9617a2e1c78a14fbd7f 100644 (file)
@@ -8,7 +8,7 @@ import org.eclipse.jface.action.Action;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessageReturn;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BasicExecutionOccurrence;
index 135b010ce106130ce0d202963bc206a05c151b7d..4694c6c64dcdf5164e00661a75afe2456a6147d9 100644 (file)
@@ -20,7 +20,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfEventParser;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
index 2db21759d7bc4ccb84d88ac0b529a63e834dc8c6..8d4cd2c894d2ad158bc65c93ee72c258ddb0ec29 100644 (file)
@@ -22,11 +22,11 @@ import java.util.Map;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTraceDefinition.OutputColumn;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEventType;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 /**
index af367f2df8490c8d9cf0de7eae22623abcee1031..2b53f6d980a088c5e21e567df7dbb126f23df2fd 100644 (file)
@@ -16,7 +16,7 @@ import java.text.SimpleDateFormat;
 import java.util.List;
 
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 
 /**
  * Base class for custom trace definitions.
index aad30175d6308fed82d85deb1dc1f95b371f4ac7..b3bfc420ed01164f0f26d71bac7145fb01ffdb47 100644 (file)
@@ -17,9 +17,9 @@ import java.util.regex.Matcher;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition.InputData;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition.InputLine;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 /**
index fbe1ea0358837bb4eea7ecacad031b1fdd0d0a43..20b9709d140168f187168581d188f55d359fbdd9 100644 (file)
@@ -25,9 +25,9 @@ import org.eclipse.core.resources.IResource;
 import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition.InputLine;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.io.BufferedRandomAccessFile;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfEventParser;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
index 92db1b52870ada230cc11ee3e9d55dfa897749b6..4be0878e6624429c666455e3ae6f3dc5829a571a 100644 (file)
@@ -13,9 +13,9 @@
 package org.eclipse.linuxtools.internal.tmf.ui.parsers.custom;
 
 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 /**
index 6ad7f43a240d4b22f4f6dbbdde9be38ad41a5238..395651737bd503877c590b04da0a7dabf6bebab5 100644 (file)
@@ -26,9 +26,9 @@ import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTraceDefinition.InputAttribute;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTraceDefinition.InputElement;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.io.BufferedRandomAccessFile;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfEventParser;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
index 66560894deb62ca4803792cb1faed5b8816834b4..355bab51d5fffa6ec372074b328a7a35b712d23f 100644 (file)
@@ -26,8 +26,8 @@ import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomEventsTable;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTraceDefinition.OutputColumn;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTrace;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.custom.ScrolledComposite;
index 5d6bc8739ceb7fe7cf8b5d7544700e0ac66f7646..027ec88718258dd390207b3b3ee4fa1be445e463 100644 (file)
@@ -27,8 +27,8 @@ import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTraceDefiniti
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTraceDefinition.OutputColumn;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTrace;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTraceDefinition;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.custom.ScrolledComposite;
index c4371cc3d3b094f738736fe4c31dca8164fad746..80e34544218cd7e966dece34198e4b31effa7b80 100644 (file)
@@ -14,7 +14,7 @@ package org.eclipse.linuxtools.tmf.ui.properties;
 
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.linuxtools.internal.tmf.ui.Activator;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestampFormat;
 
 /**
  * TMF Time format preferences
index 5a41b218b2ab476ade1f318eee2d5d2f63a2508b..8056474a05314c42ab4dfc3b44e14d216e3288fb 100644 (file)
@@ -17,7 +17,7 @@ import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.jface.preference.RadioGroupFieldEditor;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestampFormat;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
index 67149abf7220fb0f03b017a8873a1a6d82758014..6ee25c6ee091bac32e0545689607a278f6c73aa6 100644 (file)
@@ -72,9 +72,7 @@ import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfCallsite;
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.filter.ITmfFilter;
 import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterAndNode;
@@ -87,6 +85,8 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfEventSearchAppliedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
index 1739078b127ff24c004c277b6f20f9b5c07221bb..8b9491d0d4274bdfa8607e294582698de9ccdaf9 100644 (file)
@@ -21,14 +21,14 @@ import org.eclipse.jface.viewers.TreeViewerColumn;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.linuxtools.tmf.core.component.TmfComponent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfStatsUpdatedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceRangeUpdatedSignal;
 import org.eclipse.linuxtools.tmf.core.statistics.ITmfStatistics;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
 import org.eclipse.linuxtools.tmf.ui.viewers.TmfViewer;
index 7b2ff4c8cd1969a41ff92b147e72064ab0d12550..bb6d68a0672bb5d7209993d9dfb0eddf1b33c6ac 100644 (file)
 
 package org.eclipse.linuxtools.tmf.ui.views.histogram;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTimestampFormatUpdateSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestampFormat;
 import org.eclipse.linuxtools.tmf.ui.views.TmfView;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ControlEvent;
index b9043e99f1a7dfa8eee447f74eab266a63378427..d12e448bfb5cd83d26edacad4583c62ce3d84046 100644 (file)
@@ -16,13 +16,13 @@ package org.eclipse.linuxtools.tmf.ui.views.histogram;
 
 import java.text.ParseException;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTimestampFormatUpdateSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestampFormat;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.swt.widgets.Composite;
 
index 7930df748844b7c02220f9a0e8bc306cd9d19dc8..b74ffc79d636e4a1e90da0388a9e0dda898b2dd4 100644 (file)
 package org.eclipse.linuxtools.tmf.ui.views.histogram;
 
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 /**
@@ -59,6 +59,7 @@ public class HistogramRequest extends TmfEventRequest {
      *            The number of events per block
      * @param execType
      *            The requested execution priority
+     * @since 2.0
      *
      */
     public HistogramRequest(HistogramDataModel histogram, TmfTimeRange range,
index fb7b4546ebc6716e7010cbca6a08b9dc8465f4c2..272cb68d5c4360904ccdc043f5dc2295b49bed18 100644 (file)
@@ -16,12 +16,12 @@ package org.eclipse.linuxtools.tmf.ui.views.histogram;
 
 import java.text.ParseException;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTimestampFormatUpdateSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestampFormat;
 import org.eclipse.swt.widgets.Composite;
 
 /**
index 2f7f0cb242909f76bf8d8e53fa16b1193846528f..ed21b268a33cbead50d6a4116c6608d06c8a6ff7 100644 (file)
@@ -18,9 +18,6 @@
 package org.eclipse.linuxtools.tmf.ui.views.histogram;
 
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
@@ -32,6 +29,9 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceRangeUpdatedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.ui.editors.ITmfTraceEditor;
 import org.eclipse.linuxtools.tmf.ui.views.TmfView;
@@ -277,6 +277,7 @@ public class HistogramView extends TmfView {
      * Returns the time range of the current selected window (base on default time scale).
      *
      * @return the time range of current selected window.
+     * @since 2.0
      */
     public TmfTimeRange getTimeRange() {
         return new TmfTimeRange(
index 5ca3a0a93b70fabf3e20c0253aa26dde233ff3c9..daac4e02010c4c7a86277eedf2013cb70c174fc9 100644 (file)
@@ -25,9 +25,6 @@ import org.eclipse.core.resources.IResourceChangeListener;
 import org.eclipse.core.resources.IResourceDelta;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.signal.TmfEventFilterAppliedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfEventSearchAppliedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
@@ -37,6 +34,9 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.ui.editors.ITmfTraceEditor;
index 5deaee658a503c8a74ed52dc9e49bca1c0b5c738..3c6a94635bf6e269ba488af62ce8fd2ba8c320cb 100755 (executable)
@@ -13,8 +13,8 @@
  **********************************************************************/
 package org.eclipse.linuxtools.tmf.ui.views.uml2sd;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.PaintEvent;
@@ -213,6 +213,7 @@ public class DrawableToolTip implements PaintListener {
      * @param value the current in the scale
      * @param min the scale min
      * @param max the scale max
+     * @since 2.0
      */
     public void showToolTip(ITmfTimestamp value, ITmfTimestamp min, ITmfTimestamp max) {
         fMinMaxRange = new TmfTimeRange(min, max);
index 0f42b8640e31d67bb65b5d46f68bd2acf6ed7167..c15bcba226d0cd5bd36d483c46f015d007d9b281 100755 (executable)
@@ -26,7 +26,7 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BasicExecutionOccurrence;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.Frame;
index 26e14712df20a7bd32ffd5bd6b9c0a3195de764f..bff209a558b12aad6e970d58c9a52f9b3cd724ed 100755 (executable)
@@ -19,8 +19,8 @@ import java.util.Arrays;
 import java.util.List;
 
 import org.eclipse.linuxtools.internal.tmf.ui.Activator;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessage;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessageReturn;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage;
index bb3b6c803be9df5c0014aeb2346283ef7b555966..52047a78caeb44ec1f9b2aa10aec56a1fb4d22ea 100755 (executable)
@@ -13,8 +13,8 @@ package org.eclipse.linuxtools.tmf.ui.views.uml2sd.core;
 
 import java.util.Comparator;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.ISDPreferences;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.SDViewPref;
@@ -48,6 +48,7 @@ import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SortAsyncMessageComparato
  * @see Lifeline Lifeline for more event occurence details
  * @version 1.0
  * @author sveyrier
+ * @since 2.0
  */
 public class AsyncMessage extends BaseMessage implements ITimeRange {
 
@@ -399,6 +400,7 @@ public class AsyncMessage extends BaseMessage implements ITimeRange {
      * Set the time when the message end
      *
      * @param time the time when the message end
+     * @since 2.0
      */
     public void setEndTime(ITmfTimestamp time) {
         fEndTime = time;
@@ -414,6 +416,7 @@ public class AsyncMessage extends BaseMessage implements ITimeRange {
      * Set the time when the message start
      *
      * @param time the time when the message start
+     * @since 2.0
      */
     public void setStartTime(ITmfTimestamp time) {
         fStartTime = time;
@@ -425,28 +428,22 @@ public class AsyncMessage extends BaseMessage implements ITimeRange {
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.ITimeRange#getEndTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getEndTime() {
         return fEndTime;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.ITimeRange#getStartTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getStartTime() {
         return fStartTime;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.ITimeRange#hasTimeInfo()
-     */
     @Override
     public boolean hasTimeInfo() {
         return fHasTime;
index 5fcd27c5e786bb03907e2bfaedac583e270d7f8b..00356c8f303aaaf320c1ceaed77d2bf00d0b0916 100755 (executable)
@@ -17,8 +17,8 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.ISDPreferences;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.SDViewPref;
@@ -392,6 +392,7 @@ public class BasicFrame extends GraphNode {
      * Return the minimum time stored in the frame taking all GraphNodes into account
      *
      * @return the minimum GraphNode time
+     * @since 2.0
      */
     public ITmfTimestamp getMinTime() {
         if (fLastExternalTimePref != SDViewPref.getInstance().excludeExternalTime()) {
@@ -410,6 +411,7 @@ public class BasicFrame extends GraphNode {
      *
      * @param min
      *            The minimum timestamp
+     * @since 2.0
      */
     public void setMin(ITmfTimestamp min) {
         fMinTime = min;
@@ -421,6 +423,7 @@ public class BasicFrame extends GraphNode {
      *
      * @param max
      *            The maximum timestamp
+     * @since 2.0
      */
     public void setMax(ITmfTimestamp max) {
         fMaxTime = max;
@@ -439,6 +442,7 @@ public class BasicFrame extends GraphNode {
      * Return the maximum time stored in the frame taking all GraphNodes into account
      *
      * @return the maximum GraphNode time
+     * @since 2.0
      */
     public ITmfTimestamp getMaxTime() {
         if (fLastExternalTimePref != SDViewPref.getInstance().excludeExternalTime()) {
@@ -483,6 +487,7 @@ public class BasicFrame extends GraphNode {
      * Returns the minimum time between consecutive messages.
      *
      * @return the minimum time between consecutive messages
+     * @since 2.0
      */
     public ITmfTimestamp getSDMinTime() {
         computeMaxMinTime();
@@ -493,6 +498,7 @@ public class BasicFrame extends GraphNode {
      * Returns the maximum time between consecutive messages.
      *
      * @return the maximum time between consecutive messages
+     * @since 2.0
      */
     public ITmfTimestamp getSDMaxTime() {
         computeMaxMinTime();
index 012b0c87616c0c7b8328d29852eb3251b25f6301..57b1026fa18e58577148fd7fdbb9af16159082a5 100755 (executable)
@@ -13,7 +13,7 @@
  **********************************************************************/
 package org.eclipse.linuxtools.tmf.ui.views.uml2sd.core;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IImage;
@@ -131,6 +131,7 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
      * Set the time when the execution occurrence starts.
      *
      * @param time the time when the execution occurrence starts
+     * @since 2.0
      */
     public void setStartTime(ITmfTimestamp time) {
         fStartTime = time;
@@ -144,6 +145,7 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
      * Set the time when the execution occurrence ends.
      *
      * @param time the time when the execution occurrence ends
+     * @since 2.0
      */
     public void setEndTime(ITmfTimestamp time) {
         fEndTime = time;
@@ -153,18 +155,16 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.ITimeRange#getStartTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getStartTime() {
         return fStartTime;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.ITimeRange#getEndTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getEndTime() {
index 170f976d470b1aed8ce8e26f09f23c45c8b62b2c..b70034059c56faa07876f44ed53a3789a726affb 100755 (executable)
@@ -18,7 +18,7 @@ import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.SDViewPref;
@@ -551,6 +551,7 @@ public class Frame extends BasicFrame {
      * @param dateToFind date to be found
      * @param bounds a two items array that will receive bounds if found
      * @return true if both bounds not null
+     * @since 2.0
      */
     public boolean findDateBounds(ITmfTimestamp dateToFind, ITimeRange bounds[]) {
         if (hasTimeInfo()) {
index 4d1b4914042585f7563705c93d54a1b62a8a3cfc..d655e5e54e649da198332475fa6f5ec18b3ab164 100755 (executable)
@@ -1,46 +1,48 @@
 /**********************************************************************
  * Copyright (c) 2005, 2006 IBM Corporation and others.
  * Copyright (c) 2011, 2012 Ericsson.
- * 
+ *
  * All rights reserved.   This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
+ *
+ * Contributors:
  * IBM - Initial API and implementation
  * Bernd Hufmann - Updated for TMF
  **********************************************************************/
 package org.eclipse.linuxtools.tmf.ui.views.uml2sd.core;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
  * A interface for handling time ranges.
- * 
+ *
  * @version 1.0
  * @author sveyrier
- * 
+ *
  */
 public interface ITimeRange {
 
     /**
      * Returns the time when the message began.
      * @return the time when the message began
+     * @since 2.0
      */
     public ITmfTimestamp getStartTime();
 
     /**
      * Returns the time when the message ended.
-     * 
+     *
      * @return the time when the message ended
+     * @since 2.0
      */
     public ITmfTimestamp getEndTime();
 
     /**
      * Returns flag to indicate whether time information is available or not.
-     * 
-     * @return flag to indicate whether time information is available or not  
+     *
+     * @return flag to indicate whether time information is available or not
      */
     public boolean hasTimeInfo();
 }
index 4ddf4b60d6a5f71b9d0d1c23e34ebe4cc008454a..83b103090e0c92eda05bc1b1ecbdb534ba10b0a4 100755 (executable)
@@ -1,26 +1,26 @@
 /**********************************************************************
  * Copyright (c) 2005, 2006 IBM Corporation and others.
  * Copyright (c) 2011, 2012 Ericsson.
- * 
+ *
  * All rights reserved.   This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
+ *
+ * Contributors:
  * IBM - Initial API and implementation
  * Bernd Hufmann - Updated for TMF
  **********************************************************************/
 package org.eclipse.linuxtools.tmf.ui.views.uml2sd.core;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 
 /**
- * Class implementation of a sequence diagram time event. 
- * 
+ * Class implementation of a sequence diagram time event.
+ *
  * @version 1.0
  * @author sveyrier
- * 
+ *
  */
 public class SDTimeEvent {
 
@@ -46,10 +46,11 @@ public class SDTimeEvent {
     // ------------------------------------------------------------------------
     /**
      * The default constructor.
-     * 
+     *
      * @param time The time stamp of the event.
      * @param event The event index.
      * @param node The time range implementing node.
+     * @since 2.0
      */
     public SDTimeEvent(ITmfTimestamp time, int event, ITimeRange node) {
         fTimestamp = time;
@@ -62,8 +63,9 @@ public class SDTimeEvent {
     // ------------------------------------------------------------------------
     /**
      * Returns the timestamp of the event.
-     * 
+     *
      * @return the timestamp of the event.
+     * @since 2.0
      */
     public ITmfTimestamp getTime() {
         return fTimestamp;
@@ -71,7 +73,7 @@ public class SDTimeEvent {
 
     /**
      * Returns the event index.
-     * 
+     *
      * @return the event index.
      */
     public int getEvent() {
@@ -80,7 +82,7 @@ public class SDTimeEvent {
 
     /**
      * Returns the time range implementing node.
-     * 
+     *
      * @return the time range implementing node.
      */
     public ITimeRange getGraphNode() {
index 3016cb18326bf6985190c831bbb731b0e55cfa37..6df1fa22289858f891e033e11c3aef69392ef607 100755 (executable)
@@ -15,8 +15,8 @@ package org.eclipse.linuxtools.tmf.ui.views.uml2sd.core;
 
 import java.util.Comparator;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.ISDPreferences;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.SDViewPref;
@@ -209,6 +209,7 @@ public class SyncMessage extends BaseMessage implements ITimeRange {
      * Set the time when the message occurs
      *
      * @param time the time when the message occurs
+     * @since 2.0
      */
     public void setTime(ITmfTimestamp time) {
         fEventTime = time;
@@ -220,18 +221,16 @@ public class SyncMessage extends BaseMessage implements ITimeRange {
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.ITimeRange#getEndTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getEndTime() {
         return fEventTime;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.ITimeRange#getStartTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getStartTime() {
index 1b76441a16348e7ac85c40ed3d7d2ca9ee6d5b17..ff5bb8c4c430f4d1695950d08846e16c1ca4fc6d 100755 (executable)
@@ -16,7 +16,7 @@ package org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
 import org.eclipse.swt.SWT;
index d68710f43f41b8598d480ac967610c32a55575bb..40c12bc44536afeac6993e1f1f93790a8c35ec3e 100644 (file)
@@ -28,9 +28,6 @@ import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.component.TmfComponent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
@@ -41,6 +38,9 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.core.uml2sd.ITmfSyncSequenceDiagramEvent;
 import org.eclipse.linuxtools.tmf.core.uml2sd.TmfSyncSequenceDiagramEvent;
@@ -223,10 +223,12 @@ public class TmfUml2SDSyncLoader extends TmfComponent implements IUml2SDLoader,
     // ------------------------------------------------------------------------
     // Operations
     // ------------------------------------------------------------------------
+
     /**
      * Returns the current time if available else null.
      *
      * @return the current time if available else null
+     * @since 2.0
      */
     public ITmfTimestamp getCurrentTime() {
         fLock.lock();
@@ -1170,6 +1172,7 @@ public class TmfUml2SDSyncLoader extends TmfComponent implements IUml2SDLoader,
      *
      * @param time The timestamp
      * @return page that contains the time
+     * @since 2.0
      */
     protected int getPage(ITmfTimestamp time) {
         int page;
@@ -1227,6 +1230,7 @@ public class TmfUml2SDSyncLoader extends TmfComponent implements IUml2SDLoader,
      *
      * @param startTime The start time of time range.
      * @return the time range
+     * @since 2.0
      */
     protected TmfTimeRange getSignalTimeRange(ITmfTimestamp startTime) {
         fLock.lock();
@@ -1299,6 +1303,7 @@ public class TmfUml2SDSyncLoader extends TmfComponent implements IUml2SDLoader,
          *
          * @param findCriteria The search criteria
          * @param window Time range to search in
+         * @since 2.0
          */
         public SearchJob(Criteria findCriteria, TmfTimeRange window) {
             super(Messages.TmfUml2SDSyncLoader_SearchJobDescrition);
@@ -1487,6 +1492,7 @@ public class TmfUml2SDSyncLoader extends TmfComponent implements IUml2SDLoader,
          * Returns timestamp of found time.
          *
          * @return timestamp of found time.
+         * @since 2.0
          */
         public ITmfTimestamp getFoundTime() {
             return fFoundTime;
This page took 0.109029 seconds and 5 git commands to generate.