List<VirtualFile> (@NotNull Project project) { List<VirtualFile> historyFiles = EditorHistoryManager.getInstance(project).getFileList(); LinkedHashSet<VirtualFile> result = new LinkedHashSet<>(historyFiles); Arrays.asList(FileEditorManager.getInstance(project).getOpenFiles()).forEach(result::remove); return ContainerUtil.reverse(new ArrayList<>(result)); }