if ((paths != null) && (paths.length > 0))
{
enableDelete = true;
for (TreePath p : paths)
{
BasicNode n = (BasicNode)p.getLastPathComponent();
enableDelete = entryPane.canDelete(n.getDN());
if (!enableDelete)
{
break;
}
}
}
popupDeleteMenuItem.setEnabled(enableDelete);
menuBar.deleteMenuItem.setEnabled(enableDelete);
boolean enableCopyDN = path != null;
popupCopyDNMenuItem.setEnabled(enableCopyDN);
menuBar.copyDNMenuItem.setEnabled(enableCopyDN);
boolean enableDuplicateEntry = enableCopyDN;
popupDuplicateEntryMenuItem.setEnabled(enableDuplicateEntry);
menuBar.duplicateEntryMenuItem.setEnabled(enableDuplicateEntry);
boolean enableAddToGroup = enableDelete;
popupAddToGroupMenuItem.setEnabled(enableAddToGroup);
menuBar.addToGroupMenuItem.setEnabled(enableAddToGroup);
boolean enableResetPassword = path != null;
if (enableResetPassword)
{
BasicNode node = (BasicNode)path.getLastPathComponent();
enableResetPassword = hasUserPassword(node.getObjectClassValues());
}
popupResetUserPasswordMenuItem.setEnabled(enableResetPassword);
menuBar.resetPasswordMenuItem.setEnabled(enableResetPassword);
// Assume that if we cannot delete, we cannot create a new path