diff --git a/platform/platform-resources/src/META-INF/XmlPlugin.xml b/platform/platform-resources/src/META-INF/XmlPlugin.xml
index d9319f3e6fae..98b39a2de6cf 100644
--- a/platform/platform-resources/src/META-INF/XmlPlugin.xml
+++ b/platform/platform-resources/src/META-INF/XmlPlugin.xml
@@ -290,7 +290,6 @@
-
diff --git a/resources-en/src/search/searchableOptions.xml b/resources-en/src/search/searchableOptions.xml
index c7e11142f9e6..fefd99924c62 100644
--- a/resources-en/src/search/searchableOptions.xml
+++ b/resources-en/src/search/searchableOptions.xml
@@ -622,6 +622,9 @@
+
+
+
diff --git a/xml/impl/src/com/intellij/application/options/editor/WebEditorOptions.java b/xml/impl/src/com/intellij/application/options/editor/WebEditorOptions.java
index cd18ce3cc99f..5d6dc1cc9580 100644
--- a/xml/impl/src/com/intellij/application/options/editor/WebEditorOptions.java
+++ b/xml/impl/src/com/intellij/application/options/editor/WebEditorOptions.java
@@ -42,6 +42,7 @@ public class WebEditorOptions implements PersistentStateComponent
-
+
@@ -37,9 +37,18 @@
+
+
+
+
+
+
+
+
+
diff --git a/xml/impl/src/com/intellij/application/options/editor/WebEditorOptionsProvider.java b/xml/impl/src/com/intellij/application/options/editor/WebEditorOptionsProvider.java
index 722928855abf..698797e30497 100644
--- a/xml/impl/src/com/intellij/application/options/editor/WebEditorOptionsProvider.java
+++ b/xml/impl/src/com/intellij/application/options/editor/WebEditorOptionsProvider.java
@@ -28,6 +28,7 @@ public class WebEditorOptionsProvider implements EditorOptionsProvider {
private JCheckBox myAutomaticallyInsertClosingTagCheckBox;
private JCheckBox myAutomaticallyInsertRequiredAttributesCheckBox;
private JCheckBox myAutomaticallyStartAttributeAfterCheckBox;
+ private JCheckBox myEnableZenCodingCheckBox;
public String getDisplayName() {
return XmlBundle.message("web.editor.configuration.title");
@@ -47,9 +48,10 @@ public class WebEditorOptionsProvider implements EditorOptionsProvider {
public boolean isModified() {
final WebEditorOptions xmlEditorOptions = WebEditorOptions.getInstance();
- return xmlEditorOptions.isAutomaticallyInsertClosingTag() != myAutomaticallyInsertClosingTagCheckBox.isSelected()
- || xmlEditorOptions.isAutomaticallyInsertRequiredAttributes() != myAutomaticallyInsertRequiredAttributesCheckBox.isSelected()
- || xmlEditorOptions.isAutomaticallyStartAttribute() != myAutomaticallyStartAttributeAfterCheckBox.isSelected();
+ return xmlEditorOptions.isAutomaticallyInsertClosingTag() != myAutomaticallyInsertClosingTagCheckBox.isSelected() ||
+ xmlEditorOptions.isAutomaticallyInsertRequiredAttributes() != myAutomaticallyInsertRequiredAttributesCheckBox.isSelected() ||
+ xmlEditorOptions.isAutomaticallyStartAttribute() != myAutomaticallyStartAttributeAfterCheckBox.isSelected() ||
+ xmlEditorOptions.isZenCodingEnabled() != myEnableZenCodingCheckBox.isSelected();
}
public void apply() throws ConfigurationException {
@@ -57,6 +59,7 @@ public class WebEditorOptionsProvider implements EditorOptionsProvider {
xmlEditorOptions.setAutomaticallyInsertClosingTag(myAutomaticallyInsertClosingTagCheckBox.isSelected());
xmlEditorOptions.setAutomaticallyInsertRequiredAttributes(myAutomaticallyInsertRequiredAttributesCheckBox.isSelected());
xmlEditorOptions.setAutomaticallyStartAttribute(myAutomaticallyStartAttributeAfterCheckBox.isSelected());
+ xmlEditorOptions.setEnableZenCoding(myEnableZenCodingCheckBox.isSelected());
}
public void reset() {
@@ -64,6 +67,7 @@ public class WebEditorOptionsProvider implements EditorOptionsProvider {
myAutomaticallyInsertClosingTagCheckBox.setSelected(xmlEditorOptions.isAutomaticallyInsertClosingTag());
myAutomaticallyInsertRequiredAttributesCheckBox.setSelected(xmlEditorOptions.isAutomaticallyInsertRequiredAttributes());
myAutomaticallyStartAttributeAfterCheckBox.setSelected(xmlEditorOptions.isAutomaticallyStartAttribute());
+ myEnableZenCodingCheckBox.setSelected(xmlEditorOptions.isZenCodingEnabled());
}
public void disposeUIResources() {
diff --git a/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettings.java b/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettings.java
deleted file mode 100644
index a344d188cdd5..000000000000
--- a/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettings.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2000-2010 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.intellij.codeInsight.template;
-
-import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
-import com.intellij.openapi.components.State;
-import com.intellij.openapi.components.Storage;
-import com.intellij.util.xmlb.XmlSerializerUtil;
-
-/**
- * @author Eugene.Kudelevsky
- */
-@State(
- name="DuplocatorSettings",
- storages = {
- @Storage(
- id="DuplocatorSettings",
- file="$APP_CONFIG$/other.xml"
- )}
-)
-public class ZenCodingSettings implements PersistentStateComponent {
- public boolean ENABLED = true;
-
- public static ZenCodingSettings getInstance() {
- return ServiceManager.getService(ZenCodingSettings.class);
- }
-
- public ZenCodingSettings getState() {
- return this;
- }
-
- public void loadState(ZenCodingSettings state) {
- XmlSerializerUtil.copyBean(state, this);
- }
-}
diff --git a/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettingsConfigurable.java b/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettingsConfigurable.java
deleted file mode 100644
index b50e4bf06a46..000000000000
--- a/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettingsConfigurable.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2000-2010 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.intellij.codeInsight.template;
-
-import com.intellij.openapi.options.ConfigurationException;
-import com.intellij.openapi.options.SearchableConfigurable;
-import com.intellij.xml.XmlBundle;
-import org.jetbrains.annotations.Nls;
-
-import javax.swing.*;
-
-/**
- * @author Eugene.Kudelevsky
- */
-public class ZenCodingSettingsConfigurable implements SearchableConfigurable {
- private ZenCodingSettingsPanel myPanel;
-
- public String getId() {
- return getHelpTopic();
- }
-
- public Runnable enableSearch(String option) {
- return null;
- }
-
- @Nls
- public String getDisplayName() {
- return XmlBundle.message("zen.coding.settings");
- }
-
- public Icon getIcon() {
- return null;
- }
-
- public String getHelpTopic() {
- return null;
- }
-
- public JComponent createComponent() {
- if (myPanel == null) {
- myPanel = new ZenCodingSettingsPanel();
- }
- return myPanel.getComponent();
- }
-
- public boolean isModified() {
- return myPanel != null && myPanel.isModified();
- }
-
- public void apply() throws ConfigurationException {
- if (myPanel != null) {
- myPanel.apply();
- }
- }
-
- public void reset() {
- if (myPanel != null) {
- myPanel.reset();
- }
- }
-
- public void disposeUIResources() {
- myPanel = null;
- }
-}
diff --git a/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettingsPanel.form b/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettingsPanel.form
deleted file mode 100644
index 0cb05d306d38..000000000000
--- a/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettingsPanel.form
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
diff --git a/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettingsPanel.java b/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettingsPanel.java
deleted file mode 100644
index 5bbc95e8475a..000000000000
--- a/xml/impl/src/com/intellij/codeInsight/template/ZenCodingSettingsPanel.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2000-2010 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.intellij.codeInsight.template;
-
-import javax.swing.*;
-
-/**
- * @author Eugene.Kudelevsky
- */
-public class ZenCodingSettingsPanel {
- private JPanel myPanel;
- private JCheckBox myEnableZenCodingCheckBox;
-
- public JPanel getComponent() {
- return myPanel;
- }
-
- public boolean isModified() {
- ZenCodingSettings settings = ZenCodingSettings.getInstance();
- return settings.ENABLED != myEnableZenCodingCheckBox.isSelected();
- }
-
- public void apply() {
- ZenCodingSettings settings = ZenCodingSettings.getInstance();
- settings.ENABLED = myEnableZenCodingCheckBox.isSelected();
- }
-
- public void reset() {
- ZenCodingSettings settings = ZenCodingSettings.getInstance();
- myEnableZenCodingCheckBox.setSelected(settings.ENABLED);
- }
-}