docs: private void addFileToList(final CmsFileInfo file, boolean invalid, boolean existingDeleted, boolean isTooLarge) {
  
          CmsListInfoBean infoBean = createInfoBean(file);
          CmsListItemWidget listItemWidget = new CmsListItemWidget(infoBean);
          listItemWidget.setIcon(CmsCoreProvider.get().getResourceTypeIcon(file));
          CmsCheckBox check = new CmsCheckBox();
          check.setChecked(false);
          if (!invalid && !isTooLarge && !existingDeleted) {
              if (file.getFileSize() == 0) {
                  check.setChecked(false);
              }
              check.setChecked(m_filesToUpload.containsKey(file.getFileName()));
              check.setTitle(file.getFileName());
              if (!m_selectionDone && file.getFileName().toLowerCase().endsWith(".zip")) {
                  final Widget unzip = createUnzipCheckBox(file);
                  addClickHandlerToCheckBox(check, unzip, file);
                  listItemWidget.addButton(unzip);
              } else {
                  addClickHandlerToCheckBox(check, null, file);
              }
          } else if (existingDeleted) {
              // is invalid
              String message = Messages.get().key(Messages.GUI_UPLOAD_FILE_EXISTING_DELETED_1, file.getFileName());
              check.disable(message);
              listItemWidget.setBackground(Background.RED);
              listItemWidget.setSubtitleLabel(message);
          } else if (isTooLarge) {
              String message = getFileSizeTooLargeMessage(file);
              check.disable(message);
              listItemWidget.setBackground(Background.RED);
              listItemWidget.setSubtitleLabel(message);
          } else {
              // is invalid
              String message = Messages.get().key(
                  Messages.GUI_UPLOAD_FILE_INVALID_NAME_2,
                  file.getFileName(),
                  CmsUploadButton.formatBytes(file.getFileSize()));
              check.disable(message);
              listItemWidget.setBackground(Background.RED);
              listItemWidget.setSubtitleLabel(message);
          }
  
          CmsListItem listItem = new CmsListItem(check, listItemWidget);
          m_fileList.addItem(listItem);
          m_listItems.put(file.getFileName(), listItem);
          doResize();
      }