void (@NotNull List<? extends PsiElement> elements, @NotNull Collection<? super LineMarkerInfo<?>> result) { for (PsiElement element : elements) { ProgressManager.checkCanceled(); if (!(element instanceof IgnoreEntryFile)) { continue; } boolean isDirectory = element instanceof IgnoreEntryDirectory; if (!isDirectory) { IgnoreEntryFile entry = (IgnoreEntryFile)element; VirtualFile parent = element.getContainingFile().getVirtualFile().getParent(); Project project = element.getProject(); VirtualFile projectDir = project.getBaseDir(); if (parent == null || projectDir == null) { continue; } PatternCache patternCache = PatternCache.getInstance(element.getProject()); Pattern pattern = patternCache.createPattern(entry); isDirectory = pattern != null && isDirectoryExist(parent, pattern); } if (isDirectory) { final PsiElement leafElement = firstLeafOrNull(element); if (leafElement != null) { result.add(new LineMarkerInfo<>(leafElement, element.getTextRange(), PlatformIcons.FOLDER_ICON, null, null, GutterIconRenderer.Alignment.CENTER)); } } } }