String (XmlTag tag) { CodeStyleSettings settings = CodeStyle.getSettings(tag.getContainingFile()); boolean html = HtmlUtil.isHtmlTag(tag); boolean needsSpace = (html && settings.getCustomSettings(HtmlCodeStyleSettings.class).HTML_SPACE_INSIDE_EMPTY_TAG) || (!html && settings.getCustomSettings(XmlCodeStyleSettings.class).XML_SPACE_INSIDE_EMPTY_TAG); return needsSpace ? " />" : "/>"; }