summaryrefslogtreecommitdiff
path: root/xml/impl/src/com/intellij/codeInsight/editorActions
diff options
context:
space:
mode:
Diffstat (limited to 'xml/impl/src/com/intellij/codeInsight/editorActions')
-rw-r--r--xml/impl/src/com/intellij/codeInsight/editorActions/XmlEqTypedHandler.java2
-rw-r--r--xml/impl/src/com/intellij/codeInsight/editorActions/XmlSlashTypedHandler.java2
2 files changed, 3 insertions, 1 deletions
diff --git a/xml/impl/src/com/intellij/codeInsight/editorActions/XmlEqTypedHandler.java b/xml/impl/src/com/intellij/codeInsight/editorActions/XmlEqTypedHandler.java
index 656a061b9b4a..bd0d76c42d38 100644
--- a/xml/impl/src/com/intellij/codeInsight/editorActions/XmlEqTypedHandler.java
+++ b/xml/impl/src/com/intellij/codeInsight/editorActions/XmlEqTypedHandler.java
@@ -38,7 +38,7 @@ public class XmlEqTypedHandler extends TypedHandlerDelegate {
PsiElement at = file.findElementAt(editor.getCaretModel().getOffset() - 1);
PsiElement atParent = at != null ? at.getParent() : null;
if(atParent instanceof XmlAttribute && ((XmlAttribute)atParent).getValueElement() == null) {
- needToInsertQuotes = atParent instanceof XmlAttribute && ((XmlAttribute)atParent).getValueElement() == null;
+ needToInsertQuotes = ((XmlAttribute)atParent).getValueElement() == null;
}
}
}
diff --git a/xml/impl/src/com/intellij/codeInsight/editorActions/XmlSlashTypedHandler.java b/xml/impl/src/com/intellij/codeInsight/editorActions/XmlSlashTypedHandler.java
index c5e0ff307a94..729e6062c626 100644
--- a/xml/impl/src/com/intellij/codeInsight/editorActions/XmlSlashTypedHandler.java
+++ b/xml/impl/src/com/intellij/codeInsight/editorActions/XmlSlashTypedHandler.java
@@ -15,6 +15,7 @@
*/
package com.intellij.codeInsight.editorActions;
+import com.intellij.application.options.editor.WebEditorOptions;
import com.intellij.lang.ASTNode;
import com.intellij.lang.xml.XMLLanguage;
import com.intellij.openapi.editor.Editor;
@@ -71,6 +72,7 @@ public class XmlSlashTypedHandler extends TypedHandlerDelegate {
@Override
public Result charTyped(final char c, final Project project, @NotNull final Editor editor, @NotNull final PsiFile editedFile) {
+ if (!WebEditorOptions.getInstance().isAutoCloseTag()) return Result.CONTINUE;
if ((editedFile.getLanguage() instanceof XMLLanguage || editedFile.getViewProvider().getBaseLanguage() instanceof XMLLanguage) && c == '/') {
PsiDocumentManager.getInstance(project).commitAllDocuments();