From: Alexandre Montplaisir Date: Thu, 12 Mar 2015 22:30:58 +0000 (-0400) Subject: tmf: Rename time range signals X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=97c710242f63fc2d5eac80b942a370b48e3ccbdb;hp=887cb87948356afb280778322483e2245df44a17;p=deliverable%2Ftracecompass.git tmf: Rename time range signals The meanings of TmfTimeSynchSignal and TmfRangeSynchSignal have changed since those classes were first introduced. "TimeSynch" also refers to a time range now. Rename those two signals to better reflect their contemporary meanings: TmfTimeSynchSignal -> TmfSelectionRangeUpdatedSignal TmfRangeSynchSignal -> TmfWindowRangeUpdatedSignal Change-Id: I05b2c9b8c6aaf30a07188c4695e117832aabb4b1 Signed-off-by: Alexandre Montplaisir Reviewed-on: https://git.eclipse.org/r/43761 Reviewed-by: Hudson CI Reviewed-by: Bernd Hufmann Tested-by: Bernd Hufmann --- diff --git a/doc/org.eclipse.tracecompass.doc.dev/doc/Developer-Guide.mediawiki b/doc/org.eclipse.tracecompass.doc.dev/doc/Developer-Guide.mediawiki index c7b53dff4a..ef4a9b4a40 100644 --- a/doc/org.eclipse.tracecompass.doc.dev/doc/Developer-Guide.mediawiki +++ b/doc/org.eclipse.tracecompass.doc.dev/doc/Developer-Guide.mediawiki @@ -861,7 +861,7 @@ Sent by TmfCheckpointIndexer when new events have been indexed and the number of Received by components that need to be notified of a new trace event count. -=== TmfTimeSynchSignal === +=== TmfSelectionRangeUpdatedSignal === ''Purpose'' @@ -877,7 +877,7 @@ Sent by any component that allows the user to select a time or time range. Received by any component that needs to be notified of the currently selected time or time range. -=== TmfRangeSynchSignal === +=== TmfWindowRangeUpdatedSignal === ''Purpose'' diff --git a/org.eclipse.tracecompass.gdbtrace.ui/src/org/eclipse/tracecompass/internal/gdbtrace/ui/views/events/GdbEventsTable.java b/org.eclipse.tracecompass.gdbtrace.ui/src/org/eclipse/tracecompass/internal/gdbtrace/ui/views/events/GdbEventsTable.java index 7b2f197ee3..588fd48bf3 100644 --- a/org.eclipse.tracecompass.gdbtrace.ui/src/org/eclipse/tracecompass/internal/gdbtrace/ui/views/events/GdbEventsTable.java +++ b/org.eclipse.tracecompass.gdbtrace.ui/src/org/eclipse/tracecompass/internal/gdbtrace/ui/views/events/GdbEventsTable.java @@ -28,7 +28,7 @@ import org.eclipse.tracecompass.internal.gdbtrace.core.event.GdbTraceEventConten import org.eclipse.tracecompass.internal.gdbtrace.core.trace.GdbEventAspects; import org.eclipse.tracecompass.internal.gdbtrace.core.trace.GdbTrace; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceUpdatedSignal; import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; import org.eclipse.tracecompass.tmf.core.trace.experiment.TmfExperiment; @@ -107,7 +107,7 @@ public class GdbEventsTable extends TmfEventsTable { @Override @TmfSignalHandler - public void currentTimeUpdated(final TmfTimeSynchSignal signal) { + public void selectionRangeUpdated(final TmfSelectionRangeUpdatedSignal signal) { // do not synchronize on time } diff --git a/org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/kernel/ui/swtbot/tests/ImportAndReadKernelSmokeTest.java b/org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/kernel/ui/swtbot/tests/ImportAndReadKernelSmokeTest.java index e7c29290e7..7650be9c91 100644 --- a/org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/kernel/ui/swtbot/tests/ImportAndReadKernelSmokeTest.java +++ b/org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/kernel/ui/swtbot/tests/ImportAndReadKernelSmokeTest.java @@ -36,7 +36,7 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton; import org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow.ControlFlowView; import org.eclipse.tracecompass.analysis.os.linux.ui.views.resources.ResourcesView; import org.eclipse.tracecompass.tmf.core.event.ITmfEvent; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.trace.ITmfContext; import org.eclipse.tracecompass.tmf.ctf.core.event.CtfTmfEvent; import org.eclipse.tracecompass.tmf.ctf.core.tests.shared.CtfTmfTestTrace; @@ -179,18 +179,18 @@ public class ImportAndReadKernelSmokeTest { } } HistogramView hv = (HistogramView) vp; - final TmfTimeSynchSignal signal = new TmfTimeSynchSignal(hv, fDesired1.getTimestamp()); - final TmfTimeSynchSignal signal2 = new TmfTimeSynchSignal(hv, fDesired2.getTimestamp()); + final TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(hv, fDesired1.getTimestamp()); + final TmfSelectionRangeUpdatedSignal signal2 = new TmfSelectionRangeUpdatedSignal(hv, fDesired2.getTimestamp()); hv.updateTimeRange(100000); SWTBotUtils.waitForJobs(); - hv.currentTimeUpdated(signal); + hv.selectionRangeUpdated(signal); hv.broadcast(signal); SWTBotUtils.waitForJobs(); SWTBotUtils.delay(1000); hv.updateTimeRange(1000000000); SWTBotUtils.waitForJobs(); - hv.currentTimeUpdated(signal2); + hv.selectionRangeUpdated(signal2); hv.broadcast(signal2); SWTBotUtils.waitForJobs(); SWTBotUtils.delay(1000); diff --git a/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfRangeSynchSignal.java b/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfRangeSynchSignal.java deleted file mode 100644 index 2d60d4b04f..0000000000 --- a/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfRangeSynchSignal.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2014 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 - * Patrick Tasse - Deprecate current time - *******************************************************************************/ - -package org.eclipse.tracecompass.tmf.core.signal; - -import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; - -/** - * A new time range has been selected. - * - * This is the visible (zoom) time range. To synchronize on the selection range, - * use {@link TmfTimeSynchSignal}. - * - * @author Francois Chouinard - */ -public class TmfRangeSynchSignal extends TmfSignal { - - private final TmfTimeRange fCurrentRange; - - /** - * Constructor - * - * @param source - * Object sending this signal - * @param range - * The new time range - */ - public TmfRangeSynchSignal(Object source, TmfTimeRange range) { - super(source); - fCurrentRange = range; - } - - /** - * @return This signal's time range - */ - public TmfTimeRange getCurrentRange() { - return fCurrentRange; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("TmfRangeSynchSignal [source="); //$NON-NLS-1$ - - if (getSource() != null) { - sb.append(getSource().toString()); - } else { - sb.append("null"); //$NON-NLS-1$ - } - - sb.append(", range="); //$NON-NLS-1$ - - if (fCurrentRange != null) { - sb.append(fCurrentRange.toString()); - } else { - sb.append("null"); //$NON-NLS-1$ - } - sb.append(']'); - return sb.toString(); - } -} diff --git a/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfSelectionRangeUpdatedSignal.java b/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfSelectionRangeUpdatedSignal.java new file mode 100644 index 0000000000..5e1ccb2f3a --- /dev/null +++ b/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfSelectionRangeUpdatedSignal.java @@ -0,0 +1,99 @@ +/******************************************************************************* + * Copyright (c) 2009, 2014 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 + * Patrick Tasse - Support selection range + *******************************************************************************/ + +package org.eclipse.tracecompass.tmf.core.signal; + +import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; + +/** + * A new time range selection has been made. + * + * This is the selected time or time range. A single-timestamp selection is + * represented by a range where the start time is equal to the end time. + * + * To update the visible (zoom) range instead, use + * {@link TmfWindowRangeUpdatedSignal}. + * + * @author Francois Chouinard + * @since 1.0 + */ +@NonNullByDefault +public class TmfSelectionRangeUpdatedSignal extends TmfSignal { + + private final ITmfTimestamp fBeginTime; + private final ITmfTimestamp fEndTime; + + /** + * Constructor for a single timestamp selection (start and end times will be + * the same). + * + * @param source + * Object sending this signal + * @param ts + * Timestamp of selection + */ + public TmfSelectionRangeUpdatedSignal(@Nullable Object source, ITmfTimestamp ts) { + super(source); + fBeginTime = ts; + fEndTime = ts; + } + + /** + * Constructor for a time range selection. + * + * @param source + * Object sending this signal + * @param begin + * Timestamp of begin of selection range + * @param end + * Timestamp of end of selection range + */ + public TmfSelectionRangeUpdatedSignal(@Nullable Object source, ITmfTimestamp begin, ITmfTimestamp end) { + super(source); + fBeginTime = begin; + fEndTime = end; + } + + /** + * @return The begin timestamp of selection + */ + public ITmfTimestamp getBeginTime() { + return fBeginTime; + } + + /** + * @return The end timestamp of selection + */ + public ITmfTimestamp getEndTime() { + return fEndTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); //$NON-NLS-1$ + sb.append(fBeginTime.toString()); + if (!fBeginTime.equals(fEndTime)) { + sb.append('-'); + sb.append(fEndTime.toString()); + } + sb.append("]"); //$NON-NLS-1$ + return checkNotNull(sb.toString()); + } + +} diff --git a/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfTimeSynchSignal.java b/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfTimeSynchSignal.java deleted file mode 100644 index 161b74d0b8..0000000000 --- a/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfTimeSynchSignal.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2014 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 - * Patrick Tasse - Support selection range - *******************************************************************************/ - -package org.eclipse.tracecompass.tmf.core.signal; - -import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull; - -import org.eclipse.jdt.annotation.NonNullByDefault; -import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; - -/** - * A new time or time range selection has been made. - * - * This is the selected time or time range. To synchronize on the visible - * (zoom) range, use {@link TmfRangeSynchSignal}. - * - * @author Francois Chouinard -*/ -@NonNullByDefault -public class TmfTimeSynchSignal extends TmfSignal { - - private final ITmfTimestamp fBeginTime; - private final ITmfTimestamp fEndTime; - - /** - * Constructor - * - * @param source - * Object sending this signal - * @param ts - * Timestamp of selection - */ - public TmfTimeSynchSignal(@Nullable Object source, ITmfTimestamp ts) { - super(source); - fBeginTime = ts; - fEndTime = ts; - } - - /** - * Constructor - * - * @param source - * Object sending this signal - * @param begin - * Timestamp of begin of selection range - * @param end - * Timestamp of end of selection range - */ - public TmfTimeSynchSignal(@Nullable Object source, ITmfTimestamp begin, ITmfTimestamp end) { - super(source); - fBeginTime = begin; - fEndTime = end; - } - - /** - * @return The begin timestamp of selection - */ - public ITmfTimestamp getBeginTime() { - return fBeginTime; - } - - /** - * @return The end timestamp of selection - */ - public ITmfTimestamp getEndTime() { - return fEndTime; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("[TmfTimeSynchSignal ("); //$NON-NLS-1$ - sb.append(fBeginTime.toString()); - if (!fBeginTime.equals(fEndTime)) { - sb.append('-'); - sb.append(fEndTime.toString()); - } - sb.append(")]"); //$NON-NLS-1$ - return checkNotNull(sb.toString()); - } - -} diff --git a/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfWindowRangeUpdatedSignal.java b/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfWindowRangeUpdatedSignal.java new file mode 100644 index 0000000000..996ecb9f1e --- /dev/null +++ b/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfWindowRangeUpdatedSignal.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2009, 2014 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 + * Patrick Tasse - Deprecate current time + *******************************************************************************/ + +package org.eclipse.tracecompass.tmf.core.signal; + +import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; + +/** + * A new range has been selected for the visible (zoom) time range. + * + * To update the selection range instead, use + * {@link TmfSelectionRangeUpdatedSignal}. + * + * @author Francois Chouinard + * @since 1.0 + */ +public class TmfWindowRangeUpdatedSignal extends TmfSignal { + + private final TmfTimeRange fCurrentRange; + + /** + * Constructor + * + * @param source + * Object sending this signal + * @param range + * The new time range + */ + public TmfWindowRangeUpdatedSignal(Object source, TmfTimeRange range) { + super(source); + fCurrentRange = range; + } + + /** + * @return This signal's time range + */ + public TmfTimeRange getCurrentRange() { + return fCurrentRange; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(getClass().getSimpleName() + " [source="); //$NON-NLS-1$ + + if (getSource() != null) { + sb.append(getSource().toString()); + } else { + sb.append("null"); //$NON-NLS-1$ + } + + sb.append(", range="); //$NON-NLS-1$ + + if (fCurrentRange != null) { + sb.append(fCurrentRange.toString()); + } else { + sb.append("null"); //$NON-NLS-1$ + } + sb.append(']'); + return sb.toString(); + } +} diff --git a/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/trace/TmfTraceManager.java b/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/trace/TmfTraceManager.java index c96f8c77a7..474a0cd32d 100644 --- a/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/trace/TmfTraceManager.java +++ b/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/trace/TmfTraceManager.java @@ -38,10 +38,10 @@ import org.eclipse.tracecompass.common.core.NonNullUtils; import org.eclipse.tracecompass.internal.tmf.core.Activator; import org.eclipse.tracecompass.tmf.core.TmfCommonConstants; import org.eclipse.tracecompass.tmf.core.signal.TmfEventFilterAppliedSignal; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal; @@ -350,16 +350,17 @@ public final class TmfTraceManager { } /** - * Signal handler for the TmfTimeSynchSignal signal. + * Signal handler for the selection range signal. * * The current time of *all* traces whose range contains the requested new * selection time range will be updated. * * @param signal * The incoming signal + * @since 1.0 */ @TmfSignalHandler - public synchronized void timeUpdated(final TmfTimeSynchSignal signal) { + public synchronized void selectionRangeUpdated(final TmfSelectionRangeUpdatedSignal signal) { final ITmfTimestamp beginTs = signal.getBeginTime(); final ITmfTimestamp endTs = signal.getEndTime(); @@ -383,16 +384,17 @@ public final class TmfTraceManager { } /** - * Signal handler for the TmfRangeSynchSignal signal. + * Signal handler for the window range signal. * * The current window time range of *all* valid traces will be updated to * the new requested times. * * @param signal * The incoming signal + * @since 1.0 */ @TmfSignalHandler - public synchronized void timeRangeUpdated(final TmfRangeSynchSignal signal) { + public synchronized void windowRangeUpdated(final TmfWindowRangeUpdatedSignal signal) { for (Map.Entry entry : fTraces.entrySet()) { final ITmfTrace trace = entry.getKey(); final TmfTraceContext prevCtx = checkNotNull(entry.getValue()); diff --git a/org.eclipse.tracecompass.tmf.ctf.core.tests/src/org/eclipse/tracecompass/tmf/ctf/core/tests/temp/request/TmfSchedulerTest.java b/org.eclipse.tracecompass.tmf.ctf.core.tests/src/org/eclipse/tracecompass/tmf/ctf/core/tests/temp/request/TmfSchedulerTest.java index a55b043854..386c48c6dd 100644 --- a/org.eclipse.tracecompass.tmf.ctf.core.tests/src/org/eclipse/tracecompass/tmf/ctf/core/tests/temp/request/TmfSchedulerTest.java +++ b/org.eclipse.tracecompass.tmf.ctf.core.tests/src/org/eclipse/tracecompass/tmf/ctf/core/tests/temp/request/TmfSchedulerTest.java @@ -27,7 +27,7 @@ import org.eclipse.tracecompass.tmf.core.event.ITmfEvent; import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException; import org.eclipse.tracecompass.tmf.core.request.ITmfEventRequest; import org.eclipse.tracecompass.tmf.core.request.TmfEventRequest; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp; @@ -191,7 +191,7 @@ public class TmfSchedulerTest { ForegroundRequest foreground3 = new ForegroundRequest(TmfTimeRange.ETERNITY); fixture.sendRequest(foreground3); - TmfTimeSynchSignal signal3 = new TmfTimeSynchSignal(this, new TmfTimestamp(fForegroundTimeRange.getStartTime())); + TmfSelectionRangeUpdatedSignal signal3 = new TmfSelectionRangeUpdatedSignal(this, new TmfTimestamp(fForegroundTimeRange.getStartTime())); fixture.broadcast(signal3); try { @@ -211,7 +211,7 @@ public class TmfSchedulerTest { public void TestMultiRequest4() { ForegroundRequest foreground4 = new ForegroundRequest(fForegroundTimeRange); fixture.sendRequest(foreground4); - TmfTimeSynchSignal signal4 = new TmfTimeSynchSignal(this, new TmfTimestamp(fStartTime + ((fEndTime - fStartTime) / 8))); + TmfSelectionRangeUpdatedSignal signal4 = new TmfSelectionRangeUpdatedSignal(this, new TmfTimestamp(fStartTime + ((fEndTime - fStartTime) / 8))); fixture.broadcast(signal4); try { @@ -231,7 +231,7 @@ public class TmfSchedulerTest { public void TestMultiRequest5() { ForegroundRequest foreground5 = new ForegroundRequest(fForegroundTimeRange); fixture.sendRequest(foreground5); - TmfTimeSynchSignal signal5 = new TmfTimeSynchSignal(this, new TmfTimestamp(fEndTime - ((fEndTime - fStartTime) / 4))); + TmfSelectionRangeUpdatedSignal signal5 = new TmfSelectionRangeUpdatedSignal(this, new TmfTimestamp(fEndTime - ((fEndTime - fStartTime) / 4))); fixture.broadcast(signal5); try { @@ -255,7 +255,7 @@ public class TmfSchedulerTest { fixture.sendRequest(background6); fixture.sendRequest(foreground6); - TmfTimeSynchSignal signal6 = new TmfTimeSynchSignal(this, new TmfTimestamp(fStartTime + ((fEndTime - fStartTime) / 8))); + TmfSelectionRangeUpdatedSignal signal6 = new TmfSelectionRangeUpdatedSignal(this, new TmfTimestamp(fStartTime + ((fEndTime - fStartTime) / 8))); fixture.broadcast(signal6); try { diff --git a/org.eclipse.tracecompass.tmf.ctf.core.tests/src/org/eclipse/tracecompass/tmf/ctf/core/tests/temp/tracemanager/TmfTraceManagerTest.java b/org.eclipse.tracecompass.tmf.ctf.core.tests/src/org/eclipse/tracecompass/tmf/ctf/core/tests/temp/tracemanager/TmfTraceManagerTest.java index 69c740c33c..c96ade9dbe 100644 --- a/org.eclipse.tracecompass.tmf.ctf.core.tests/src/org/eclipse/tracecompass/tmf/ctf/core/tests/temp/tracemanager/TmfTraceManagerTest.java +++ b/org.eclipse.tracecompass.tmf.ctf.core.tests/src/org/eclipse/tracecompass/tmf/ctf/core/tests/temp/tracemanager/TmfTraceManagerTest.java @@ -24,9 +24,9 @@ import java.util.Collections; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.tracecompass.tmf.core.event.ITmfEvent; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal; @@ -145,11 +145,11 @@ public class TmfTraceManagerTest { } private void selectTimestamp(@NonNull ITmfTimestamp ts) { - TmfSignalManager.dispatchSignal(new TmfTimeSynchSignal(this, ts)); + TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(this, ts)); } private void selectWindowRange(TmfTimeRange tr) { - TmfSignalManager.dispatchSignal(new TmfRangeSynchSignal(this, tr)); + TmfSignalManager.dispatchSignal(new TmfWindowRangeUpdatedSignal(this, tr)); } // ------------------------------------------------------------------------ diff --git a/org.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ctf/ui/swtbot/tests/AbstractImportAndReadSmokeTest.java b/org.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ctf/ui/swtbot/tests/AbstractImportAndReadSmokeTest.java index 7b591fb83c..20b32ba3bd 100644 --- a/org.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ctf/ui/swtbot/tests/AbstractImportAndReadSmokeTest.java +++ b/org.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ctf/ui/swtbot/tests/AbstractImportAndReadSmokeTest.java @@ -36,7 +36,7 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.trace.ITmfContext; import org.eclipse.tracecompass.tmf.ctf.core.event.CtfTmfEvent; import org.eclipse.tracecompass.tmf.ctf.core.tests.shared.CtfTmfTestTrace; @@ -202,18 +202,18 @@ public abstract class AbstractImportAndReadSmokeTest { } } HistogramView hv = (HistogramView) vp; - final TmfTimeSynchSignal signal = new TmfTimeSynchSignal(hv, desiredEvent1.getTimestamp()); - final TmfTimeSynchSignal signal2 = new TmfTimeSynchSignal(hv, desiredEvent2.getTimestamp()); + final TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(hv, desiredEvent1.getTimestamp()); + final TmfSelectionRangeUpdatedSignal signal2 = new TmfSelectionRangeUpdatedSignal(hv, desiredEvent2.getTimestamp()); hv.updateTimeRange(100000); SWTBotUtils.waitForJobs(); - hv.currentTimeUpdated(signal); + hv.selectionRangeUpdated(signal); hv.broadcast(signal); SWTBotUtils.waitForJobs(); SWTBotUtils.delay(1000); hv.updateTimeRange(1000000000); SWTBotUtils.waitForJobs(); - hv.currentTimeUpdated(signal2); + hv.selectionRangeUpdated(signal2); hv.broadcast(signal2); SWTBotUtils.waitForJobs(); SWTBotUtils.delay(1000); diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/ImportAndReadPcapTest.java b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/ImportAndReadPcapTest.java index 9a0b2e3259..1486e32586 100644 --- a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/ImportAndReadPcapTest.java +++ b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/ImportAndReadPcapTest.java @@ -42,7 +42,7 @@ import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace; import org.eclipse.tracecompass.internal.tmf.pcap.ui.NetworkingPerspectiveFactory; import org.eclipse.tracecompass.internal.tmf.pcap.ui.stream.StreamListView; import org.eclipse.tracecompass.tmf.core.event.ITmfEvent; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.trace.ITmfContext; import org.eclipse.tracecompass.tmf.pcap.core.tests.shared.PcapTmfTestTrace; import org.eclipse.tracecompass.tmf.ui.editors.TmfEventsEditor; @@ -156,7 +156,7 @@ public class ImportAndReadPcapTest { botView.setFocus(); SWTBotTree botTree = fBot.tree(); assertNotNull(botTree); - final TmfTimeSynchSignal signal = new TmfTimeSynchSignal(slv, fDesired1.getTimestamp()); + final TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(slv, fDesired1.getTimestamp()); slv.broadcast(signal); SWTBotUtils.waitForJobs(); // FIXME This is a race condition: diff --git a/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/TmfUml2SDSyncLoaderSignalTest.java b/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/TmfUml2SDSyncLoaderSignalTest.java index dd6cb0e66e..d57b4ee0aa 100644 --- a/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/TmfUml2SDSyncLoaderSignalTest.java +++ b/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/TmfUml2SDSyncLoaderSignalTest.java @@ -18,8 +18,8 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp; import org.eclipse.tracecompass.tmf.ui.views.uml2sd.core.GraphNode; @@ -53,8 +53,8 @@ public class TmfUml2SDSyncLoaderSignalTest { rangeWindow = (TmfTimestamp) range.getEndTime().getDelta(range.getStartTime()); TmfTimestamp currentTime = new Uml2SDTestTimestamp(9789773782043L); - fFacility.getTrace().broadcast(new TmfRangeSynchSignal(fFacility, range)); - fFacility.getTrace().broadcast(new TmfTimeSynchSignal(fFacility, currentTime)); + fFacility.getTrace().broadcast(new TmfWindowRangeUpdatedSignal(fFacility, range)); + fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(fFacility, currentTime)); fFacility.delay(IUml2SDTestConstants.BROADCAST_DELAY); fTmfComponent = new Uml2SDSignalValidator(); diff --git a/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/TmfUml2SDSyncLoaderTimeTest.java b/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/TmfUml2SDSyncLoaderTimeTest.java index 5a3f56d72d..b88a0d76f4 100644 --- a/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/TmfUml2SDSyncLoaderTimeTest.java +++ b/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/TmfUml2SDSyncLoaderTimeTest.java @@ -21,8 +21,8 @@ import static org.junit.Assert.assertTrue; import java.util.List; import org.eclipse.jdt.annotation.NonNull; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp; import org.eclipse.tracecompass.tmf.ui.views.uml2sd.core.GraphNode; @@ -129,7 +129,7 @@ public class TmfUml2SDSyncLoaderTimeTest { */ @Test public void verifySynchToTimeInPage() { - fFacility.getTrace().broadcast(new TmfTimeSynchSignal(this, TC_001_TIME_VALUE)); + fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TC_001_TIME_VALUE)); fFacility.getLoader().waitForCompletion(); fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY); assertEquals("synchToTime", TC_001_PAGE_VALUE, fFacility.getLoader().currentPage()); @@ -154,7 +154,7 @@ public class TmfUml2SDSyncLoaderTimeTest { */ @Test public void verifySynchToTimeOutsidePage() { - fFacility.getTrace().broadcast(new TmfTimeSynchSignal(this, TC_002_TIME_VALUE)); + fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TC_002_TIME_VALUE)); fFacility.getLoader().waitForCompletion(); fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY); assertEquals("synchToTime", TC_002_PAGE_VALUE, fFacility.getLoader().currentPage()); @@ -182,7 +182,7 @@ public class TmfUml2SDSyncLoaderTimeTest { public void verifySynchToTimeNonExisting() { fFacility.getLoader().firstPage(); - fFacility.getTrace().broadcast(new TmfTimeSynchSignal(this, TC_003_TIME_VALUE)); + fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TC_003_TIME_VALUE)); fFacility.getLoader().waitForCompletion(); fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY); assertEquals("synchToTime", 0, TC_003_TIME_VALUE.compareTo(fFacility.getLoader().getCurrentTime())); @@ -200,7 +200,7 @@ public class TmfUml2SDSyncLoaderTimeTest { */ @Test public void verifySynchToTimeBeforeExpStart() { - fFacility.getTrace().broadcast(new TmfTimeSynchSignal(this, TmfTimestamp.BIG_BANG)); + fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TmfTimestamp.BIG_BANG)); fFacility.getLoader().waitForCompletion(); fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY); assertEquals("synchToTime", TC_004_PAGE_VALUE, fFacility.getLoader().currentPage()); @@ -217,7 +217,7 @@ public class TmfUml2SDSyncLoaderTimeTest { */ @Test public void verifySynchToTimeAfterExpEnd() { - fFacility.getTrace().broadcast(new TmfTimeSynchSignal(this, TmfTimestamp.BIG_CRUNCH)); + fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TmfTimestamp.BIG_CRUNCH)); fFacility.getLoader().waitForCompletion(); fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY); assertEquals("synchToTime", TC_005_PAGE_VALUE, fFacility.getLoader().currentPage()); @@ -234,7 +234,7 @@ public class TmfUml2SDSyncLoaderTimeTest { */ @Test public void verifySynchToTimeEqualsLast() { - fFacility.getTrace().broadcast(new TmfTimeSynchSignal(this, TC_006_TIME_VALUE)); + fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TC_006_TIME_VALUE)); fFacility.getLoader().waitForCompletion(); fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY); assertEquals("synchToTime", TC_006_PAGE_VALUE, fFacility.getLoader().currentPage()); @@ -254,7 +254,7 @@ public class TmfUml2SDSyncLoaderTimeTest { */ @Test public void verifySynchToTimeFirst() { - fFacility.getTrace().broadcast(new TmfTimeSynchSignal(this, TC_007_TIME_VALUE)); + fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TC_007_TIME_VALUE)); fFacility.getLoader().waitForCompletion(); fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY); assertEquals("synchToTime", TC_007_PAGE_VALUE, fFacility.getLoader().currentPage()); @@ -279,7 +279,7 @@ public class TmfUml2SDSyncLoaderTimeTest { TmfTimeRange range = new TmfTimeRange(TC_008_START_TIME_VALUE, TC_008_END_TIME_VALUE); fFacility.getLoader().waitForCompletion(); fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY); - fFacility.getTrace().broadcast(new TmfRangeSynchSignal(this, range)); + fFacility.getTrace().broadcast(new TmfWindowRangeUpdatedSignal(this, range)); assertEquals("synchToTimeRange", TC_008_PAGE_VALUE, fFacility.getLoader().currentPage()); assertNotNull("synchToTimeRange", fFacility.getLoader().getCurrentTime()); assertEquals("synchToTimeRange", 0, TC_008_TIME_VALUE.compareTo(fFacility.getLoader().getCurrentTime())); @@ -298,7 +298,7 @@ public class TmfUml2SDSyncLoaderTimeTest { @Test public void verifyTimeRangeDifferentPages() { TmfTimeRange range = new TmfTimeRange(TC_009_START_TIME_VALUE, TC_009_END_TIME_VALUE); - fFacility.getTrace().broadcast(new TmfRangeSynchSignal(this, range)); + fFacility.getTrace().broadcast(new TmfWindowRangeUpdatedSignal(this, range)); fFacility.getLoader().waitForCompletion(); fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY); assertEquals("synchToTimeRange", TC_009_PAGE_VALUE, fFacility.getLoader().currentPage()); diff --git a/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/Uml2SDSignalValidator.java b/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/Uml2SDSignalValidator.java index f25c7be7e8..32fab5fb18 100644 --- a/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/Uml2SDSignalValidator.java +++ b/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/views/uml2sd/loader/Uml2SDSignalValidator.java @@ -14,10 +14,10 @@ package org.eclipse.tracecompass.tmf.ui.tests.views.uml2sd.loader; import org.eclipse.tracecompass.tmf.core.component.TmfComponent; import org.eclipse.tracecompass.tmf.core.signal.TmfEndSynchSignal; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; import org.eclipse.tracecompass.tmf.core.signal.TmfStartSynchSignal; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp; @@ -59,7 +59,7 @@ public class Uml2SDSignalValidator extends TmfComponent implements IUml2SdSignal * @param signal the signal to handle. */ @TmfSignalHandler - public void synchToTime(TmfTimeSynchSignal signal) { + public void synchToTime(TmfSelectionRangeUpdatedSignal signal) { // Set results so that it can be validated in the test case setSignalReceived(true); setSourceError(getSource() != signal.getSource()); @@ -67,11 +67,11 @@ public class Uml2SDSignalValidator extends TmfComponent implements IUml2SdSignal } /** - * Signal handler for time range synch signal. + * Signal handler for window range signal. * @param signal the signal to handle. */ @TmfSignalHandler - public void synchToTimeRange(TmfRangeSynchSignal signal) { + public void synchToTimeRange(TmfWindowRangeUpdatedSignal signal) { // Set results so that it can be validated in the test case setSignalReceived(true); if (getSource() != null) { diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/dialogs/offset/OffsetDialog.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/dialogs/offset/OffsetDialog.java index ef6ffaa32a..7246c2d37c 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/dialogs/offset/OffsetDialog.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/dialogs/offset/OffsetDialog.java @@ -58,7 +58,7 @@ import org.eclipse.swt.widgets.TreeItem; import org.eclipse.tracecompass.tmf.core.signal.TmfEventSelectedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; import org.eclipse.tracecompass.tmf.core.timestamp.TmfNanoTimestamp; @@ -538,7 +538,7 @@ public class OffsetDialog extends Dialog { * the event selected signal */ @TmfSignalHandler - public void timeSelected(final TmfTimeSynchSignal signal) { + public void timeSelected(final TmfSelectionRangeUpdatedSignal signal) { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/TmfTimeViewer.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/TmfTimeViewer.java index 4f4da3187e..91c5fa3e1e 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/TmfTimeViewer.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/TmfTimeViewer.java @@ -14,10 +14,10 @@ package org.eclipse.tracecompass.tmf.ui.viewers; import org.eclipse.swt.widgets.Composite; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalThrottler; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceRangeUpdatedSignal; @@ -239,7 +239,7 @@ public abstract class TmfTimeViewer extends TmfViewer implements ITmfTimeProvide final ITmfTimestamp startTimestamp = new TmfTimestamp(getSelectionBeginTime(), ITmfTimestamp.NANOSECOND_SCALE); final ITmfTimestamp endTimestamp = new TmfTimestamp(getSelectionEndTime(), ITmfTimestamp.NANOSECOND_SCALE); - TmfTimeSynchSignal signal = new TmfTimeSynchSignal(this, startTimestamp, endTimestamp); + TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(this, startTimestamp, endTimestamp); broadcast(signal); } } @@ -257,7 +257,7 @@ public abstract class TmfTimeViewer extends TmfViewer implements ITmfTimeProvide new TmfTimestamp(getWindowEndTime(), ITmfTimestamp.NANOSECOND_SCALE)); // Send the signal - TmfRangeSynchSignal signal = new TmfRangeSynchSignal(this, timeRange); + TmfWindowRangeUpdatedSignal signal = new TmfWindowRangeUpdatedSignal(this, timeRange); fTimeRangeSyncThrottle.queue(signal); } @@ -356,13 +356,14 @@ public abstract class TmfTimeViewer extends TmfViewer implements ITmfTimeProvide } /** - * Signal handler for handling of the time synch signal, ie the selected range. + * Signal handler for handling of the selected range signal. * * @param signal - * The time synch signal {@link TmfTimeSynchSignal} + * The {@link TmfSelectionRangeUpdatedSignal} + * @since 1.0 */ @TmfSignalHandler - public void selectionRangeUpdated(TmfTimeSynchSignal signal) { + public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { if ((signal.getSource() != this) && (fTrace != null)) { ITmfTimestamp selectedTime = signal.getBeginTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE); ITmfTimestamp selectedEndTime = signal.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE); @@ -372,13 +373,14 @@ public abstract class TmfTimeViewer extends TmfViewer implements ITmfTimeProvide } /** - * Signal handler for handling of the time range synch signal, ie the visible range. + * Signal handler for handling of the window range signal. * * @param signal - * The time range synch signal {@link TmfRangeSynchSignal} + * The {@link TmfWindowRangeUpdatedSignal} + * @since 1.0 */ @TmfSignalHandler - public void timeRangeUpdated(TmfRangeSynchSignal signal) { + public void windowRangeUpdated(TmfWindowRangeUpdatedSignal signal) { if (fTrace != null) { // Validate the time range diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/events/TmfEventsTable.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/events/TmfEventsTable.java index b4f1095ec5..c56d3dd178 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/events/TmfEventsTable.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/events/TmfEventsTable.java @@ -137,7 +137,7 @@ import org.eclipse.tracecompass.tmf.core.signal.TmfEventFilterAppliedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfEventSearchAppliedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfEventSelectedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceUpdatedSignal; import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; @@ -494,12 +494,12 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS ITmfTimestamp selectedBeginTimestamp = fSelectedBeginTimestamp; if (selectedBeginTimestamp != null) { if (selectedBeginTimestamp.compareTo(ts) <= 0) { - broadcast(new TmfTimeSynchSignal(TmfEventsTable.this, selectedBeginTimestamp, ts)); + broadcast(new TmfSelectionRangeUpdatedSignal(TmfEventsTable.this, selectedBeginTimestamp, ts)); if (fTable.getSelectionIndices().length == 2) { updateStatusLine(ts.getDelta(selectedBeginTimestamp)); } } else { - broadcast(new TmfTimeSynchSignal(TmfEventsTable.this, checkNotNull(ts), checkNotNull(fSelectedBeginTimestamp))); + broadcast(new TmfSelectionRangeUpdatedSignal(TmfEventsTable.this, checkNotNull(ts), checkNotNull(fSelectedBeginTimestamp))); updateStatusLine(fSelectedBeginTimestamp.getDelta(ts)); } } @@ -779,7 +779,7 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS TableItem item = fTable.getSelection()[0]; final TmfTimestamp ts = (TmfTimestamp) item.getData(Key.TIMESTAMP); if (ts != null) { - broadcast(new TmfTimeSynchSignal(TmfEventsTable.this, ts)); + broadcast(new TmfSelectionRangeUpdatedSignal(TmfEventsTable.this, ts)); } if (item.getData() instanceof ITmfEvent) { broadcast(new TmfEventSelectedSignal(TmfEventsTable.this, (ITmfEvent) item.getData())); @@ -2091,7 +2091,7 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS fSelectedRank = foundRank; fRawViewer.selectAndReveal(fSelectedRank); if (foundTimestamp != null) { - broadcast(new TmfTimeSynchSignal(TmfEventsTable.this, foundTimestamp)); + broadcast(new TmfSelectionRangeUpdatedSignal(TmfEventsTable.this, foundTimestamp)); } fireSelectionChanged(new SelectionChangedEvent(TmfEventsTable.this, getSelection())); synchronized (fSearchSyncObj) { @@ -2636,13 +2636,14 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS } /** - * Handler for the time synch signal. + * Handler for the selection range signal. * * @param signal * The incoming signal + * @since 1.0 */ @TmfSignalHandler - public void currentTimeUpdated(final TmfTimeSynchSignal signal) { + public void selectionRangeUpdated(final TmfSelectionRangeUpdatedSignal signal) { if ((signal.getSource() != this) && (fTrace != null) && (!fTable.isDisposed())) { // Create a request for one event that will be queued after other ongoing requests. When this request is completed diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java index 78185496b9..cf69638454 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java @@ -44,7 +44,7 @@ import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem; import org.eclipse.tracecompass.tmf.core.component.TmfComponent; import org.eclipse.tracecompass.tmf.core.request.ITmfEventRequest; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.statistics.ITmfStatistics; import org.eclipse.tracecompass.tmf.core.statistics.TmfStatisticsEventTypesModule; @@ -218,9 +218,10 @@ public class TmfStatisticsViewer extends TmfViewer { * * @param signal * Contains the information about the new selected time range. + * @since 1.0 */ @TmfSignalHandler - public void timeSynchUpdated(TmfTimeSynchSignal signal) { + public void timeSynchUpdated(TmfSelectionRangeUpdatedSignal signal) { if (fTrace == null) { return; } diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/tree/AbstractTmfTreeViewer.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/tree/AbstractTmfTreeViewer.java index 95eb0d229c..ee950de109 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/tree/AbstractTmfTreeViewer.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/tree/AbstractTmfTreeViewer.java @@ -38,9 +38,9 @@ import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.TreeColumn; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; import org.eclipse.tracecompass.tmf.ui.viewers.TmfTimeViewer; @@ -471,11 +471,11 @@ public abstract class AbstractTmfTreeViewer extends TmfTimeViewer { * correspond to the selection by the user, not the visible time range. * * @param signal - * The time synch signal {@link TmfTimeSynchSignal} + * The time synch signal {@link TmfSelectionRangeUpdatedSignal} */ @Override @TmfSignalHandler - public void selectionRangeUpdated(TmfTimeSynchSignal signal) { + public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { super.selectionRangeUpdated(signal); if ((signal.getSource() != this) && (getTrace() != null)) { updateContent(this.getSelectionBeginTime(), this.getSelectionEndTime(), true); @@ -483,16 +483,16 @@ public abstract class AbstractTmfTreeViewer extends TmfTimeViewer { } /** - * Signal handler for handling of the time range synch signal. This time - * range is the visible zone of the view. + * Signal handler for handling of the window range signal. This time range + * is the visible zone of the view. * * @param signal - * The time range synch signal {@link TmfRangeSynchSignal} + * The {@link TmfWindowRangeUpdatedSignal} */ @Override @TmfSignalHandler - public void timeRangeUpdated(TmfRangeSynchSignal signal) { - super.timeRangeUpdated(signal); + public void windowRangeUpdated(TmfWindowRangeUpdatedSignal signal) { + super.windowRangeUpdated(signal); updateContent(this.getWindowStartTime(), this.getWindowEndTime(), false); } diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/xycharts/TmfXYChartViewer.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/xycharts/TmfXYChartViewer.java index 680b93e822..3787989aa7 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/xycharts/TmfXYChartViewer.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/xycharts/TmfXYChartViewer.java @@ -16,9 +16,9 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTimestampFormatUpdateSignal; import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; import org.eclipse.tracecompass.tmf.ui.viewers.TmfTimeViewer; @@ -297,11 +297,11 @@ public abstract class TmfXYChartViewer extends TmfTimeViewer implements ITmfChar * Signal handler for handling of the time synch signal. * * @param signal - * The time synch signal {@link TmfTimeSynchSignal} + * The time synch signal {@link TmfSelectionRangeUpdatedSignal} */ @Override @TmfSignalHandler - public void selectionRangeUpdated(TmfTimeSynchSignal signal) { + public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { super.selectionRangeUpdated(signal); if ((signal.getSource() != this) && (getTrace() != null)) { if (fMouseSelectionProvider != null) { @@ -311,15 +311,15 @@ public abstract class TmfXYChartViewer extends TmfTimeViewer implements ITmfChar } /** - * Signal handler for handling of the time range synch signal. + * Signal handler for handling of the window range signal. * * @param signal - * The time range synch signal {@link TmfRangeSynchSignal} + * The {@link TmfWindowRangeUpdatedSignal} */ @Override @TmfSignalHandler - public void timeRangeUpdated(TmfRangeSynchSignal signal) { - super.timeRangeUpdated(signal); + public void windowRangeUpdated(TmfWindowRangeUpdatedSignal signal) { + super.windowRangeUpdated(signal); updateContent(); } diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java index 8f9f9c079a..afe673cb59 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java @@ -75,9 +75,9 @@ import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException; import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval; import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue; import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue.Type; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal; @@ -239,11 +239,11 @@ public class CallStackView extends TmfView { private final Object fSyncObj = new Object(); // The saved time sync. signal used when switching off the pinning of a view - private TmfTimeSynchSignal fSavedTimeSyncSignal; + private TmfSelectionRangeUpdatedSignal fSavedTimeSyncSignal; - // The saved time range sync. signal used when switching off the pinning of + // The saved window range signal used when switching off the pinning of // a view - private TmfRangeSynchSignal fSavedRangeSyncSignal; + private TmfWindowRangeUpdatedSignal fSavedRangeSyncSignal; // ------------------------------------------------------------------------ // Classes @@ -578,7 +578,7 @@ public class CallStackView extends TmfView { long startTime = event.getStartTime(); long endTime = event.getEndTime(); TmfTimeRange range = new TmfTimeRange(new TmfNanoTimestamp(startTime), new TmfNanoTimestamp(endTime)); - broadcast(new TmfRangeSynchSignal(CallStackView.this, range)); + broadcast(new TmfWindowRangeUpdatedSignal(CallStackView.this, range)); startZoomThread(startTime, endTime); } }); @@ -589,7 +589,7 @@ public class CallStackView extends TmfView { long beginTime = event.getBeginTime(); long endTime = event.getEndTime(); synchingToTime(beginTime); - broadcast(new TmfTimeSynchSignal(CallStackView.this, new TmfNanoTimestamp(beginTime), new TmfNanoTimestamp(endTime))); + broadcast(new TmfSelectionRangeUpdatedSignal(CallStackView.this, new TmfNanoTimestamp(beginTime), new TmfNanoTimestamp(endTime))); } }); @@ -616,7 +616,7 @@ public class CallStackView extends TmfView { entryTime -= spacingTime; exitTime += spacingTime; TmfTimeRange range = new TmfTimeRange(new TmfNanoTimestamp(entryTime), new TmfNanoTimestamp(exitTime)); - broadcast(new TmfRangeSynchSignal(CallStackView.this, range)); + broadcast(new TmfWindowRangeUpdatedSignal(CallStackView.this, range)); fTimeGraphCombo.getTimeGraphViewer().setStartFinishTime(entryTime, exitTime); startZoomThread(entryTime, exitTime); } @@ -639,7 +639,7 @@ public class CallStackView extends TmfView { startTime -= spacingTime; endTime += spacingTime; TmfTimeRange range = new TmfTimeRange(new TmfNanoTimestamp(startTime), new TmfNanoTimestamp(endTime)); - broadcast(new TmfRangeSynchSignal(CallStackView.this, range)); + broadcast(new TmfWindowRangeUpdatedSignal(CallStackView.this, range)); fTimeGraphCombo.getTimeGraphViewer().setStartFinishTime(startTime, endTime); startZoomThread(startTime, endTime); } @@ -729,15 +729,16 @@ public class CallStackView extends TmfView { } /** - * Handler for the TimeSynch signal + * Handler for the selection range signal. * * @param signal * The incoming signal + * @since 1.0 */ @TmfSignalHandler - public void synchToTime(final TmfTimeSynchSignal signal) { + public void selectionRangeUpdated(final TmfSelectionRangeUpdatedSignal signal) { - fSavedTimeSyncSignal = isPinned() ? new TmfTimeSynchSignal(signal.getSource(), signal.getBeginTime(), signal.getEndTime()) : null; + fSavedTimeSyncSignal = isPinned() ? new TmfSelectionRangeUpdatedSignal(signal.getSource(), signal.getBeginTime(), signal.getEndTime()) : null; if (signal.getSource() == this || fTrace == null || isPinned()) { return; @@ -788,17 +789,18 @@ public class CallStackView extends TmfView { } /** - * Handler for the RangeSynch signal + * Handler for the window range signal. * * @param signal * The incoming signal + * @since 1.0 */ @TmfSignalHandler - public void synchToRange(final TmfRangeSynchSignal signal) { + public void windowRangeUpdated(final TmfWindowRangeUpdatedSignal signal) { if (isPinned()) { fSavedRangeSyncSignal = - new TmfRangeSynchSignal(signal.getSource(), new TmfTimeRange(signal.getCurrentRange().getStartTime(), signal.getCurrentRange().getEndTime())); + new TmfWindowRangeUpdatedSignal(signal.getSource(), new TmfTimeRange(signal.getCurrentRange().getStartTime(), signal.getCurrentRange().getEndTime())); fSavedTimeSyncSignal = null; } @@ -1187,12 +1189,12 @@ public class CallStackView extends TmfView { public void propertyChange(PropertyChangeEvent event) { if (IAction.CHECKED.equals(event.getProperty()) && !isPinned()) { if (fSavedRangeSyncSignal != null) { - synchToRange(fSavedRangeSyncSignal); + windowRangeUpdated(fSavedRangeSyncSignal); fSavedRangeSyncSignal = null; } if (fSavedTimeSyncSignal != null) { - synchToTime(fSavedTimeSyncSignal); + selectionRangeUpdated(fSavedTimeSyncSignal); fSavedTimeSyncSignal = null; } } diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/histogram/HistogramView.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/histogram/HistogramView.java index e191620729..a90499c8c2 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/histogram/HistogramView.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/histogram/HistogramView.java @@ -46,10 +46,10 @@ import org.eclipse.tracecompass.internal.tmf.ui.Activator; import org.eclipse.tracecompass.internal.tmf.ui.ITmfImageConstants; import org.eclipse.tracecompass.tmf.core.request.ITmfEventRequest; import org.eclipse.tracecompass.tmf.core.request.ITmfEventRequest.ExecutionType; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalThrottler; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceRangeUpdatedSignal; @@ -432,7 +432,7 @@ public class HistogramView extends TmfView { updateDisplayedSelectionTime(beginTime, endTime); TmfTimestamp beginTs = new TmfTimestamp(beginTime, ITmfTimestamp.NANOSECOND_SCALE); TmfTimestamp endTs = new TmfTimestamp(endTime, ITmfTimestamp.NANOSECOND_SCALE); - TmfTimeSynchSignal signal = new TmfTimeSynchSignal(this, beginTs, endTs); + TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(this, beginTs, endTs); fTimeSyncThrottle.queue(signal); } @@ -476,7 +476,7 @@ public class HistogramView extends TmfView { updateDisplayedTimeRange(startTime, endTime); // Send the FW signal - TmfRangeSynchSignal signal = new TmfRangeSynchSignal(this, timeRange); + TmfWindowRangeUpdatedSignal signal = new TmfWindowRangeUpdatedSignal(this, timeRange); fTimeRangeSyncThrottle.queue(signal); } } @@ -639,13 +639,15 @@ public class HistogramView extends TmfView { } /** - * Handles the current time updated signal. Sets the current time in the time range - * histogram as well as the full histogram. + * Handles the selection range updated signal. Sets the current time + * selection in the time range histogram as well as the full histogram. * - * @param signal the signal to process + * @param signal + * the signal to process + * @since 1.0 */ @TmfSignalHandler - public void currentTimeUpdated(final TmfTimeSynchSignal signal) { + public void selectionRangeUpdated(final TmfSelectionRangeUpdatedSignal signal) { if (Display.getCurrent() == null) { // Make sure the signal is handled in the UI thread Display.getDefault().asyncExec(new Runnable() { @@ -654,7 +656,7 @@ public class HistogramView extends TmfView { if (fParent.isDisposed()) { return; } - currentTimeUpdated(signal); + selectionRangeUpdated(signal); } }); return; @@ -667,11 +669,15 @@ public class HistogramView extends TmfView { } /** - * Updates the current time range in the time range histogram and full range histogram. - * @param signal the signal to process + * Updates the current window time range in the time range histogram and + * full range histogram. + * + * @param signal + * the signal to process + * @since 1.0 */ @TmfSignalHandler - public void timeRangeUpdated(final TmfRangeSynchSignal signal) { + public void windowRangeUpdated(final TmfWindowRangeUpdatedSignal signal) { if (Display.getCurrent() == null) { // Make sure the signal is handled in the UI thread Display.getDefault().asyncExec(new Runnable() { @@ -680,7 +686,7 @@ public class HistogramView extends TmfView { if (fParent.isDisposed()) { return; } - timeRangeUpdated(signal); + windowRangeUpdated(signal); } }); return; diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timechart/TimeChartView.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timechart/TimeChartView.java index 2b5281c82d..2f5ad6e8fe 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timechart/TimeChartView.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timechart/TimeChartView.java @@ -31,9 +31,9 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.tracecompass.tmf.core.event.ITmfEvent; import org.eclipse.tracecompass.tmf.core.signal.TmfEventFilterAppliedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfEventSearchAppliedSignal; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal; @@ -520,7 +520,7 @@ public class TimeChartView extends TmfView implements ITimeGraphRangeListener, I final ITmfTimestamp startTimestamp = new TmfTimestamp(event.getStartTime(), ITmfTimestamp.NANOSECOND_SCALE); final ITmfTimestamp endTimestamp = new TmfTimestamp(event.getEndTime(), ITmfTimestamp.NANOSECOND_SCALE); TmfTimeRange range = new TmfTimeRange(startTimestamp, endTimestamp); - broadcast(new TmfRangeSynchSignal(this, range)); + broadcast(new TmfWindowRangeUpdatedSignal(this, range)); } @Override @@ -538,7 +538,7 @@ public class TimeChartView extends TmfView implements ITimeGraphRangeListener, I @Override public void timeSelected(TimeGraphTimeEvent event) { - broadcast(new TmfTimeSynchSignal(this, new TmfTimestamp(event.getBeginTime(), TIMESTAMP_SCALE), new TmfTimestamp(event.getEndTime(), TIMESTAMP_SCALE))); + broadcast(new TmfSelectionRangeUpdatedSignal(this, new TmfTimestamp(event.getBeginTime(), TIMESTAMP_SCALE), new TmfTimestamp(event.getEndTime(), TIMESTAMP_SCALE))); } @Override @@ -666,13 +666,14 @@ public class TimeChartView extends TmfView implements ITimeGraphRangeListener, I } /** - * Handler for the Time Synch signal + * Handler for the selection range updated signal. * * @param signal * The incoming signal + * @since 1.0 */ @TmfSignalHandler - public void currentTimeUpdated(TmfTimeSynchSignal signal) { + public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { final long beginTime = signal.getBeginTime().normalize(0, TIMESTAMP_SCALE).getValue(); final long endTime = signal.getEndTime().normalize(0, TIMESTAMP_SCALE).getValue(); Display.getDefault().asyncExec(new Runnable() { @@ -693,13 +694,14 @@ public class TimeChartView extends TmfView implements ITimeGraphRangeListener, I } /** - * Handler for the Time Range Synch signal + * Handler for the window range updated signal. * * @param signal * The incoming signal + * @since 1.0 */ @TmfSignalHandler - public void synchToRange(final TmfRangeSynchSignal signal) { + public void windowRangeUpdated(final TmfWindowRangeUpdatedSignal signal) { if (signal.getSource() == this) { return; } diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java index 4f48e10ba6..0d31d3bd54 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java @@ -46,9 +46,9 @@ import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.TreeColumn; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTimestampFormatUpdateSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; @@ -879,7 +879,7 @@ public abstract class AbstractTimeGraphView extends TmfView { final long startTime = event.getStartTime(); final long endTime = event.getEndTime(); TmfTimeRange range = new TmfTimeRange(new TmfNanoTimestamp(startTime), new TmfNanoTimestamp(endTime)); - broadcast(new TmfRangeSynchSignal(AbstractTimeGraphView.this, range)); + broadcast(new TmfWindowRangeUpdatedSignal(AbstractTimeGraphView.this, range)); startZoomThread(startTime, endTime); } }); @@ -889,7 +889,7 @@ public abstract class AbstractTimeGraphView extends TmfView { public void timeSelected(TimeGraphTimeEvent event) { TmfNanoTimestamp startTime = new TmfNanoTimestamp(event.getBeginTime()); TmfNanoTimestamp endTime = new TmfNanoTimestamp(event.getEndTime()); - broadcast(new TmfTimeSynchSignal(AbstractTimeGraphView.this, startTime, endTime)); + broadcast(new TmfSelectionRangeUpdatedSignal(AbstractTimeGraphView.this, startTime, endTime)); } }); @@ -979,13 +979,14 @@ public abstract class AbstractTimeGraphView extends TmfView { } /** - * Handler for the time synch signal + * Handler for the selection range signal. * * @param signal * The signal that's received + * @since 1.0 */ @TmfSignalHandler - public void synchToTime(final TmfTimeSynchSignal signal) { + public void selectionRangeUpdated(final TmfSelectionRangeUpdatedSignal signal) { if (signal.getSource() == this || fTrace == null) { return; } @@ -1011,13 +1012,14 @@ public abstract class AbstractTimeGraphView extends TmfView { } /** - * Handler for the range synch signal + * Handler for the window range signal. * * @param signal * The signal that's received + * @since 1.0 */ @TmfSignalHandler - public void synchToRange(final TmfRangeSynchSignal signal) { + public void windowRangeUpdated(final TmfWindowRangeUpdatedSignal signal) { if (signal.getSource() == this || fTrace == null) { return; } diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/uml2sd/loader/TmfUml2SDSyncLoader.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/uml2sd/loader/TmfUml2SDSyncLoader.java index 29a215352b..0590ee77c5 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/uml2sd/loader/TmfUml2SDSyncLoader.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/uml2sd/loader/TmfUml2SDSyncLoader.java @@ -33,10 +33,10 @@ import org.eclipse.tracecompass.tmf.core.event.ITmfEventField; import org.eclipse.tracecompass.tmf.core.request.ITmfEventRequest; import org.eclipse.tracecompass.tmf.core.request.ITmfEventRequest.ExecutionType; import org.eclipse.tracecompass.tmf.core.request.TmfEventRequest; -import org.eclipse.tracecompass.tmf.core.signal.TmfRangeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; -import org.eclipse.tracecompass.tmf.core.signal.TmfTimeSynchSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal; @@ -450,13 +450,15 @@ public class TmfUml2SDSyncLoader extends TmfComponent implements IUml2SDLoader, } /** - * Moves to the page that contains the time provided by the signal. The messages will be selected - * if the provided time is the time of a message. + * Moves to the page that contains the time provided by the signal. The + * messages will be selected if the provided time is the time of a message. * - * @param signal The Time synch signal. + * @param signal + * The selection range signal + * @since 1.0 */ @TmfSignalHandler - public void synchToTime(TmfTimeSynchSignal signal) { + public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { fLock.lock(); try { if ((signal.getSource() != this) && (fFrame != null) && (fCheckPoints.size() > 0)) { @@ -470,14 +472,16 @@ public class TmfUml2SDSyncLoader extends TmfComponent implements IUml2SDLoader, } /** - * Moves to the page that contains the current time provided by signal. - * No message will be selected however the focus will be set to the message - * if the provided time is the time of a message. + * Moves to the page that contains the current time provided by signal. No + * message will be selected however the focus will be set to the message if + * the provided time is the time of a message. * - * @param signal The time range sync signal + * @param signal + * The window range signal + * @since 1.0 */ @TmfSignalHandler - public void synchToTimeRange(TmfRangeSynchSignal signal) { + public void windowRangeUpdated(TmfWindowRangeUpdatedSignal signal) { fLock.lock(); try { if ((signal.getSource() != this) && (fFrame != null) && !fIsSignalSent && (fCheckPoints.size() > 0)) { @@ -588,7 +592,7 @@ public class TmfUml2SDSyncLoader extends TmfComponent implements IUml2SDLoader, if (startTime == null) { startTime = TmfTimestamp.BIG_BANG; } - broadcast(new TmfTimeSynchSignal(this, startTime)); + broadcast(new TmfSelectionRangeUpdatedSignal(this, startTime)); } } } @@ -1106,7 +1110,7 @@ public class TmfUml2SDSyncLoader extends TmfComponent implements IUml2SDLoader, if (notifyAll) { TmfTimeRange timeRange = getSignalTimeRange(window.getStartTime()); - broadcast(new TmfRangeSynchSignal(this, timeRange)); + broadcast(new TmfWindowRangeUpdatedSignal(this, timeRange)); } }