* Contributors:
* Alvaro Sanchez-Leon - Initial implementation
* Michel Dagenais (michel.dagenais@polymtl.ca) - Reference C implementation, used with permission
+ * Bernd Hufmann - Bug fixes
*******************************************************************************/
package org.eclipse.linuxtools.lttng.ui.views.controlflow;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.linuxtools.lttng.control.LttngCoreProviderFactory;
-import org.eclipse.linuxtools.lttng.event.LttngTimestamp;
-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.event.LttngTimestamp;
+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.model.trange.TimeRangeEventProcess;
import org.eclipse.linuxtools.lttng.ui.views.controlflow.evProcessor.FlowEventToHandlerFactory;
import org.eclipse.linuxtools.lttng.ui.views.controlflow.model.FlowModelFactory;
import org.eclipse.linuxtools.lttng.ui.views.controlflow.model.FlowTimeRangeViewerProvider;
-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.ITmfTimeFilterSelectionListener;
import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.ITmfTimeScaleSelectionListener;
private ViewProcessFilter tableFilter = null;
private ScrolledComposite scrollFrame = null;
+
+ private TmfTimeRange initTimeRange = TmfTimeRange.Null;
// private static SimpleDateFormat stimeformat = new SimpleDateFormat(
// "yy/MM/dd HH:mm:ss");
if (experiment != null) {
TmfTimeRange experimentTRange = experiment.getTimeRange();
- // send request and received the adjusted time used
- TmfTimeRange adjustedTimeRange = initialExperimentDataRequest(this,
- experimentTRange);
-
- // initialize widget time boundaries and filtering parameters
- ModelUpdateInit(experimentTRange, adjustedTimeRange, this);
+ if (experimentTRange != TmfTimeRange.Null) {
+ // send request and received 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$
}
*/
private synchronized void resizeTableColumns(Table table) {
if (table != null) {
- Composite parent = table.getParent();
- int tableWidthSum = parent.getBorderWidth();
-
TableColumn[] columns = table.getColumns();
for (TableColumn column : columns) {
column.pack();
- tableWidthSum += column.getWidth();
}
}
}
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: " //$NON-NLS-1$
+ initTimeWindow.getStartTime().toString() + "-" //$NON-NLS-1$
+ initTimeWindow.getEndTime().toString());
}
+ initTimeRange = initTimeWindow;
return initTimeWindow;
}