JComponent (final ContentFolderRef folderRef, @Nullable ModuleSourceRootEditHandler<?> editor) { final String tooltipText; if (folderRef.getFile() != null && getContentEntry().getFile() != null) { if (editor != null) { tooltipText = editor.getUnmarkRootButtonText(); } else if (folderRef.getContentFolder() instanceof ExcludeFolder) { tooltipText = ProjectBundle.message("module.paths.include.excluded.tooltip"); } else { tooltipText = null; } } else { tooltipText = ProjectBundle.message("module.paths.remove.tooltip"); } return new IconActionComponent(AllIcons.Actions.Close, AllIcons.Actions.CloseHovered, tooltipText, () -> myCallback.deleteContentFolder(getContentEntry(), folderRef)); }