WI-81268 IJ-CR-166951 move codestyle settings + formatter to xml.frontback

(cherry picked from commit fba1caa1101f6041bd6998d684bb49413b170090)

GitOrigin-RevId: cc48ee7377759fb4083d2c3213874ae92f44a6b7
This commit is contained in:
Maria Filippova
2025-06-11 14:14:16 +02:00
committed by intellij-monorepo-bot
parent 792ffcf24a
commit af8e33acd7
45 changed files with 139 additions and 88 deletions

View File

@@ -35,6 +35,8 @@
<applicationService serviceImplementation="com.intellij.application.options.editor.WebEditorOptions"/>
<virtualFileCustomDataProvider implementation="com.intellij.xml.HtmlCodeStyleSettingsCustomDataSynchronizer"/>
<lang.parserDefinition language="DTD" implementationClass="com.intellij.lang.dtd.DTDParserDefinition"/>
<lang.parserDefinition language="XML" implementationClass="com.intellij.lang.xml.XMLParserDefinition"/>
<lang.parserDefinition language="HTML" implementationClass="com.intellij.lang.html.HTMLParserDefinition"/>

View File

@@ -7,6 +7,7 @@
<module name="intellij.xml.psi" loading="embedded"/>
<module name="intellij.xml.psi.impl" loading="embedded"/>
<module name="intellij.xml.analysis" loading="embedded"/>
<module name="intellij.xml.frontback.impl" loading="embedded"/>
<module name="intellij.relaxng"/>
</content>
</idea-plugin>

View File

@@ -1,4 +1,4 @@
<idea-plugin>
<idea-plugin>>
<extensionPoints>
<extensionPoint qualifiedName="com.intellij.html.compatibleLanguage"
beanClass="com.intellij.lang.html.HtmlCompatibleMetaLanguage$HtmlCompatibleLanguageEP"
@@ -21,7 +21,6 @@
<extensionPoint name="xml.zenCodingGenerator" interface="com.intellij.codeInsight.template.emmet.generators.ZenCodingGenerator" dynamic="true"/>
<extensionPoint name="xml.zenCodingFilter" interface="com.intellij.codeInsight.template.emmet.filters.ZenCodingFilter" dynamic="true"/>
<extensionPoint name="xml.relatedToHtmlFilesContributor" interface="com.intellij.navigation.RelatedToHtmlFilesContributor" dynamic="true"/>
<extensionPoint name="html.codestyle.panel" interface="com.intellij.application.options.HtmlCodeStylePanelExtension" dynamic="true"/>
<extensionPoint name="html.scriptDocumentationProvider" interface="com.intellij.lang.documentation.DocumentationProvider" dynamic="true"/>
<extensionPoint name="webSmartKeysConfigurable" beanClass="com.intellij.application.options.editor.WebSmartKeysConfigurableEP" dynamic="true">
@@ -229,8 +228,6 @@
<codeInsight.wordCompletionFilter language="JSP" implementationClass="com.intellij.lang.xml.XmlWordCompletionFilter"/>
<codeInsight.wordCompletionFilter language="JSPX" implementationClass="com.intellij.lang.xml.XmlWordCompletionFilter"/>
<langCodeStyleSettingsProvider implementation="com.intellij.application.options.HtmlLanguageCodeStyleSettingsProvider"/>
<!-- XML -->
<quoteHandler fileType="XML" className="com.intellij.codeInsight.editorActions.XmlQuoteHandler"/>
<lang.quoteHandler language="XML" implementationClass="com.intellij.codeInsight.editorActions.XmlQuoteHandler"/>

View File

@@ -39,10 +39,6 @@ web.editor.configuration.title=HTML/CSS
xml.action.unwrap.enclosing.tag.name.description=Remove enclosing tag: {0}
xml.code.style.border.title.cdata=CDATA
xml.code.style.checkbox.keep.whitespace.inside=Keep whitespace inside
xml.code.style.label.whitespace.around=Whitespace around:
xml.editor.options.misc.title=XML/HTML
xml.editor.options.css.title=CSS
@@ -234,37 +230,18 @@ xml.tag.info.no.attributes=<no attributes>
intention.color.chooser.dialog=Choose color
intention.name.split.attributes=Put attributes on separate lines
intention.name.join.attributes=Put attributes on one line
editbox.keep.blank.lines=Keep blank lines:
dialog.edit.template.checkbox.xsl.text=XSL Text
checkbox.wrap.text=Wrap text
label.remove.new.line.before=Remove new line before:
checkbox.collapse.html.style.attribute=HTML 'style' attribute
inline.elements=Inline elements:
label.lines=lines
emmet.filter.comment.tags=Comment tags
label.keep.white.spaces.inside=Keep white spaces inside:
title.xml=XML
label.or.if.tag.size.more.than=or if tag size more than
checkbox.keep.line.breaks.in.text=Keep line breaks in text
checkbox.keep.line.breaks=Keep line breaks
dialog.edit.template.checkbox.html=&HTML
action.name.show.history.for.tag=Tag
checkbox.align.text=Align text
checkbox.align.attributes=Align attributes
checkbox.keep.white.spaces=Keep white spaces
checkbox.spaces.in.empty.tag=In empty tag
label.insert.new.line.before=Insert new line before:
label.do.not.indent.children.of=Do not indent children of:
html.label.new.line.before.first.attribute=New line before &first attribute:
checkbox.spaces.around.equals.in.attribute=Around "=" in attribute
checkbox.collapse.entities=XML entities
html.label.new.line.after.last.attribute=New line after &last attribute:
dialog.edit.template.checkbox.html.text=HTML Text
dialog.edit.template.checkbox.xml=&XML
don.t.break.if.inline.content=Don't break if inline content:
checkbox.spaces.around.tag.name=After tag name
checkbox.collapse.data.uri=Data URIs
generated.quote.enforce.format=Enforce on format
action.name.show.history.for.text=Text
inspection.javadoc.html.not.required.label.text=Additional not required html attributes:
checkbox.uniform.indent=Use HTML indents within <style> and <script> tags

View File

@@ -22,6 +22,13 @@ jvm_library(
"//platform/util",
"//platform/util:util-ui",
"//xml/xml-parser:parser",
"//platform/code-style-impl:codeStyle-impl",
"//platform/code-style-api:codeStyle",
"@lib//:fastutil-min",
"//platform/lang-impl",
"//platform/platform-impl:ide-impl",
"//platform/core-ui",
"//xml/xml-psi-api:psi",
],
runtime_deps = [":frontback-impl_resources"]
)

View File

@@ -17,5 +17,12 @@
<orderEntry type="module" module-name="intellij.platform.util" />
<orderEntry type="module" module-name="intellij.platform.util.ui" />
<orderEntry type="module" module-name="intellij.xml.parser" />
<orderEntry type="module" module-name="intellij.platform.codeStyle.impl" />
<orderEntry type="module" module-name="intellij.platform.codeStyle" />
<orderEntry type="library" name="fastutil-min" level="project" />
<orderEntry type="module" module-name="intellij.platform.lang.impl" />
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
<orderEntry type="module" module-name="intellij.platform.core.ui" />
<orderEntry type="module" module-name="intellij.xml.psi" />
</component>
</module>

View File

@@ -0,0 +1,10 @@
<!--suppress PluginXmlValidity -->
<idea-plugin>
<extensionPoints>
<extensionPoint name="html.codestyle.panel" interface="com.intellij.application.options.HtmlCodeStylePanelExtension" dynamic="true"/>
</extensionPoints>
<extensions defaultExtensionNs="com.intellij">
<langCodeStyleSettingsProvider implementation="com.intellij.application.options.HtmlLanguageCodeStyleSettingsProvider"/>
</extensions>
</idea-plugin>

View File

@@ -26,4 +26,38 @@ options.html.attribute.descriptor.comment=Comment
options.html.attribute.descriptor.entity.reference=Entity reference
options.html.attribute.descriptor.tag.name=Tag name
options.html.attribute.descriptor.tag.tree=Tag tree (level {0})
options.html.attribute.descriptor.tag=Tag
options.html.attribute.descriptor.tag=Tag
title.xml=XML
comments=Comments
checkbox.uniform.indent=Use HTML indents within <style> and <script> tags
preserve=Preserve
remove.keep.with.tags=Remove (keep with tags)
add.new.lines=Add new lines
checkbox.keep.white.spaces=Keep white spaces
checkbox.align.attributes=Align attributes
checkbox.wrap.text=Wrap text
checkbox.spaces.around.equals.in.attribute=Around "=" in attribute
checkbox.spaces.around.tag.name=After tag name
checkbox.spaces.in.empty.tag=In empty tag
editbox.keep.blank.lines=Keep blank lines:
checkbox.keep.line.breaks.in.text=Keep line breaks in text
checkbox.keep.line.breaks=Keep line breaks
xml.code.style.border.title.cdata=CDATA
xml.code.style.checkbox.keep.whitespace.inside=Keep whitespace inside
xml.code.style.label.whitespace.around=Whitespace around:
label.lines=[label.lines / messages/XmlCoreBundle]
label.or.if.tag.size.more.than=or if tag size more than
label.insert.new.line.before=Insert new line before:
label.remove.new.line.before=Remove new line before:
label.do.not.indent.children.of=Do not indent children of:
inline.elements=Inline elements:
label.keep.white.spaces.inside=Keep white spaces inside:
don.t.break.if.inline.content=Don't break if inline content:
generated.quote.enforce.format=Enforce on format
html.label.new.line.before.first.attribute=New line before &first attribute:
html.label.new.line.after.last.attribute=New line after &last attribute:
checkbox.align.text=Align text

View File

@@ -3,7 +3,7 @@
<grid id="97358" binding="myPanel" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="4" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="4" y="8" width="828" height="803"/>
<xy x="4" y="8" width="892" height="803"/>
</constraints>
<properties/>
<border type="none"/>
@@ -53,7 +53,7 @@
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="1" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="label.or.if.tag.size.more.than"/>
<text resource-bundle="messages/XmlCoreBundle" key="label.or.if.tag.size.more.than"/>
</properties>
</component>
<component id="547a0" class="javax.swing.JTextField" binding="myDoNotAlignChildrenMinSize">
@@ -69,7 +69,7 @@
<grid row="3" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="4" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="label.lines"/>
<text resource-bundle="messages/XmlCoreBundle" key="label.lines"/>
</properties>
</component>
<component id="fe20d" class="javax.swing.JLabel">
@@ -77,7 +77,7 @@
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="label.insert.new.line.before"/>
<text resource-bundle="messages/XmlCoreBundle" key="label.insert.new.line.before"/>
</properties>
</component>
<component id="160eb" class="javax.swing.JLabel">
@@ -85,7 +85,7 @@
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="label.remove.new.line.before"/>
<text resource-bundle="messages/XmlCoreBundle" key="label.remove.new.line.before"/>
</properties>
</component>
<component id="93fdf" class="javax.swing.JLabel">
@@ -93,7 +93,7 @@
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="label.do.not.indent.children.of"/>
<text resource-bundle="messages/XmlCoreBundle" key="label.do.not.indent.children.of"/>
</properties>
</component>
<component id="d6b64" class="com.intellij.ui.components.fields.ExpandableTextField" binding="myInsertNewLineTagNames" custom-create="true">
@@ -141,7 +141,7 @@
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="inline.elements"/>
<text resource-bundle="messages/XmlCoreBundle" key="inline.elements"/>
</properties>
</component>
<component id="1ade9" class="javax.swing.JLabel">
@@ -149,7 +149,7 @@
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="label.keep.white.spaces.inside"/>
<text resource-bundle="messages/XmlCoreBundle" key="label.keep.white.spaces.inside"/>
</properties>
</component>
<component id="a2288" class="javax.swing.JLabel">
@@ -157,7 +157,7 @@
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="don.t.break.if.inline.content"/>
<text resource-bundle="messages/XmlCoreBundle" key="don.t.break.if.inline.content"/>
</properties>
</component>
<component id="77303" class="com.intellij.ui.components.fields.ExpandableTextField" binding="myKeepWhiteSpacesTagNames" custom-create="true">
@@ -199,7 +199,7 @@
<grid row="10" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="generated.quote.enforce.format"/>
<text resource-bundle="messages/XmlCoreBundle" key="generated.quote.enforce.format"/>
</properties>
</component>
<component id="8ac3c" class="com.intellij.ui.components.JBLabel">
@@ -208,7 +208,7 @@
</constraints>
<properties>
<labelFor value="4240e"/>
<text resource-bundle="messages/XmlBundle" key="html.label.new.line.before.first.attribute"/>
<text resource-bundle="messages/XmlCoreBundle" key="html.label.new.line.before.first.attribute"/>
</properties>
</component>
<component id="4240e" class="com.intellij.openapi.ui.ComboBox" binding="myBeforeFirstAttributeCombo">
@@ -223,7 +223,7 @@
</constraints>
<properties>
<labelFor value="f09a3"/>
<text resource-bundle="messages/XmlBundle" key="html.label.new.line.after.last.attribute"/>
<text resource-bundle="messages/XmlCoreBundle" key="html.label.new.line.after.last.attribute"/>
</properties>
</component>
<component id="f09a3" class="com.intellij.openapi.ui.ComboBox" binding="myAfterLastAttributeCombo">
@@ -256,7 +256,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.align.attributes"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.align.attributes"/>
</properties>
</component>
<component id="165dc" class="javax.swing.JCheckBox" binding="myAlignText">
@@ -265,7 +265,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.align.text"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.align.text"/>
</properties>
</component>
<component id="959da" class="javax.swing.JCheckBox" binding="myKeepWhiteSpaces">
@@ -274,7 +274,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.keep.white.spaces"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.keep.white.spaces"/>
</properties>
</component>
<component id="bfd7f" class="javax.swing.JCheckBox" binding="myWrapText">
@@ -282,7 +282,7 @@
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="checkbox.wrap.text"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.wrap.text"/>
</properties>
</component>
</children>
@@ -303,7 +303,7 @@
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="checkbox.spaces.around.equals.in.attribute"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.spaces.around.equals.in.attribute"/>
</properties>
</component>
<component id="8f9a9" class="javax.swing.JCheckBox" binding="mySpacesAroundTagName">
@@ -311,7 +311,7 @@
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="checkbox.spaces.around.tag.name"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.spaces.around.tag.name"/>
</properties>
</component>
<component id="2830e" class="javax.swing.JCheckBox" binding="mySpaceInEmptyTag">
@@ -319,7 +319,7 @@
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="checkbox.spaces.in.empty.tag"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.spaces.in.empty.tag"/>
</properties>
</component>
</children>
@@ -340,7 +340,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.keep.line.breaks"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.keep.line.breaks"/>
</properties>
</component>
<component id="d4efa" class="javax.swing.JLabel">
@@ -356,7 +356,7 @@
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="editbox.keep.blank.lines"/>
<text resource-bundle="messages/XmlCoreBundle" key="editbox.keep.blank.lines"/>
</properties>
</component>
<component id="18182" class="javax.swing.JTextField" binding="myKeepBlankLines">
@@ -383,7 +383,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.keep.line.breaks.in.text"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.keep.line.breaks.in.text"/>
</properties>
</component>
</children>

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.application.options;
import com.intellij.application.options.codeStyle.RightMarginForm;
@@ -13,6 +13,7 @@ import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
import com.intellij.psi.formatter.xml.HtmlCodeStyleSettings;
import com.intellij.ui.TextAccessor;
import com.intellij.ui.components.JBCheckBox;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.ui.components.fields.ExpandableTextField;

View File

@@ -45,7 +45,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.align.attributes"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.align.attributes"/>
</properties>
</component>
<component id="959da" class="javax.swing.JCheckBox" binding="myKeepWhiteSpaces">
@@ -54,7 +54,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.keep.white.spaces"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.keep.white.spaces"/>
</properties>
</component>
<component id="c5160" class="javax.swing.JCheckBox" binding="myWrapText">
@@ -63,7 +63,7 @@
</constraints>
<properties>
<margin top="2" left="0" bottom="2" right="3"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.wrap.text"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.wrap.text"/>
</properties>
</component>
</children>
@@ -86,7 +86,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.spaces.around.equals.in.attribute"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.spaces.around.equals.in.attribute"/>
</properties>
</component>
<component id="8f9a9" class="javax.swing.JCheckBox" binding="mySpacesAfterTagName">
@@ -95,7 +95,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.spaces.around.tag.name"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.spaces.around.tag.name"/>
</properties>
</component>
<component id="e8439" class="javax.swing.JCheckBox" binding="myInEmptyTag">
@@ -104,7 +104,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.spaces.in.empty.tag"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.spaces.in.empty.tag"/>
</properties>
</component>
</children>
@@ -140,7 +140,7 @@
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="editbox.keep.blank.lines"/>
<text resource-bundle="messages/XmlCoreBundle" key="editbox.keep.blank.lines"/>
</properties>
</component>
<component id="d9f7d" class="javax.swing.JCheckBox" binding="myKeepLineBreaksInText">
@@ -149,7 +149,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.keep.line.breaks.in.text"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.keep.line.breaks.in.text"/>
</properties>
</component>
<component id="18182" class="javax.swing.JTextField" binding="myKeepBlankLines">
@@ -168,7 +168,7 @@
</constraints>
<properties>
<margin top="0" left="0" bottom="0" right="0"/>
<text resource-bundle="messages/XmlBundle" key="checkbox.keep.line.breaks"/>
<text resource-bundle="messages/XmlCoreBundle" key="checkbox.keep.line.breaks"/>
</properties>
</component>
</children>
@@ -182,7 +182,7 @@
<clientProperties>
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
</clientProperties>
<border type="etched" title-resource-bundle="messages/XmlBundle" title-key="xml.code.style.border.title.cdata"/>
<border type="etched" title-resource-bundle="messages/XmlCoreBundle" title-key="xml.code.style.border.title.cdata"/>
<children>
<component id="a3e4f" class="javax.swing.JLabel">
<constraints>
@@ -190,7 +190,7 @@
</constraints>
<properties>
<labelFor value="ecfb8"/>
<text resource-bundle="messages/XmlBundle" key="xml.code.style.label.whitespace.around"/>
<text resource-bundle="messages/XmlCoreBundle" key="xml.code.style.label.whitespace.around"/>
</properties>
</component>
<component id="9ab20" class="javax.swing.JCheckBox" binding="myKeepWhitespaceInsideCDATACheckBox">
@@ -198,7 +198,7 @@
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/XmlBundle" key="xml.code.style.checkbox.keep.whitespace.inside"/>
<text resource-bundle="messages/XmlCoreBundle" key="xml.code.style.checkbox.keep.whitespace.inside"/>
</properties>
</component>
<component id="ecfb8" class="javax.swing.JComboBox" binding="myWhiteSpaceAroundCDATA">

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.application.options;
import com.intellij.application.options.codeStyle.RightMarginForm;
@@ -13,7 +13,7 @@ import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
import com.intellij.psi.formatter.xml.XmlCodeStyleSettings;
import com.intellij.ui.CollectionComboBoxModel;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.xml.XmlBundle;
import com.intellij.xml.XmlCoreBundle;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
@@ -48,9 +48,9 @@ public class CodeStyleXmlPanel extends CodeStyleAbstractPanel{
fillWrappingCombo(myWrapAttributes);
addPanelToWatch(myPanel);
myWhiteSpaceAroundCDATA.setModel(new CollectionComboBoxModel<@Nls String>(
Arrays.asList(XmlBundle.message("preserve"),
XmlBundle.message("remove.keep.with.tags"),
XmlBundle.message("add.new.lines"))));
Arrays.asList(XmlCoreBundle.message("preserve"),
XmlCoreBundle.message("remove.keep.with.tags"),
XmlCoreBundle.message("add.new.lines"))));
}
@Override

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.application.options;
import com.intellij.application.options.codeStyle.CommenterForm;
@@ -13,7 +13,7 @@ import com.intellij.openapi.util.NlsContexts.TabTitle;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.util.ui.JBInsets;
import com.intellij.xml.XmlBundle;
import com.intellij.xml.XmlCoreBundle;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -26,7 +26,7 @@ public class GenerationCodeStylePanel extends CodeStyleAbstractPanel {
public GenerationCodeStylePanel(@NotNull CodeStyleSettings settings, Language language) {
super(settings);
myCommenterForm = new CommenterForm(language);
myCommenterForm.getCommenterPanel().setBorder(IdeBorderFactory.createTitledBorder(XmlBundle.message("comments"), true, new JBInsets(10, 10, 10, 10)));
myCommenterForm.getCommenterPanel().setBorder(IdeBorderFactory.createTitledBorder(XmlCoreBundle.message("comments"), true, new JBInsets(10, 10, 10, 10)));
}
@Override

View File

@@ -1,10 +1,10 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.application.options;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.psi.codeStyle.CommonCodeStyleSettings.IndentOptions;
import com.intellij.psi.formatter.xml.HtmlCodeStyleSettings;
import com.intellij.xml.XmlBundle;
import com.intellij.xml.XmlCoreBundle;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -16,7 +16,7 @@ public class HtmlIndentOptionsEditor extends SmartIndentOptionsEditor {
@Override
protected void addComponents() {
super.addComponents();
myUniformIndentCheckBox = new JCheckBox(XmlBundle.message("checkbox.uniform.indent"));
myUniformIndentCheckBox = new JCheckBox(XmlCoreBundle.message("checkbox.uniform.indent"));
add(myUniformIndentCheckBox);
}

View File

@@ -9,7 +9,7 @@ import com.intellij.openapi.util.NlsContexts.ConfigurableName;
import com.intellij.psi.codeStyle.*;
import com.intellij.psi.formatter.xml.XmlCodeStyleSettings;
import com.intellij.util.PlatformUtils;
import com.intellij.xml.XmlBundle;
import com.intellij.xml.XmlCoreBundle;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -118,6 +118,6 @@ public class XmlLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSetti
}
public static @ConfigurableName String getConfigurableDisplayNameText() {
return XmlBundle.message("title.xml");
return XmlCoreBundle.message("title.xml");
}
}

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi.formatter.xml;
import com.intellij.formatting.*;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi.formatter.xml;
import com.intellij.formatting.*;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi.formatter.xml;
import com.intellij.application.options.codeStyle.properties.CommaSeparatedValues;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi.formatter.xml;
import com.intellij.formatting.*;
@@ -102,7 +102,7 @@ public class XmlBlock extends AbstractXmlBlock {
return result;
}
else {
return EMPTY;
return AbstractBlock.EMPTY;
}
}
@@ -182,7 +182,7 @@ public class XmlBlock extends AbstractXmlBlock {
protected List<Block> splitComment() {
if (myNode.getElementType() != XmlElementType.XML_COMMENT) return EMPTY;
if (myNode.getElementType() != XmlElementType.XML_COMMENT) return AbstractBlock.EMPTY;
final ArrayList<Block> result = new ArrayList<>(3);
ASTNode child = myNode.getFirstChildNode();
boolean hasOuterLangElements = false;
@@ -197,7 +197,7 @@ public class XmlBlock extends AbstractXmlBlock {
return result;
}
else {
return EMPTY;
return AbstractBlock.EMPTY;
}
}

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi.formatter.xml;
import com.intellij.formatting.*;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi.formatter.xml;
import com.intellij.formatting.*;

View File

@@ -1,3 +1,4 @@
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi.xml;
import com.intellij.openapi.extensions.ExtensionPointName;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi.xml;
import com.intellij.lang.ASTNode;

View File

@@ -0,0 +1,12 @@
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.xml
import com.intellij.lang.html.HTMLLanguage
import com.intellij.psi.codeStyle.CodeStyleSettingsCustomDataSynchronizer
import com.intellij.psi.formatter.xml.HtmlCodeStyleSettings
class HtmlCodeStyleSettingsCustomDataSynchronizer : CodeStyleSettingsCustomDataSynchronizer<HtmlCodeStyleSettings>() {
override val language: HTMLLanguage get() = HTMLLanguage.INSTANCE
override val customCodeStyleSettingsClass: Class<HtmlCodeStyleSettings> get() = HtmlCodeStyleSettings::class.java
}

View File

@@ -24,13 +24,14 @@ import com.intellij.openapi.util.TextRange;
import com.intellij.psi.formatter.xml.XmlBlock;
import com.intellij.psi.formatter.xml.XmlFormattingPolicy;
import com.intellij.psi.formatter.xml.XmlTagBlock;
import com.intellij.xml.util.HtmlUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
import static com.intellij.xml.util.BasicHtmlUtil.SCRIPT_TAG_NAME;
public class TemplateXmlTagBlock extends XmlTagBlock implements IndentInheritingBlock {
private final AbstractXmlTemplateFormattingModelBuilder myBuilder;
private Indent myInheritedIndent;
@@ -85,6 +86,7 @@ public class TemplateXmlTagBlock extends XmlTagBlock implements IndentInheriting
}
boolean isScriptBlock() {
return HtmlUtil.isScriptTag(getTag());
var tag = getTag();
return tag != null && tag.getLocalName().equalsIgnoreCase(SCRIPT_TAG_NAME);
}
}