prefer non-qualified xml completion variants (IDEA-115355)

This commit is contained in:
peter
2013-11-11 09:21:46 +01:00
parent add165a775
commit b07e674c55
@@ -15,6 +15,7 @@
*/
package com.intellij.psi.impl.source.xml;
import com.intellij.codeInsight.completion.PrioritizedLookupElement;
import com.intellij.codeInsight.completion.XmlTagInsertHandler;
import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.codeInsight.lookup.LookupElementBuilder;
@@ -69,11 +70,10 @@ public class DefaultXmlTagNameProvider implements XmlTagNameProvider {
lookupElement = lookupElement.withIcon(((PsiPresentableMetaData)descriptor).getIcon());
}
if (xmlExtension.useXmlTagInsertHandler()) {
elements.add(lookupElement.withInsertHandler(XmlTagInsertHandler.INSTANCE));
}
else {
elements.add(lookupElement);
lookupElement = lookupElement.withInsertHandler(XmlTagInsertHandler.INSTANCE);
}
elements.add(PrioritizedLookupElement.withPriority(lookupElement, separator > 0 ? 0 : 1));
}
}