import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
-import org.eclipse.linuxtools.lttng.control.LttngCoreProviderFactory;
-import org.eclipse.linuxtools.lttng.request.ILttngSyntEventRequest;
-import org.eclipse.linuxtools.lttng.state.evProcessor.ITransEventProcessor;
+import org.eclipse.linuxtools.lttng.core.control.LttngCoreProviderFactory;
+import org.eclipse.linuxtools.lttng.core.request.ILttngSyntEventRequest;
+import org.eclipse.linuxtools.lttng.core.state.evProcessor.ITransEventProcessor;
import org.eclipse.linuxtools.lttng.ui.TraceDebug;
import org.eclipse.linuxtools.lttng.ui.model.trange.ItemContainer;
import org.eclipse.linuxtools.lttng.ui.views.common.AbsTimeUpdateView;
import org.eclipse.linuxtools.lttng.ui.views.resources.evProcessor.ResourcesEventToHandlerFactory;
import org.eclipse.linuxtools.lttng.ui.views.resources.model.ResourceModelFactory;
import org.eclipse.linuxtools.lttng.ui.views.resources.model.ResourcesTimeRangeViewerProvider;
-import org.eclipse.linuxtools.tmf.event.TmfEvent;
-import org.eclipse.linuxtools.tmf.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.experiment.TmfExperiment;
-import org.eclipse.linuxtools.tmf.request.ITmfDataRequest.ExecutionType;
-import org.eclipse.linuxtools.tmf.signal.TmfExperimentSelectedSignal;
-import org.eclipse.linuxtools.tmf.signal.TmfRangeSynchSignal;
-import org.eclipse.linuxtools.tmf.signal.TmfSignalHandler;
-import org.eclipse.linuxtools.tmf.signal.TmfTimeSynchSignal;
+import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.experiment.TmfExperiment;
+import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
+import org.eclipse.linuxtools.tmf.core.signal.TmfExperimentRangeUpdatedSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfExperimentSelectedSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
import org.eclipse.linuxtools.tmf.ui.viewers.TmfViewerFactory;
import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.ITmfTimeScaleSelectionListener;
import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.ITmfTimeSelectionListener;
private Action zoomFilter;
private Composite top;
+ private TmfTimeRange initTimeRange = TmfTimeRange.Null;
+
// private static SimpleDateFormat stimeformat = new SimpleDateFormat(
// "yy/MM/dd HH:mm:ss");
TmfExperiment<?> experiment = TmfExperiment.getCurrentExperiment();
if (experiment != null) {
TmfTimeRange experimentTRange = experiment.getTimeRange();
- if (experimentTRange != null) {
+ if (experimentTRange != TmfTimeRange.Null) {
long time0 = experimentTRange.getStartTime().getValue();
long time1 = experimentTRange.getEndTime().getValue();
ParamsUpdater paramUpdater = getParamsUpdater();
paramUpdater.update(time0, time1); // , timeSpaceWidth);
- }
- // send the initial request and obtained the adjusted time used
- TmfTimeRange adjustedTimeRange = initialExperimentDataRequest(this, experimentTRange);
- // initialize widget time boundaries and filtering parameters
- ModelUpdateInit(experimentTRange, adjustedTimeRange, this);
+ // send the initial request and obtained the adjusted time used
+ TmfTimeRange adjustedTimeRange = initialExperimentDataRequest(this, experimentTRange);
+
+ // initialize widget time boundaries and filtering parameters
+ ModelUpdateInit(experimentTRange, adjustedTimeRange, this);
+ }
} else {
TraceDebug.debug("No selected experiment information available"); //$NON-NLS-1$
}
if (signal != null) {
TmfTimeRange experimentTRange = signal.getExperiment().getTimeRange();
- // prepare time intervals in widget
- ModelUpdateInit(experimentTRange, experimentTRange, signal.getSource());
+ initTimeRange = TmfTimeRange.Null;
+ if (experimentTRange != TmfTimeRange.Null) {
+ // prepare time intervals in widget
+ ModelUpdateInit(experimentTRange, experimentTRange, signal.getSource());
+
+ // request initial data
+ initialExperimentDataRequest(signal.getSource(), experimentTRange);
+ }
+ }
+ }
+
+ @TmfSignalHandler
+ public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal) {
+ if (initTimeRange == TmfTimeRange.Null && signal.getExperiment().equals(TmfExperiment.getCurrentExperiment())) {
+ TmfTimeRange experimentTRange = signal.getRange();
+
+ if (experimentTRange != TmfTimeRange.Null) {
+ // prepare time intervals in widget
+ ModelUpdateInit(experimentTRange, experimentTRange, signal.getSource());
- // request initial data
- initialExperimentDataRequest(signal.getSource(), experimentTRange);
+ // request initial data
+ initialExperimentDataRequest(signal.getSource(), experimentTRange);
+ }
}
}
// user to select the interesting area based on the perspective
TmfTimeRange initTimeWindow = getInitTRange(experimentTRange);
- dataRequest(initTimeWindow, experimentTRange, true, ExecutionType.FOREGROUND);
+ eventRequest(initTimeWindow, experimentTRange, true, ExecutionType.FOREGROUND);
if (TraceDebug.isDEBUG()) {
TraceDebug.debug("Initialization request time range is: " + initTimeWindow.getStartTime().toString() + "-" //$NON-NLS-1$ //$NON-NLS-2$
+ initTimeWindow.getEndTime().toString());
}
+ initTimeRange = initTimeWindow;
return initTimeWindow;
}