use of org.netxms.ui.eclipse.objectview.views.TabbedObjectView in project netxms by netxms.
the class SummaryTableWidget method showObjectDetails.
/**
* Show details for selected object
*/
private void showObjectDetails() {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if (selection.size() != 1)
return;
AbstractObject object = ((ObjectWrapper) selection.getFirstElement()).getObject();
if (object != null) {
try {
TabbedObjectView view = (TabbedObjectView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(TabbedObjectView.ID);
view.setObject(object);
} catch (PartInitException e) {
MessageDialogHelper.openError(getShell(), Messages.get().SummaryTableWidget_Error, String.format(Messages.get().SummaryTableWidget_CannotOpenObjectDetails, e.getLocalizedMessage()));
}
}
}
use of org.netxms.ui.eclipse.objectview.views.TabbedObjectView in project netxms by netxms.
the class AlarmList method showObjectDetails.
/**
* Show details for selected object
*/
private void showObjectDetails() {
IStructuredSelection selection = (IStructuredSelection) alarmViewer.getSelection();
if (selection.size() != 1)
return;
AbstractObject object = session.findObjectById(((Alarm) selection.getFirstElement()).getSourceObjectId());
if (object != null) {
try {
TabbedObjectView view = (TabbedObjectView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(TabbedObjectView.ID);
view.setObject(object);
} catch (PartInitException e) {
MessageDialogHelper.openError(getShell(), Messages.get().AlarmList_Error, Messages.get().AlarmList_OpenDetailsError + e.getLocalizedMessage());
}
}
}
Aggregations