use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class ChartExportTest method testChartExportPNG.
@Test
public void testChartExportPNG() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
doLaunch(config, "testDefaults");
IEditorInput input = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorInput();
assertTrue("input must be ChartEditorInput", input instanceof ChartEditorInput);
Composite control = ((ChartEditorInput) input).getChart().getChartControl();
if (control.getSize().x == 0 || control.getSize().y == 0) {
// Manually resize the composite to non-zero width/height so it can be saved
control.setSize(10, 10);
}
SaveChartAction saveChartAction = (SaveChartAction) getToolbarAction(MassifViewPart.SAVE_CHART_ACTION);
assertNotNull(saveChartAction);
for (IPath path : paths) {
saveAsPath(saveChartAction, path);
}
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class ChartTests method byteScalingHelper.
private void byteScalingHelper(int ix, long times, long bytes, String testName) throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, // $NON-NLS-1$
String.valueOf(bytes) + " " + String.valueOf(times));
wc.setAttribute(MassifLaunchConstants.ATTR_MASSIF_TIMEUNIT, MassifLaunchConstants.TIME_B);
config = wc.doSave();
doLaunch(config, testName);
IAction chartAction = getChartAction();
assertNotNull(chartAction);
chartAction.run();
IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
assertTrue(part.getEditorInput() instanceof ChartEditorInput);
ChartEditorInput input = (ChartEditorInput) part.getEditorInput();
HeapChart chart = input.getChart();
assertEquals(HeapChart.getByteUnits()[ix], chart.getXUnits());
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class DoubleClickTest method testDoubleClickFile.
@Test
public void testDoubleClickFile() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(MassifLaunchConstants.ATTR_MASSIF_DETAILEDFREQ, 2);
wc.doSave();
// $NON-NLS-1$
doLaunch(config, "testDoubleClickFile");
doDoubleClick();
checkFile(proj.getProject(), node);
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class DoubleClickTest method testDoubleClickLine.
@Test
public void testDoubleClickLine() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(MassifLaunchConstants.ATTR_MASSIF_DETAILEDFREQ, 2);
wc.doSave();
// $NON-NLS-1$
doLaunch(config, "testDoubleClickLine");
doDoubleClick();
checkLine(node);
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class ExpandCollapseTest method testExpand.
@Test
public void testExpand() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
doLaunch(config, "testDefaults");
MassifViewPart view = (MassifViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
viewer = view.getTreeViewer().getViewer();
contextMenu = viewer.getTree().getMenu();
// Select first snapshot and expand it
MassifHeapTreeNode[] snapshots = (MassifHeapTreeNode[]) viewer.getInput();
MassifHeapTreeNode snapshot = snapshots[0];
TreeSelection selection = new TreeSelection(new TreePath(new Object[] { snapshot }));
viewer.setSelection(selection);
contextMenu.notifyListeners(SWT.Show, null);
contextMenu.getItem(0).notifyListeners(SWT.Selection, null);
checkExpanded(snapshot, true);
}
Aggregations