@Override
        public boolean visitFile(@NotNull VirtualFile file) {
          if (file.isDirectory() || !file.isValid() || !condition.value(file)) return true;
          Document document = FileDocumentManager.getInstance().getDocument(file);
          if (document == null) return true;
          RangeMarker caret = document.createRangeMarker(0, 0);
          result.add(new IdeDocumentHistoryImpl.PlaceInfo(file, new TextEditorState(), "text-editor", null, caret));
          return result.size() < 1000;
        }
@Override
        public boolean visitFile(@NotNull VirtualFile file)