Internal Kotlin packages now should be completable in parent packages
Internal packages which are hard-excluded from completion and imports now should be visible there if file package are parent of excluded one e.g kotlin.jvm.internal.* now visible from kotlin and kotlin.jvm #KT-16214 fixed
This commit is contained in:
@@ -153,7 +153,8 @@ abstract class CompletionSession(
|
||||
searchScope,
|
||||
filter,
|
||||
filterOutPrivate = !mayIncludeInaccessible,
|
||||
declarationTranslator = { toFromOriginalFileMapper.toSyntheticFile(it) })
|
||||
declarationTranslator = { toFromOriginalFileMapper.toSyntheticFile(it) },
|
||||
file = file)
|
||||
}
|
||||
|
||||
private fun isVisibleDescriptor(descriptor: DeclarationDescriptor, completeNonAccessible: Boolean): Boolean {
|
||||
@@ -169,7 +170,7 @@ abstract class CompletionSession(
|
||||
return completeNonAccessible && (!descriptor.isFromLibrary() || isDebuggerContext)
|
||||
}
|
||||
|
||||
if (descriptor.isExcludedFromAutoImport(project)) return false
|
||||
if (descriptor.isExcludedFromAutoImport(project, file)) return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package kotlin
|
||||
|
||||
fun some() {
|
||||
kotlin.jvm.<caret>
|
||||
}
|
||||
|
||||
// EXIST: internal
|
||||
+6
@@ -2789,6 +2789,12 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CompletionForExcludedWhenInternalUse.kt")
|
||||
public void testCompletionForExcludedWhenInternalUse() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/CompletionForExcludedWhenInternalUse.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFromStandardLibrary.kt")
|
||||
public void testExtensionFromStandardLibrary() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/ExtensionFromStandardLibrary.kt");
|
||||
|
||||
Reference in New Issue
Block a user