use of org.eclipse.linuxtools.internal.gprof.action.SwitchSampleTimeAction in project linuxtools by eclipse.
the class GprofTest method changeMode.
private void changeMode(GmonView view, boolean timeModeRequested) {
AbstractSTTreeViewer gmonViewer = (AbstractSTTreeViewer) view.getSTViewer();
GmonDecoder decoder = (GmonDecoder) gmonViewer.getInput();
int prof_rate = decoder.getHistogramDecoder().getProfRate();
if (prof_rate == 0) {
return;
}
TreeColumn tc = gmonViewer.getViewer().getTree().getColumn(1);
SampleProfField spf = (SampleProfField) tc.getData();
if (spf.getColumnHeaderText().endsWith("Samples") ^ !timeModeRequested) {
new SwitchSampleTimeAction(view).run();
}
}
use of org.eclipse.linuxtools.internal.gprof.action.SwitchSampleTimeAction in project linuxtools by eclipse.
the class GmonView method createActions.
@Override
protected void createActions() {
super.createActions();
action1 = new SwitchContentProviderAction("Display function call graph", "icons/ch_callees.png", getSTViewer().getViewer(), // $NON-NLS-1$ //$NON-NLS-2$
CallGraphContentProvider.sharedInstance);
action2 = new SwitchContentProviderAction("Sort samples per file", "icons/c_file_obj.gif", getSTViewer().getViewer(), // $NON-NLS-1$ //$NON-NLS-2$
FileHistogramContentProvider.sharedInstance);
action3 = new SwitchContentProviderAction("Sort samples per function", "icons/function_obj.gif", getSTViewer().getViewer(), // $NON-NLS-1$ //$NON-NLS-2$
FunctionHistogramContentProvider.sharedInstance);
action4 = new SwitchContentProviderAction("Sort samples per line", "icons/line_obj.gif", getSTViewer().getViewer(), // $NON-NLS-1$ //$NON-NLS-2$
FlatHistogramContentProvider.sharedInstance);
switchSampleTime = new SwitchSampleTimeAction(this);
}
Aggregations