void (@NotNull JTree tree, Object nodeValue, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { final Object value = ((DefaultMutableTreeNode)nodeValue).getUserObject(); if (value instanceof DirectoryChooser.ItemWrapper wrapper) { DirectoryChooser.PathFragment[] fragments = wrapper.getFragments(); for (DirectoryChooser.PathFragment fragment : fragments) { append(fragment.getText(), fragment.isCommon() ? SimpleTextAttributes.REGULAR_ATTRIBUTES : SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES); } setIcon(wrapper.getIcon()); } else if (value instanceof Module module) { append(myModuleGrouper.getShortenedName(module), SimpleTextAttributes.REGULAR_ATTRIBUTES); setIcon(ModuleType.get(module).getIcon()); } else if (value instanceof ModuleGroup moduleGroup) { append(moduleGroup.toString(), SimpleTextAttributes.REGULAR_ATTRIBUTES); setIcon(PlatformIcons.CLOSED_MODULE_GROUP_ICON); } }