Search in sources :

Example 1 with LinkEditor

use of org.netxms.ui.eclipse.networkmaps.views.helpers.LinkEditor in project netxms by netxms.

the class PredefinedMap method showLinkProperties.

/**
 * Show properties for currently selected link
 */
private void showLinkProperties() {
    updateObjectPositions();
    IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
    if ((selection.size() != 1) || !(selection.getFirstElement() instanceof NetworkMapLink))
        return;
    LinkEditor link = new LinkEditor((NetworkMapLink) selection.getFirstElement(), mapPage);
    PropertyDialog dlg = PropertyDialog.createDialogOn(getSite().getShell(), null, link);
    if (dlg != null) {
        dlg.open();
        if (link.isModified())
            saveMap();
    }
}
Also used : PropertyDialog(org.eclipse.ui.internal.dialogs.PropertyDialog) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) LinkEditor(org.netxms.ui.eclipse.networkmaps.views.helpers.LinkEditor) NetworkMapLink(org.netxms.client.maps.NetworkMapLink)

Aggregations

IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 PropertyDialog (org.eclipse.ui.internal.dialogs.PropertyDialog)1 NetworkMapLink (org.netxms.client.maps.NetworkMapLink)1 LinkEditor (org.netxms.ui.eclipse.networkmaps.views.helpers.LinkEditor)1