提交 19efb9fe 编写于 作者: E Evgeny Gerashchenko

Got rid of live templates in completion after dot.

 #KT-1676 fixed
上级 3fa0561f
......@@ -55,8 +55,16 @@ public abstract class JetTemplateContextType extends TemplateContextType {
}
else if (element instanceof LeafPsiElement) {
IElementType elementType = ((LeafPsiElement) element).getElementType();
if (elementType == JetTokens.IDENTIFIER && !(element.getParent() instanceof JetReferenceExpression)) {
return false;
if (elementType == JetTokens.IDENTIFIER) {
if (element.getParent() instanceof JetReferenceExpression) {
PsiElement parentOfParent = element.getParent().getParent();
JetQualifiedExpression qualifiedExpression = PsiTreeUtil.getParentOfType(element, JetQualifiedExpression.class);
if (qualifiedExpression != null && qualifiedExpression.getSelectorExpression() == parentOfParent) {
return false;
}
} else {
return false;
}
}
}
return element != null && isInContext(element);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册