void (@NotNull ProgressIndicator indicator) { //for non project directories ensure refreshed directory VfsUtil.markDirtyAndRefresh(false, true, true, virtualFile); final VirtualFile[] files = virtualFile.isDirectory() ? virtualFile.getChildren() : new VirtualFile[] {virtualFile}; try { for (final VirtualFile inspectionFile : files) { if (inspectionFile.isDirectory()) continue; final String shortName = inspectionFile.getNameWithoutExtension(); final String extension = inspectionFile.getExtension(); Path inspectionIoFile = inspectionFile.toNioPath(); try { if (shortName.equals(InspectionsResultUtil.DESCRIPTIONS)) { profileName[0] = ReadAction.compute(() -> OfflineViewParseUtil.parseProfileName(inspectionIoFile)); } else if (StdFileTypes.XML.getDefaultExtension().equals(extension)) { resMap.put(shortName, ReadAction.compute(() -> OfflineViewParseUtil.parse(inspectionIoFile))); } } catch (Exception e) { throw new RuntimeException("Can't read file: " + inspectionFile.getName(), e); } } if (profileName[0] == null) { profileName[0] = virtualFile.getNameWithoutExtension(); } } catch (final Exception e) { //all parse exceptions ApplicationManager.getApplication() .invokeLater(() -> Messages.showInfoMessage(ExceptionUtil.getThrowableText(e), InspectionsBundle.message("offline.view.parse.exception.title"))); throw new ProcessCanceledException(e); //cancel process } }