Do not step into package facade class if SKIP_SYNTHETIC_METHODS flag is true
This commit is contained in:
@@ -406,6 +406,7 @@
|
||||
<debugger.frameExtraVarsProvider implementation="org.jetbrains.kotlin.idea.debugger.KotlinFrameExtraVariablesProvider"/>
|
||||
<debugger.extraSteppingFilter implementation="org.jetbrains.kotlin.idea.ExtraSteppingFilter"/>
|
||||
<xdebugger.settings implementation="org.jetbrains.kotlin.idea.debugger.KotlinDebuggerSettings"/>
|
||||
<debugger.syntheticProvider implementation="org.jetbrains.kotlin.idea.debugger.filter.KotlinSyntheticTypeComponentProvider"/>
|
||||
|
||||
<codeInsight.implementMethod language="jet" implementationClass="org.jetbrains.kotlin.idea.core.codeInsight.ImplementMethodsHandler"/>
|
||||
<codeInsight.overrideMethod language="jet" implementationClass="org.jetbrains.kotlin.idea.codeInsight.OverrideMethodsHandler"/>
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.debugger.filter
|
||||
|
||||
import com.intellij.debugger.engine.SyntheticTypeComponentProvider
|
||||
import com.sun.jdi.Method
|
||||
import com.sun.jdi.TypeComponent
|
||||
import org.jetbrains.kotlin.load.kotlin.PackageClassUtils
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.FqNameUnsafe
|
||||
|
||||
public class KotlinSyntheticTypeComponentProvider: SyntheticTypeComponentProvider {
|
||||
override fun isSynthetic(typeComponent: TypeComponent?): Boolean {
|
||||
if (typeComponent !is Method) return false
|
||||
|
||||
val typeName = typeComponent.declaringType().name()
|
||||
if (!FqNameUnsafe.isValid(typeName)) return false
|
||||
|
||||
if (PackageClassUtils.isPackageClassFqName(FqName(typeName))) {
|
||||
val lineNumber = typeComponent.location().lineNumber()
|
||||
return lineNumber == 1
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ 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 !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepIntoStdlib.StepIntoStdlibPackage
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
stepIntoStdlib.kt:6
|
||||
KotlinPackage.!EXT!
|
||||
_Mapping.!EXT!
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at stepIntoStdlibFacadeClass.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 !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepIntoStdlibFacadeClass.StepIntoStdlibFacadeClassPackage
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
stepIntoStdlibFacadeClass.kt:6
|
||||
KotlinPackage.!EXT!
|
||||
_Mapping.!EXT!
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -7,5 +7,5 @@ fun main(args: Array<String>) {
|
||||
val b = 1
|
||||
}
|
||||
|
||||
// STEP_INTO: 2
|
||||
// STEP_INTO: 1
|
||||
// TRACING_FILTERS_ENABLED: false
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package stepIntoStdlibFacadeClass
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = intArray(1)
|
||||
//Breakpoint!
|
||||
a.withIndex()
|
||||
val b = 1
|
||||
}
|
||||
|
||||
// STEP_INTO: 2
|
||||
// TRACING_FILTERS_ENABLED: false
|
||||
// SKIP_SYNTHETIC_METHODS: false
|
||||
@@ -333,5 +333,11 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/filters/stepIntoStdlib.kt");
|
||||
doStepIntoTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("stepIntoStdlibFacadeClass.kt")
|
||||
public void testStepIntoStdlibFacadeClass() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/filters/stepIntoStdlibFacadeClass.kt");
|
||||
doStepIntoTest(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user