Complete private members from libraries in Evaluate Expression dialog
This commit is contained in:
@@ -23,3 +23,4 @@
|
|||||||
### IDE
|
### IDE
|
||||||
- Debugger can distinguish nested inline arguments
|
- Debugger can distinguish nested inline arguments
|
||||||
- Add kotlinClassName() and kotlinFunctionName() macros for use in live templates
|
- Add kotlinClassName() and kotlinFunctionName() macros for use in live templates
|
||||||
|
- Complete private members from libraries in Evaluate Expression dialog
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ abstract class CompletionSession(
|
|||||||
if (descriptor is DeclarationDescriptorWithVisibility) {
|
if (descriptor is DeclarationDescriptorWithVisibility) {
|
||||||
val visible = descriptor.isVisible(position, callTypeAndReceiver.receiver as? KtExpression, bindingContext, resolutionFacade)
|
val visible = descriptor.isVisible(position, callTypeAndReceiver.receiver as? KtExpression, bindingContext, resolutionFacade)
|
||||||
if (visible) return true
|
if (visible) return true
|
||||||
return completeNonAccessible && !descriptor.isFromLibrary()
|
return completeNonAccessible && (!descriptor.isFromLibrary() || file is KtCodeFragment)
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
import java.io.File
|
||||||
|
|
||||||
|
class MyFile : File("file") {
|
||||||
|
private val privateField = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(f: MyFile) {
|
||||||
|
val a = 1<caret>
|
||||||
|
}
|
||||||
|
|
||||||
|
// INVOCATION_COUNT: 2
|
||||||
|
// EXIST: privateField
|
||||||
|
// EXIST: prefixLength
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
f.<caret>
|
||||||
+6
@@ -83,6 +83,12 @@ public class CodeFragmentCompletionTestGenerated extends AbstractCodeFragmentCom
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("privatesInSecondPressCompletion.kt")
|
||||||
|
public void testPrivatesInSecondPressCompletion() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/privatesInSecondPressCompletion.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("topLevel.kt")
|
@TestMetadata("topLevel.kt")
|
||||||
public void testTopLevel() throws Exception {
|
public void testTopLevel() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/topLevel.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/topLevel.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user