use of org.erlide.cover.ui.views.helpers.StatsNameSorter in project erlide_eclipse by erlang.
the class CoverStatsView method createPartControl.
/**
* This is a callback that will allow us to create the viewer and initialize
* it.
*/
@Override
public void createPartControl(final Composite parent) {
// layout
final GridLayout containerLayout = new GridLayout(1, false);
containerLayout.marginWidth = 0;
containerLayout.marginHeight = 0;
containerLayout.verticalSpacing = 3;
parent.setLayout(containerLayout);
viewer = new TreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
drillDownAdapter = new DrillDownAdapter(viewer);
viewer.setContentProvider(new StatsViewContentProvider(getViewSite()));
viewer.setLabelProvider(new StatsViewLabelProvider());
viewer.setComparator(new StatsNameSorter());
viewer.setInput(getViewSite());
viewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
viewer.addSelectionChangedListener(viewerSelectionChanged);
createTableTree();
viewer.setInput(StatsTreeModel.getInstance());
// Create the help context id for the viewer's control
PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), "org.erlide.eunit.core.viewer");
makeActions();
hookContextMenu();
hookDoubleClickAction();
contributeToActionBars();
}
Aggregations