use of org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractTimeGraphView in project tracecompass by tracecompass.
the class ControlFlowViewTest method timeGraphIsReadyCondition.
private void timeGraphIsReadyCondition(@NonNull TmfTimeRange selectionRange) {
IWorkbenchPart part = getViewBot().getViewReference().getPart(false);
fBot.waitUntil(ConditionHelpers.timeGraphIsReadyCondition((AbstractTimeGraphView) part, selectionRange, selectionRange.getEndTime()));
}
use of org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractTimeGraphView in project tracecompass by tracecompass.
the class ResourcesViewTest method testShowRows.
/**
* Test "Show Empty Rows" view menu
*/
@Test
public void testShowRows() {
SWTBotView viewBot = getViewBot();
/* change window range to 10 ms */
TmfTimeRange range = new TmfTimeRange(START_FOR_EMPTY_ROWS_TEST, END_FOR_EMPTY_ROWS_TEST);
TmfSignalManager.dispatchSignal(new TmfWindowRangeUpdatedSignal(this, range));
IWorkbenchPart part = viewBot.getViewReference().getPart(false);
assertTrue(part instanceof AbstractTimeGraphView);
AbstractTimeGraphView abstractTimeGraphView = (AbstractTimeGraphView) part;
viewBot.bot().waitUntil(ConditionHelpers.timeGraphRangeCondition(abstractTimeGraphView, Objects.requireNonNull(TmfTraceManager.getInstance().getActiveTrace()), range));
fBot.waitUntil(ConditionHelpers.windowRange(range));
SWTBotTimeGraph timeGraph = new SWTBotTimeGraph(viewBot.bot());
timeGraph.setFocus();
int count = getVisibleItems(timeGraph);
viewBot.toolbarButton(HIDE_EMPTY_ROWS).click();
/* Verify that number active entries changed */
SWTBotUtils.waitUntil(graph -> getVisibleItems(graph) < count, timeGraph, () -> "Fewer number of visible entries expected: (count: " + count + ", actual: " + getVisibleItems(timeGraph) + ")");
timeGraph.setFocus();
viewBot.toolbarButton(HIDE_EMPTY_ROWS).click();
/* Verify that number active entries changed */
SWTBotUtils.waitUntil(graph -> getVisibleItems(graph) == count, timeGraph, () -> "More number of visible entries expected: (count: " + count + ", actual: " + getVisibleItems(timeGraph) + ")");
}
use of org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractTimeGraphView in project tracecompass by tracecompass.
the class ResourcesViewTest method timeGraphIsReadyCondition.
private void timeGraphIsReadyCondition(@NonNull TmfTimeRange selectionRange, @NonNull ITmfTimestamp visibleTime) {
IWorkbenchPart part = getViewBot().getViewReference().getPart(false);
fBot.waitUntil(ConditionHelpers.timeGraphIsReadyCondition((AbstractTimeGraphView) part, selectionRange, visibleTime));
}
use of org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractTimeGraphView in project tracecompass by tracecompass.
the class FindDialogTestBase method before.
/**
* Initialize the test and open the timegraph view and the find dialog
*/
@Before
public void before() {
String title = getViewTitle();
fViewBot = fBot.viewByTitle(title);
fViewBot.show();
fTimeGraphBot = new SWTBotTimeGraph(fViewBot.bot());
TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(this, START_TIME));
fBot.waitUntil(ConditionHelpers.timeGraphIsReadyCondition((AbstractTimeGraphView) fViewBot.getViewReference().getPart(false), new TmfTimeRange(START_TIME, START_TIME), START_TIME));
fViewBot.setFocus();
openDialog(fViewBot);
fFindText = getFindText();
}
use of org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractTimeGraphView in project tracecompass by tracecompass.
the class FlameChartViewTest method beforeTest.
/**
* Open a trace in an editor
*/
@Before
public void beforeTest() {
SWTBotUtils.createProject(PROJECT_NAME);
SWTBotTreeItem treeItem = SWTBotUtils.selectTracesFolder(sfBot, PROJECT_NAME);
assertNotNull(treeItem);
final CtfTestTrace cygProfile = CtfTestTrace.CYG_PROFILE;
final File file = new File(CtfTmfTestTraceUtils.getTrace(cygProfile).getPath());
CtfTmfTestTraceUtils.dispose(cygProfile);
SWTBotUtils.openTrace(PROJECT_NAME, file.getAbsolutePath(), UST_ID);
SWTBotUtils.activateEditor(sfBot, file.getName());
SWTBotUtils.openView(FlameChartView.ID);
WaitUtils.waitForJobs();
final SWTBotView viewBot = sfBot.viewById(FlameChartView.ID);
IWorkbenchPart part = viewBot.getViewReference().getPart(false);
sfBot.waitUntil(ConditionHelpers.timeGraphIsReadyCondition((AbstractTimeGraphView) part, new TmfTimeRange(START_TIME, START_TIME), START_TIME));
}
Aggregations