@Override
  public boolean canPrint(@NotNull DataContext dataContext) {
    Project project = CommonDataKeys.PROJECT.getData(dataContext);
    if (project == null) return false;
    VirtualFile file = CommonDataKeys.VIRTUAL_FILE.getData(dataContext);
    if (file != null && file.isDirectory()) return true;
    return CommonDataKeys.EDITOR.getData(dataContext) != null ||
           !getSelectedPsiFiles(dataContext).isEmpty();
  }
@Override
  public boolean canPrint(@NotNull DataContext dataContext)