use of org.netxms.ui.eclipse.objectmanager.dialogs.ObjectUrlEditDialog in project netxms by netxms.
the class ExternalResources method addUrl.
/**
* Add new URL
*/
private void addUrl() {
ObjectUrlEditDialog dlg = new ObjectUrlEditDialog(getShell(), null, null);
if (dlg.open() != Window.OK)
return;
urls.add(new ObjectUrl(urls.size(), dlg.getUrl(), dlg.getDescription()));
viewer.refresh();
modified = true;
}
use of org.netxms.ui.eclipse.objectmanager.dialogs.ObjectUrlEditDialog in project netxms by netxms.
the class ExternalResources method editUrl.
/**
* Edit selected URL
*/
private void editUrl() {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if (selection.size() != 1)
return;
ObjectUrl url = (ObjectUrl) selection.getFirstElement();
ObjectUrlEditDialog dlg = new ObjectUrlEditDialog(getShell(), url.getUrl(), url.getDescription());
if (dlg.open() != Window.OK)
return;
int index = urls.indexOf(url);
urls.set(index, new ObjectUrl(url.getId(), dlg.getUrl(), dlg.getDescription()));
viewer.refresh();
viewer.setSelection(new StructuredSelection(urls.get(index)));
modified = true;
}
Aggregations