use of org.netxms.ui.eclipse.topology.dialogs.EnterIpAddressDlg in project netxms by netxms.
the class FindIpAddress method run.
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
@Override
public void run(IAction action) {
final EnterIpAddressDlg dlg = new EnterIpAddressDlg(window.getShell());
if (dlg.open() != Window.OK)
return;
final NXCSession session = (NXCSession) ConsoleSharedData.getSession();
new ConsoleJob(String.format(Messages.get().FindIpAddress_JobTitle, dlg.getIpAddress().getHostAddress()), null, Activator.PLUGIN_ID, null) {
@Override
protected void runInternal(IProgressMonitor monitor) throws Exception {
final ConnectionPoint cp = session.findConnectionPoint((int) dlg.getZoneId(), dlg.getIpAddress());
runInUIThread(new Runnable() {
@Override
public void run() {
HostSearchResults.showConnection(cp);
}
});
}
@Override
protected String getErrorMessage() {
return String.format(Messages.get().FindIpAddress_JobError, dlg.getIpAddress().getHostAddress());
}
}.start();
}
Aggregations