Skip MultiFileFacade classes as synthethic
This commit is contained in:
+13
-3
@@ -17,10 +17,9 @@
|
|||||||
package org.jetbrains.kotlin.idea.debugger.filter
|
package org.jetbrains.kotlin.idea.debugger.filter
|
||||||
|
|
||||||
import com.intellij.debugger.engine.SyntheticTypeComponentProvider
|
import com.intellij.debugger.engine.SyntheticTypeComponentProvider
|
||||||
|
import com.sun.jdi.AbsentInformationException
|
||||||
import com.sun.jdi.Method
|
import com.sun.jdi.Method
|
||||||
import com.sun.jdi.TypeComponent
|
import com.sun.jdi.TypeComponent
|
||||||
import org.jetbrains.kotlin.load.kotlin.PackageClassUtils
|
|
||||||
import org.jetbrains.kotlin.name.FqName
|
|
||||||
import org.jetbrains.kotlin.name.FqNameUnsafe
|
import org.jetbrains.kotlin.name.FqNameUnsafe
|
||||||
|
|
||||||
public class KotlinSyntheticTypeComponentProvider: SyntheticTypeComponentProvider {
|
public class KotlinSyntheticTypeComponentProvider: SyntheticTypeComponentProvider {
|
||||||
@@ -30,6 +29,17 @@ public class KotlinSyntheticTypeComponentProvider: SyntheticTypeComponentProvide
|
|||||||
val typeName = typeComponent.declaringType().name()
|
val typeName = typeComponent.declaringType().name()
|
||||||
if (!FqNameUnsafe.isValid(typeName)) return false
|
if (!FqNameUnsafe.isValid(typeName)) return false
|
||||||
|
|
||||||
return false
|
try {
|
||||||
|
if (typeComponent.location().lineNumber() != 1) return false
|
||||||
|
|
||||||
|
if (typeComponent.allLineLocations().any { it.lineNumber() != 1 }) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return !typeComponent.declaringType().allLineLocations().any { it.lineNumber() != 1 }
|
||||||
|
}
|
||||||
|
catch(e: AbsentInformationException) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
@file:JvmName("SameNameBreakpointOnLocalProperty")
|
||||||
|
@file:JvmMultifileClass
|
||||||
package customLib.breakpointOnLocalProperty
|
package customLib.breakpointOnLocalProperty
|
||||||
|
|
||||||
public fun breakpointOnLocalPropertyFun(): Int {
|
public fun breakpointOnLocalPropertyFun(): Int {
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
@file:JvmName("SameNameBreakpointOnLocalProperty")
|
||||||
|
@file:JvmMultifileClass
|
||||||
package customLib.breakpointOnLocalProperty
|
package customLib.breakpointOnLocalProperty
|
||||||
|
|
||||||
public fun breakpointOnLocalPropertyFun2(): Int {
|
public fun breakpointOnLocalPropertyFun2(): Int {
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
@file:JvmName("SameNameOneFunSameFileName")
|
||||||
|
@file:JvmMultifileClass
|
||||||
|
package customLib.oneFunSameClassName
|
||||||
|
|
||||||
|
public fun oneFunSameFileNameFun(): Int {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
@file:JvmName("SameNameOneFunSameFileName")
|
||||||
|
@file:JvmMultifileClass
|
||||||
|
package customLib.oneFunSameClassName
|
||||||
|
|
||||||
|
public fun oneFunSameFileNameFun2(): Int {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package customLib.oneFunSameFileName
|
|
||||||
|
|
||||||
public fun oneFunSameFileNameFun(): Int {
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package customLib.oneFunSameFileName
|
|
||||||
|
|
||||||
public fun oneFunSameFileNameFun2(): Int {
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:JvmName("SameNameProperty")
|
||||||
|
@file:JvmMultifileClass
|
||||||
package customLib.property
|
package customLib.property
|
||||||
|
|
||||||
public val foo: Int =
|
public val foo: Int =
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:JvmName("SameNameProperty")
|
||||||
|
@file:JvmMultifileClass
|
||||||
package customLib.property
|
package customLib.property
|
||||||
|
|
||||||
public fun someFun(): Int {
|
public fun someFun(): Int {
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
@file:JvmName("SameNameTwoFunDifferentSignature")
|
||||||
|
@file:JvmMultifileClass
|
||||||
package customLib.twoFunDifferentSignature
|
package customLib.twoFunDifferentSignature
|
||||||
|
|
||||||
public fun twoFunDifferentSignatureFun(): Int {
|
public fun twoFunDifferentSignatureFun(): Int {
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
@file:JvmName("SameNameTwoFunDifferentSignature")
|
||||||
|
@file:JvmMultifileClass
|
||||||
package customLib.twoFunDifferentSignature
|
package customLib.twoFunDifferentSignature
|
||||||
|
|
||||||
public fun twoFunDifferentSignatureFun(i: Int): Int {
|
public fun twoFunDifferentSignatureFun(i: Int): Int {
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
LineBreakpoint created at a1.kt:3
|
LineBreakpoint created at a1.kt:5
|
||||||
LineBreakpoint created at a1.kt:3
|
LineBreakpoint created at a1.kt:5
|
||||||
LineBreakpoint created at a1.kt:3
|
LineBreakpoint created at a1.kt:5
|
||||||
LineBreakpoint created at a1.kt:3
|
LineBreakpoint created at a1.kt:5
|
||||||
LineBreakpoint created at simpleLibFile.kt:3
|
LineBreakpoint created at simpleLibFile.kt:3
|
||||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! customLibClassName.CustomLibClassNameKt
|
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! customLibClassName.CustomLibClassNameKt
|
||||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
a1.kt:4
|
a1.kt:6
|
||||||
Compile bytecode for 1 + 1
|
Compile bytecode for 1 + 1
|
||||||
a1.kt:4
|
a1.kt:6
|
||||||
Compile bytecode for 1 + 2
|
Compile bytecode for 1 + 2
|
||||||
a1.kt:4
|
a1.kt:6
|
||||||
Compile bytecode for 1 + 3
|
Compile bytecode for 1 + 3
|
||||||
a1.kt:4
|
a1.kt:6
|
||||||
Compile bytecode for 1 + 4
|
Compile bytecode for 1 + 4
|
||||||
simpleLibFile.kt:4
|
simpleLibFile.kt:4
|
||||||
Compile bytecode for 1 + 5
|
Compile bytecode for 1 + 5
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
LineBreakpoint created at stepIntoMultiFileFacade.kt:5
|
||||||
|
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepIntoMultiFileFacade.StepIntoMultiFileFacadeKt
|
||||||
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
stepIntoMultiFileFacade.kt:5
|
||||||
|
a1.kt:6
|
||||||
|
stepIntoMultiFileFacade.kt:5
|
||||||
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|
||||||
|
Process finished with exit code 0
|
||||||
+1
-1
@@ -2,7 +2,7 @@ LineBreakpoint created at stepIntoStdlib.kt:6
|
|||||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepIntoStdlib.StepIntoStdlibKt
|
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepIntoStdlib.StepIntoStdlibKt
|
||||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
stepIntoStdlib.kt:6
|
stepIntoStdlib.kt:6
|
||||||
ArraysKt.!EXT!
|
_Arrays.!EXT!
|
||||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|
||||||
Process finished with exit code 0
|
Process finished with exit code 0
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
package customLibClassName
|
package customLibClassName
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
customLib.oneFunSameFileName.oneFunSameFileNameFun()
|
customLib.oneFunSameClassName.oneFunSameFileNameFun()
|
||||||
customLib.twoFunDifferentSignature.twoFunDifferentSignatureFun()
|
customLib.twoFunDifferentSignature.twoFunDifferentSignatureFun()
|
||||||
customLib.property.foo
|
customLib.property.foo
|
||||||
customLib.breakpointOnLocalProperty.breakpointOnLocalPropertyFun()
|
customLib.breakpointOnLocalProperty.breakpointOnLocalPropertyFun()
|
||||||
|
|||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
package stepIntoMultiFileFacade
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
//Breakpoint!
|
||||||
|
customLib.oneFunSameClassName.oneFunSameFileNameFun()
|
||||||
|
}
|
||||||
|
|
||||||
|
// STEP_INTO: 2
|
||||||
|
// TRACING_FILTERS_ENABLED: false
|
||||||
@@ -454,6 +454,12 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest {
|
|||||||
doStepIntoTest(fileName);
|
doStepIntoTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("stepIntoMultiFileFacade.kt")
|
||||||
|
public void testStepIntoMultiFileFacade() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/stepIntoMultiFileFacade.kt");
|
||||||
|
doStepIntoTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("stepIntoSpecificKotlinClasses.kt")
|
@TestMetadata("stepIntoSpecificKotlinClasses.kt")
|
||||||
public void testStepIntoSpecificKotlinClasses() throws Exception {
|
public void testStepIntoSpecificKotlinClasses() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/stepIntoSpecificKotlinClasses.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/stepIntoSpecificKotlinClasses.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user