use of org.netxms.ui.eclipse.slm.dialogs.CreateBusinessServiceDialog in project netxms by netxms.
the class CreateBusinessService method run.
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
@Override
public void run(IAction action) {
final CreateBusinessServiceDialog dlg = new CreateBusinessServiceDialog(window.getShell());
if (dlg.open() != Window.OK)
return;
final NXCSession session = (NXCSession) ConsoleSharedData.getSession();
new ConsoleJob(Messages.get().CreateBusinessService_JobTitle, part, Activator.PLUGIN_ID, null) {
@Override
protected void runInternal(IProgressMonitor monitor) throws Exception {
session.createObject(new NXCObjectCreationData(AbstractObject.OBJECT_BUSINESSSERVICE, dlg.getName(), parentId));
}
@Override
protected String getErrorMessage() {
return String.format(Messages.get().CreateBusinessService_JobError, dlg.getName());
}
}.start();
}
Aggregations