Search in sources :

Example 1 with FilePermissionDialog

use of org.netxms.ui.eclipse.datacollection.dialogs.FilePermissionDialog in project netxms by netxms.

the class FileDeliveryPolicyEditor method changePermissions.

/**
 * Change file permissions
 */
private void changePermissions() {
    IStructuredSelection selection = fileTree.getStructuredSelection();
    if (selection.size() != 1)
        return;
    PathElement element = (PathElement) selection.getFirstElement();
    FilePermissionDialog dlg = new FilePermissionDialog(getShell(), element.getPermissions(), element.getOwner(), element.getOwnerGroup());
    if (dlg.open() != Window.OK)
        return;
    element.setPermissions(dlg.getPermissions());
    element.setOwner(dlg.getOwner());
    element.setOwnerGroup(dlg.getGroup());
    fileTree.update(element, null);
    fireModifyListeners();
}
Also used : PathElement(org.netxms.ui.eclipse.datacollection.widgets.helpers.PathElement) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) FilePermissionDialog(org.netxms.ui.eclipse.datacollection.dialogs.FilePermissionDialog)

Aggregations

IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 FilePermissionDialog (org.netxms.ui.eclipse.datacollection.dialogs.FilePermissionDialog)1 PathElement (org.netxms.ui.eclipse.datacollection.widgets.helpers.PathElement)1