Esempio n. 1
0
 @Override
 public boolean isEnabled(CommandContext context, Selection selection) {
   if (selection.isEmpty()) {
     return false;
   }
   CopyAndPaste dao = getDao(context.getScreen());
   for (SelectionItem item : selection) {
     if (!dao.canCopy(item.getObject())) {
       return false;
     }
   }
   return true;
 }