use of org.netxms.ui.eclipse.reporter.widgets.internal.ReportTreeLabelProvider in project netxms by netxms.
the class ReportNavigator method createPartControl.
/* (non-Javadoc)
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createPartControl(Composite parent) {
session = (NXCSession) ConsoleSharedData.getSession();
reportTree = new TreeViewer(parent, SWT.NONE);
reportTree.setContentProvider(new ReportTreeContentProvider());
reportTree.setLabelProvider(new ReportTreeLabelProvider());
// reportTree.setInput(session);
createActions();
contributeToActionBars();
createPopupMenu();
getSite().setSelectionProvider(reportTree);
sessionListener = new SessionListener() {
@Override
public void notificationHandler(SessionNotification n) {
if ((n.getCode() == SessionNotification.OBJECT_CHANGED) && (n.getObject() instanceof DashboardRoot)) {
reportTree.getTree().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
refresh();
}
});
}
}
};
session.addListener(sessionListener);
refresh();
}
Aggregations