use of org.netxms.ui.eclipse.eventmanager.dialogs.EditEventTemplateDialog in project netxms by netxms.
the class EventObjectList method createNewEventTemplate.
/**
* Create new event template
*/
protected void createNewEventTemplate() {
final EventTemplate etmpl = new EventTemplate(0);
EditEventTemplateDialog dlg = new EditEventTemplateDialog(getShell().getShell(), etmpl, false);
if (dlg.open() == Window.OK)
modifyEventObject(etmpl, true);
}
use of org.netxms.ui.eclipse.eventmanager.dialogs.EditEventTemplateDialog in project netxms by netxms.
the class EventObjectList method editEventTemplate.
/**
* Edit currently selected event template
*/
protected void editEventTemplate() {
final IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if (selection.size() != 1)
return;
if (selection.getFirstElement() instanceof EventGroup) {
final EventGroup group = new EventGroup((EventGroup) selection.getFirstElement());
EditEventGroupDialog dlg = new EditEventGroupDialog(getShell().getShell(), group);
if (dlg.open() == Window.OK)
modifyEventObject(group, false);
else
return;
}
final EventTemplate etmpl = new EventTemplate((EventTemplate) selection.getFirstElement());
EditEventTemplateDialog dlg = new EditEventTemplateDialog(getShell().getShell(), etmpl, false);
if (dlg.open() == Window.OK)
modifyEventObject(etmpl, false);
}
Aggregations