void (SimpleColoredComponent renderer, Project project, Bookmark bookmark, boolean selected) { VirtualFile file = bookmark.getFile(); if (!file.isValid()) { return; } PsiElement fileOrDir = PsiUtilCore.findFileSystemItem(project, file); if (fileOrDir != null) { renderer.setIcon(fileOrDir.getIcon(0)); } String description = bookmark.getDescription(); if (!StringUtilRt.isEmptyOrSpaces(description)) { renderer.append(description + " ", SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES, true); } FileStatus fileStatus = FileStatusManager.getInstance(project).getStatus(file); TextAttributes attributes = new TextAttributes(fileStatus.getColor(), null, null, EffectType.LINE_UNDERSCORE, Font.PLAIN); renderer.append(file.getName(), SimpleTextAttributes.fromTextAttributes(attributes), true); if (bookmark.getLine() >= 0) { renderer.append(":", SimpleTextAttributes.GRAYED_ATTRIBUTES, true); renderer.append(String.valueOf(bookmark.getLine() + 1), SimpleTextAttributes.GRAYED_ATTRIBUTES, true); } renderer.append(" (" + VfsUtilCore.getRelativeLocation(file, project.getBaseDir()) + ")", SimpleTextAttributes.GRAY_ATTRIBUTES); if (!selected) { FileColorManager colorManager = FileColorManager.getInstance(project); if (fileOrDir instanceof PsiFile) { Color color = colorManager.getRendererBackground((PsiFile)fileOrDir); if (color != null) { renderer.setBackground(color); } } } }