public static boolean areTooManyDocumentsInTheQueue(Collection<Document> documents) {
   if (documents.size() > 100) return true;
   int totalSize = 0;
   for (Document document : documents) {
     totalSize += document.getTextLength();
     if (totalSize > 10 * FileUtilRt.MEGABYTE) return true;
   }
   return false;
 }
 @Nullable
 public ResourceBundleEditorViewElement getSelectedElementIfOnlyOne() {
   final Collection<ResourceBundleEditorViewElement> selectedElements = getSelectedElements();
   return selectedElements.size() == 1 ? ContainerUtil.getFirstItem(selectedElements) : null;
 }