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