use of org.netxms.ui.eclipse.objectview.widgets.helpers.SoftwareInventoryContentProvider in project netxms by netxms.
the class SoftwareInventory method createTreeViewer.
/**
* Create viewer for tree mode
*/
private void createTreeViewer() {
viewer = new SortableTreeViewer(this, names, widths, 0, SWT.UP, SWT.MULTI | SWT.FULL_SELECTION);
WidgetHelper.restoreColumnViewerSettings(viewer, Activator.getDefault().getDialogSettings(), configPrefix);
viewer.getControl().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
WidgetHelper.saveColumnViewerSettings(viewer, Activator.getDefault().getDialogSettings(), configPrefix);
}
});
viewer.setContentProvider(new SoftwareInventoryContentProvider());
viewer.setLabelProvider(new SoftwarePackageLabelProvider(true));
viewer.setComparator(new SoftwarePackageComparator());
if (menuManager != null) {
Menu menu = menuManager.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
viewPart.getSite().registerContextMenu(menuManager, viewer);
}
}
Aggregations