void (@NotNull AnActionEvent e) { final Project project = e.getProject(); if (project == null) { return; } String m = "Started loading content"; LOG.info(m); System.out.println(m); long start = System.currentTimeMillis(); count.set(0); totalSize.set(0); ApplicationManagerEx.getApplicationEx().runProcessWithProgressSynchronously(() -> { ProjectRootManager.getInstance(project).getFileIndex().iterateContent(fileOrDir -> { if (fileOrDir.isDirectory() || fileOrDir.is(VFileProperty.SPECIAL)) { return true; } try { count.incrementAndGet(); byte[] bytes = FileUtil.loadFileBytes(new File(fileOrDir.getPath())); totalSize.addAndGet(bytes.length); ProgressManager.getInstance().getProgressIndicator().setText(fileOrDir.getPresentableUrl()); } catch (IOException e1) { LOG.error(e1); } return true; }); }, "Loading", false, project); long end = System.currentTimeMillis(); String message = "Finished loading content of " + count + " files. " + "Total size=" + StringUtil.formatFileSize(totalSize.get()) + ". " + "Elapsed=" + ((end - start) / 1000) + "sec."; LOG.info(message); System.out.println(message); }