KT-19145: Enable type completion for extension properties
#KT-19145 fixed
This commit is contained in:
+1
-1
@@ -198,7 +198,7 @@ class BasicCompletionSession(
|
|||||||
// no auto-popup on typing after "val", "var" and "fun" because it's likely the name of the declaration which is being typed by user
|
// no auto-popup on typing after "val", "var" and "fun" because it's likely the name of the declaration which is being typed by user
|
||||||
if (parameters.invocationCount == 0) {
|
if (parameters.invocationCount == 0) {
|
||||||
val suppressOtherCompletion = when (declaration) {
|
val suppressOtherCompletion = when (declaration) {
|
||||||
is KtNamedFunction -> prefixMatcher.prefix.let { it.isEmpty() || it[0].isLowerCase() /* function name usually starts with lower case letter */ }
|
is KtNamedFunction, is KtProperty -> prefixMatcher.prefix.let { it.isEmpty() || it[0].isLowerCase() /* function name usually starts with lower case letter */ }
|
||||||
else -> true
|
else -> true
|
||||||
}
|
}
|
||||||
if (suppressOtherCompletion) return
|
if (suppressOtherCompletion) return
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
class Some
|
||||||
|
|
||||||
|
val S<caret>
|
||||||
|
|
||||||
|
// INVOCATION_COUNT: 0
|
||||||
|
// EXIST: Some
|
||||||
+6
@@ -1075,6 +1075,12 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InValExtType.kt")
|
||||||
|
public void testInValExtType() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/InValExtType.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("NoAutoPopupAfterNumberLiteral.kt")
|
@TestMetadata("NoAutoPopupAfterNumberLiteral.kt")
|
||||||
public void testNoAutoPopupAfterNumberLiteral() throws Exception {
|
public void testNoAutoPopupAfterNumberLiteral() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupAfterNumberLiteral.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupAfterNumberLiteral.kt");
|
||||||
|
|||||||
+6
@@ -1075,6 +1075,12 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InValExtType.kt")
|
||||||
|
public void testInValExtType() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/InValExtType.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("NoAutoPopupAfterNumberLiteral.kt")
|
@TestMetadata("NoAutoPopupAfterNumberLiteral.kt")
|
||||||
public void testNoAutoPopupAfterNumberLiteral() throws Exception {
|
public void testNoAutoPopupAfterNumberLiteral() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupAfterNumberLiteral.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupAfterNumberLiteral.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user