Search in sources :

Example 1 with SwitchContentProviderAction

use of org.eclipse.linuxtools.internal.gprof.action.SwitchContentProviderAction 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);
}
Also used : SwitchContentProviderAction(org.eclipse.linuxtools.internal.gprof.action.SwitchContentProviderAction) SwitchSampleTimeAction(org.eclipse.linuxtools.internal.gprof.action.SwitchSampleTimeAction)

Example 2 with SwitchContentProviderAction

use of org.eclipse.linuxtools.internal.gprof.action.SwitchContentProviderAction in project linuxtools by eclipse.

the class GprofTest method testView.

@Test
public void testView() {
    GmonView view = GmonView.displayGprofView(gd, gmonFile.getAbsolutePath());
    SwitchContentProviderAction action = new SwitchContentProviderAction("testAction", "icons/ch_callees.png", /* to avoid error */
    view.getSTViewer().getViewer(), contentProvider);
    action.run();
    changeMode(view, timeMode);
    STJunitUtils.testCSVExport(view, dumpFile.getAbsolutePath(), refFile.getAbsolutePath());
}
Also used : SwitchContentProviderAction(org.eclipse.linuxtools.internal.gprof.action.SwitchContentProviderAction) GmonView(org.eclipse.linuxtools.internal.gprof.view.GmonView) Test(org.junit.Test)

Aggregations

SwitchContentProviderAction (org.eclipse.linuxtools.internal.gprof.action.SwitchContentProviderAction)2 SwitchSampleTimeAction (org.eclipse.linuxtools.internal.gprof.action.SwitchSampleTimeAction)1 GmonView (org.eclipse.linuxtools.internal.gprof.view.GmonView)1 Test (org.junit.Test)1