use of org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramView in project tracecompass by tracecompass.
the class ImportAndReadKernelSmokeTest method testHV.
private void testHV(IViewPart vp) {
SWTBotView hvBot = (new SWTWorkbenchBot()).viewById(HistogramView.ID);
List<SWTBotToolbarButton> hvTools = hvBot.getToolbarButtons();
for (SWTBotToolbarButton hvTool : hvTools) {
if (hvTool.getToolTipText().toLowerCase().contains("lost")) {
hvTool.click();
}
}
HistogramView hv = (HistogramView) vp;
final TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(hv, fDesired1.getTimestamp());
final TmfSelectionRangeUpdatedSignal signal2 = new TmfSelectionRangeUpdatedSignal(hv, fDesired2.getTimestamp());
hvBot.close();
hv = (HistogramView) UIThreadRunnable.syncExec(() -> {
try {
return (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(HistogramView.ID));
} catch (PartInitException e) {
// Do nothing, returning null fails
}
return null;
});
assertNotNull(hv);
hvBot = (new SWTWorkbenchBot()).viewById(HistogramView.ID);
hv.updateTimeRange(100000);
WaitUtils.waitForJobs();
hv.selectionRangeUpdated(signal);
hv.broadcast(signal);
WaitUtils.waitForJobs();
SWTBotUtils.delay(1000);
hv.updateTimeRange(1000000000);
WaitUtils.waitForJobs();
hv.selectionRangeUpdated(signal2);
hv.broadcast(signal2);
WaitUtils.waitForJobs();
SWTBotUtils.delay(1000);
assertNotNull(hv);
}
use of org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramView in project tracecompass by tracecompass.
the class AbstractImportAndReadSmokeTest method testHistogramView.
/**
* Verifies the Histogram View
*
* @param vp
* the view part
* @param tmfEd
* the events editor
*/
protected void testHistogramView(IViewPart vp, final TmfEventsEditor tmfEd) {
final CtfTmfEvent desiredEvent1 = getEvent(100);
UIThreadRunnable.syncExec(new VoidResult() {
@Override
public void run() {
tmfEd.setFocus();
tmfEd.selectionChanged(new SelectionChangedEvent(tmfEd, new StructuredSelection(desiredEvent1)));
}
});
WaitUtils.waitForJobs();
SWTBotUtils.delay(1000);
final CtfTmfEvent desiredEvent2 = getEvent(10000);
SWTBotView hvBot = fBot.viewById(HistogramView.ID);
List<SWTBotToolbarButton> hvTools = hvBot.getToolbarButtons();
for (SWTBotToolbarButton hvTool : hvTools) {
if (hvTool.getToolTipText().toLowerCase().contains("lost")) {
hvTool.click();
}
}
HistogramView hv = (HistogramView) vp;
final TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(hv, desiredEvent1.getTimestamp());
final TmfSelectionRangeUpdatedSignal signal2 = new TmfSelectionRangeUpdatedSignal(hv, desiredEvent2.getTimestamp());
hv.updateTimeRange(100000);
WaitUtils.waitForJobs();
hv.selectionRangeUpdated(signal);
hv.broadcast(signal);
WaitUtils.waitForJobs();
SWTBotUtils.delay(1000);
hv.updateTimeRange(1000000000);
WaitUtils.waitForJobs();
hv.selectionRangeUpdated(signal2);
hv.broadcast(signal2);
WaitUtils.waitForJobs();
SWTBotUtils.delay(1000);
assertNotNull(hv);
}
Aggregations