diff --git a/platform/platform-resources-en/src/messages/XmlBundle.properties b/platform/platform-resources-en/src/messages/XmlBundle.properties index b3544974da38..53c4fc55aa1f 100644 --- a/platform/platform-resources-en/src/messages/XmlBundle.properties +++ b/platform/platform-resources-en/src/messages/XmlBundle.properties @@ -217,6 +217,8 @@ emmet.configuration.title=Emmet emmet.enable.label=&Enable XML Emmet emmet.filters.enabled.by.default=Filters enabled by default emmet.enable.preview=Enable &abbreviation preview +emmet.allow.compact.boolean.attributes=Allow &compact boolean attributes in HTML (use
instead of
) +emmet.boolean.attributes=Boolean attributes emmet.expand.abbreviation.with=Expand &abbreviation with title.cannot.create.html.file=Cannot create HTML file diff --git a/xml/impl/src/com/intellij/application/options/emmet/XmlEmmetConfigurable.form b/xml/impl/src/com/intellij/application/options/emmet/XmlEmmetConfigurable.form index 3d3f8f7790a2..01d1c6a2433a 100644 --- a/xml/impl/src/com/intellij/application/options/emmet/XmlEmmetConfigurable.form +++ b/xml/impl/src/com/intellij/application/options/emmet/XmlEmmetConfigurable.form @@ -3,12 +3,12 @@ - + - + @@ -38,7 +38,7 @@ - + @@ -51,6 +51,14 @@ + + + + + + + + diff --git a/xml/impl/src/com/intellij/application/options/emmet/XmlEmmetConfigurable.java b/xml/impl/src/com/intellij/application/options/emmet/XmlEmmetConfigurable.java index 764d74f94375..0b39891fb40e 100644 --- a/xml/impl/src/com/intellij/application/options/emmet/XmlEmmetConfigurable.java +++ b/xml/impl/src/com/intellij/application/options/emmet/XmlEmmetConfigurable.java @@ -40,6 +40,7 @@ public class XmlEmmetConfigurable implements UnnamedConfigurable, Disposable, Co private JBCheckBox myEnablePreviewJBCheckBox; private CheckBoxList myFiltersCheckBoxList; private JPanel myFiltersListPanel; + private JBCheckBox myAllowCompactBooleanAttributesJBCheckBox; public XmlEmmetConfigurable() { myEnableEmmetJBCheckBox.addActionListener(new ActionListener() { @@ -47,6 +48,7 @@ public class XmlEmmetConfigurable implements UnnamedConfigurable, Disposable, Co public void actionPerformed(ActionEvent e) { boolean selected = myEnableEmmetJBCheckBox.isSelected(); myEnablePreviewJBCheckBox.setEnabled(selected); + myAllowCompactBooleanAttributesJBCheckBox.setEnabled(selected); myFiltersCheckBoxList.setEnabled(selected); } }); @@ -74,6 +76,7 @@ public class XmlEmmetConfigurable implements UnnamedConfigurable, Disposable, Co EmmetOptions emmetOptions = EmmetOptions.getInstance(); return emmetOptions.isEmmetEnabled() != myEnableEmmetJBCheckBox.isSelected() || emmetOptions.isPreviewEnabled() != myEnablePreviewJBCheckBox.isSelected() || + emmetOptions.isCompactBooleanAllowed() != myAllowCompactBooleanAttributesJBCheckBox.isSelected() || !emmetOptions.getFiltersEnabledByDefault().equals(enabledFilters()); } @@ -82,6 +85,7 @@ public class XmlEmmetConfigurable implements UnnamedConfigurable, Disposable, Co EmmetOptions emmetOptions = EmmetOptions.getInstance(); emmetOptions.setEmmetEnabled(myEnableEmmetJBCheckBox.isSelected()); emmetOptions.setPreviewEnabled(myEnablePreviewJBCheckBox.isSelected()); + emmetOptions.setCompactBooleanAllowed(myAllowCompactBooleanAttributesJBCheckBox.isSelected()); emmetOptions.setFiltersEnabledByDefault(enabledFilters()); } @@ -92,6 +96,8 @@ public class XmlEmmetConfigurable implements UnnamedConfigurable, Disposable, Co myEnableEmmetJBCheckBox.setSelected(emmetOptions.isEmmetEnabled()); myEnablePreviewJBCheckBox.setEnabled(emmetOptions.isEmmetEnabled()); myEnablePreviewJBCheckBox.setSelected(emmetOptions.isPreviewEnabled()); + myAllowCompactBooleanAttributesJBCheckBox.setEnabled(emmetOptions.isEmmetEnabled()); + myAllowCompactBooleanAttributesJBCheckBox.setSelected(emmetOptions.isCompactBooleanAllowed()); Set enabledByDefault = emmetOptions.getFiltersEnabledByDefault(); for (ZenCodingFilter filter : ZenCodingFilter.getInstances()) {