Debugger: do not evaluate calls on mouse cover when 'Value auto tooltip' switched on
This commit is contained in:
@@ -662,7 +662,8 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testClass(javaClass<AbstractSelectExpressionForDebuggerTest>()) {
|
testClass(javaClass<AbstractSelectExpressionForDebuggerTest>()) {
|
||||||
model("debugger/selectExpression")
|
model("debugger/selectExpression", recursive = false)
|
||||||
|
model("debugger/selectExpression/disallowMethodCalls", testMethod = "doTestWoMethodCalls")
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass(javaClass<AbstractKotlinCoverageOutputFilesTest>()) {
|
testClass(javaClass<AbstractKotlinCoverageOutputFilesTest>()) {
|
||||||
|
|||||||
@@ -37,21 +37,23 @@ import org.jetbrains.kotlin.psi.JetCodeFragment
|
|||||||
import org.jetbrains.kotlin.psi.JetUserType
|
import org.jetbrains.kotlin.psi.JetUserType
|
||||||
import org.jetbrains.kotlin.psi.JetImportDirective
|
import org.jetbrains.kotlin.psi.JetImportDirective
|
||||||
import org.jetbrains.kotlin.psi.JetPackageDirective
|
import org.jetbrains.kotlin.psi.JetPackageDirective
|
||||||
|
import org.jetbrains.kotlin.psi.JetCallExpression
|
||||||
|
import org.jetbrains.kotlin.psi.JetArrayAccessExpression
|
||||||
|
|
||||||
class KotlinEditorTextProvider : EditorTextProvider {
|
class KotlinEditorTextProvider : EditorTextProvider {
|
||||||
override fun getEditorText(elementAtCaret: PsiElement): TextWithImports? {
|
override fun getEditorText(elementAtCaret: PsiElement): TextWithImports? {
|
||||||
val expression = findExpressionInner(elementAtCaret)
|
val expression = findExpressionInner(elementAtCaret, true)
|
||||||
return TextWithImportsImpl(CodeFragmentKind.EXPRESSION, expression?.getText() ?: "", JetCodeFragment.getImportsForElement(elementAtCaret), JetFileType.INSTANCE)
|
return TextWithImportsImpl(CodeFragmentKind.EXPRESSION, expression?.getText() ?: "", JetCodeFragment.getImportsForElement(elementAtCaret), JetFileType.INSTANCE)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun findExpression(elementAtCaret: PsiElement, allowMethodCalls: Boolean): Pair<PsiElement, TextRange>? {
|
override fun findExpression(elementAtCaret: PsiElement, allowMethodCalls: Boolean): Pair<PsiElement, TextRange>? {
|
||||||
val expression = findExpressionInner(elementAtCaret)
|
val expression = findExpressionInner(elementAtCaret, allowMethodCalls)
|
||||||
if (expression == null) return null
|
if (expression == null) return null
|
||||||
return Pair(expression, expression.getTextRange())
|
return Pair(expression, expression.getTextRange())
|
||||||
}
|
}
|
||||||
|
|
||||||
class object {
|
class object {
|
||||||
fun findExpressionInner(element: PsiElement): JetExpression? {
|
fun findExpressionInner(element: PsiElement, allowMethodCalls: Boolean): JetExpression? {
|
||||||
if (PsiTreeUtil.getParentOfType(element, javaClass<JetUserType>(), javaClass<JetImportDirective>(), javaClass<JetPackageDirective>()) != null) {
|
if (PsiTreeUtil.getParentOfType(element, javaClass<JetUserType>(), javaClass<JetImportDirective>(), javaClass<JetPackageDirective>()) != null) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -89,6 +91,15 @@ class KotlinEditorTextProvider : EditorTextProvider {
|
|||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!allowMethodCalls && newExpression != null) {
|
||||||
|
fun PsiElement.isCall() = this is JetCallExpression || this is JetOperationExpression || this is JetArrayAccessExpression
|
||||||
|
|
||||||
|
if (newExpression.isCall() ||
|
||||||
|
newExpression is JetQualifiedExpression && newExpression.getSelectorExpression().isCall()) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return when {
|
return when {
|
||||||
newExpression is JetExpression -> newExpression
|
newExpression is JetExpression -> newExpression
|
||||||
jetElement is JetSimpleNameExpression -> jetElement
|
jetElement is JetSimpleNameExpression -> jetElement
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ class KotlinCodeFragmentFactory: CodeFragmentFactory() {
|
|||||||
if (expressionAtOffset != null) {
|
if (expressionAtOffset != null) {
|
||||||
return expressionAtOffset
|
return expressionAtOffset
|
||||||
}
|
}
|
||||||
return KotlinEditorTextProvider.findExpressionInner(elementAt)
|
return KotlinEditorTextProvider.findExpressionInner(elementAt, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
fun foo() {
|
||||||
|
1 <caret>+ 1
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECTED: null
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fun foo() {
|
||||||
|
<caret>bar()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun bar() = 1
|
||||||
|
|
||||||
|
// EXPECTED: null
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
val a = 1
|
||||||
|
val b = <caret>a
|
||||||
|
|
||||||
|
// EXPECTED: a
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fun foo() {
|
||||||
|
1.<caret>foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun Int.foo() = 1
|
||||||
|
|
||||||
|
// EXPECTED: null
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fun foo() {
|
||||||
|
val a = 1
|
||||||
|
bar(<caret>a)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun bar(i: Int) = 1
|
||||||
|
|
||||||
|
// EXPECTED: a
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fun foo() {
|
||||||
|
<caret>bar { }
|
||||||
|
}
|
||||||
|
|
||||||
|
fun bar(f: () -> Unit) = 1
|
||||||
|
|
||||||
|
// EXPECTED: null
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
fun foo() {
|
||||||
|
val klass = MyClass()
|
||||||
|
klass<caret>[1]
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyClass {
|
||||||
|
fun get(i: Int): Int = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECTED: null
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fun foo() {
|
||||||
|
1 <caret>foo 1
|
||||||
|
}
|
||||||
|
|
||||||
|
fun Int.foo(i: Int) = 1
|
||||||
|
|
||||||
|
// EXPECTED: null
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fun foo() {
|
||||||
|
val a = 1
|
||||||
|
<caret>a foo 1
|
||||||
|
}
|
||||||
|
|
||||||
|
fun Int.foo(i: Int) = 1
|
||||||
|
|
||||||
|
// EXPECTED: a
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
fun foo() {
|
||||||
|
1 <caret>is Int
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECTED: null
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
val a = 1
|
||||||
|
fun foo() {
|
||||||
|
<caret>a
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECTED: a
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
fun foo() {
|
||||||
|
val klass = MyClass()
|
||||||
|
klass.<caret>bar
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyClass {
|
||||||
|
val bar = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECTED: klass.bar
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
fun foo() {
|
||||||
|
val klass = MyClass()
|
||||||
|
<caret>klass.bar()
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyClass {
|
||||||
|
fun bar() = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECTED: klass
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
fun foo() {
|
||||||
|
val klass = MyClass()
|
||||||
|
klass.<caret>bar()
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyClass {
|
||||||
|
fun bar() = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECTED: null
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
class Derived: Base() {
|
||||||
|
fun test() {
|
||||||
|
<caret>super.test()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Base {
|
||||||
|
fun test() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECTED: null
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
class MyClass {
|
||||||
|
fun test() {
|
||||||
|
<caret>this.test()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECTED: null
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
class MyClass {
|
||||||
|
fun Int.test() {
|
||||||
|
<caret>this@MyClass
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECTED: this@MyClass
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
fun foo() {
|
||||||
|
<caret>+1
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECTED: null
|
||||||
+9
-1
@@ -25,10 +25,18 @@ import org.junit.Assert
|
|||||||
public abstract class AbstractSelectExpressionForDebuggerTest : LightCodeInsightFixtureTestCase() {
|
public abstract class AbstractSelectExpressionForDebuggerTest : LightCodeInsightFixtureTestCase() {
|
||||||
|
|
||||||
fun doTest(path: String) {
|
fun doTest(path: String) {
|
||||||
|
doTest(path, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun doTestWoMethodCalls(path: String) {
|
||||||
|
doTest(path, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun doTest(path: String, allowMethodCalls: Boolean) {
|
||||||
myFixture.configureByFile(path)
|
myFixture.configureByFile(path)
|
||||||
|
|
||||||
val elementAt = myFixture.getFile()?.findElementAt(myFixture.getCaretOffset())!!
|
val elementAt = myFixture.getFile()?.findElementAt(myFixture.getCaretOffset())!!
|
||||||
val selectedExpression = KotlinEditorTextProvider.findExpressionInner(elementAt)
|
val selectedExpression = KotlinEditorTextProvider.findExpressionInner(elementAt, allowMethodCalls)
|
||||||
|
|
||||||
val expected = InTextDirectivesUtils.findStringWithPrefixes(myFixture.getFile()?.getText()!!, "// EXPECTED: ")
|
val expected = InTextDirectivesUtils.findStringWithPrefixes(myFixture.getFile()?.getText()!!, "// EXPECTED: ")
|
||||||
Assert.assertEquals("Another expression should be selected", expected, selectedExpression?.getText() ?: "null")
|
Assert.assertEquals("Another expression should be selected", expected, selectedExpression?.getText() ?: "null")
|
||||||
|
|||||||
+273
-152
@@ -28,179 +28,300 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
@TestMetadata("idea/testData/debugger/selectExpression")
|
@InnerTestClasses({SelectExpressionForDebuggerTestGenerated.SelectExpression.class, SelectExpressionForDebuggerTestGenerated.DisallowMethodCalls.class})
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public class SelectExpressionForDebuggerTestGenerated extends AbstractSelectExpressionForDebuggerTest {
|
public class SelectExpressionForDebuggerTestGenerated extends AbstractSelectExpressionForDebuggerTest {
|
||||||
public void testAllFilesPresentInSelectExpression() throws Exception {
|
@TestMetadata("idea/testData/debugger/selectExpression")
|
||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/selectExpression"), Pattern.compile("^(.+)\\.kt$"), true);
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class SelectExpression extends AbstractSelectExpressionForDebuggerTest {
|
||||||
|
public void testAllFilesPresentInSelectExpression() throws Exception {
|
||||||
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/selectExpression"), Pattern.compile("^(.+)\\.kt$"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("annotation.kt")
|
||||||
|
public void testAnnotation() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/annotation.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("binaryExpression.kt")
|
||||||
|
public void testBinaryExpression() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/binaryExpression.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("call.kt")
|
||||||
|
public void testCall() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/call.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expressionInPropertyInitializer.kt")
|
||||||
|
public void testExpressionInPropertyInitializer() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/expressionInPropertyInitializer.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("extensionFun.kt")
|
||||||
|
public void testExtensionFun() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/extensionFun.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("funArgument.kt")
|
||||||
|
public void testFunArgument() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/funArgument.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("functionLiteral.kt")
|
||||||
|
public void testFunctionLiteral() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/functionLiteral.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("getConvention.kt")
|
||||||
|
public void testGetConvention() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/getConvention.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("imports.kt")
|
||||||
|
public void testImports() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/imports.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("infixCall.kt")
|
||||||
|
public void testInfixCall() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/infixCall.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("infixCallArgument.kt")
|
||||||
|
public void testInfixCallArgument() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/infixCallArgument.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("isExpression.kt")
|
||||||
|
public void testIsExpression() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/isExpression.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("keyword.kt")
|
||||||
|
public void testKeyword() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/keyword.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("modifier.kt")
|
||||||
|
public void testModifier() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/modifier.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("package.kt")
|
||||||
|
public void testPackage() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/package.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("param.kt")
|
||||||
|
public void testParam() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/param.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("propertyCall.kt")
|
||||||
|
public void testPropertyCall() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/propertyCall.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("propertyDeclaration.kt")
|
||||||
|
public void testPropertyDeclaration() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/propertyDeclaration.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("qualifiedExpressionProperty.kt")
|
||||||
|
public void testQualifiedExpressionProperty() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/qualifiedExpressionProperty.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("qualifiedExpressionReceiver.kt")
|
||||||
|
public void testQualifiedExpressionReceiver() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/qualifiedExpressionReceiver.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("qualifiedExpressionSelector.kt")
|
||||||
|
public void testQualifiedExpressionSelector() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/qualifiedExpressionSelector.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("super.kt")
|
||||||
|
public void testSuper() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/super.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("this.kt")
|
||||||
|
public void testThis() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/this.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("thisWithLabel.kt")
|
||||||
|
public void testThisWithLabel() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/thisWithLabel.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("unaryExpression.kt")
|
||||||
|
public void testUnaryExpression() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/unaryExpression.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("userType.kt")
|
||||||
|
public void testUserType() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/userType.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("userTypeGeneric.kt")
|
||||||
|
public void testUserTypeGeneric() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/userTypeGeneric.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("userTypeQualified.kt")
|
||||||
|
public void testUserTypeQualified() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/userTypeQualified.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("annotation.kt")
|
@TestMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls")
|
||||||
public void testAnnotation() throws Exception {
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/annotation.kt");
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
doTest(fileName);
|
public static class DisallowMethodCalls extends AbstractSelectExpressionForDebuggerTest {
|
||||||
}
|
public void testAllFilesPresentInDisallowMethodCalls() throws Exception {
|
||||||
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/selectExpression/disallowMethodCalls"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("binaryExpression.kt")
|
@TestMetadata("binaryExpression.kt")
|
||||||
public void testBinaryExpression() throws Exception {
|
public void testBinaryExpression() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/binaryExpression.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/binaryExpression.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("call.kt")
|
@TestMetadata("call.kt")
|
||||||
public void testCall() throws Exception {
|
public void testCall() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/call.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/call.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("expressionInPropertyInitializer.kt")
|
@TestMetadata("expressionInPropertyInitializer.kt")
|
||||||
public void testExpressionInPropertyInitializer() throws Exception {
|
public void testExpressionInPropertyInitializer() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/expressionInPropertyInitializer.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/expressionInPropertyInitializer.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("extensionFun.kt")
|
@TestMetadata("extensionFun.kt")
|
||||||
public void testExtensionFun() throws Exception {
|
public void testExtensionFun() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/extensionFun.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/extensionFun.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("funArgument.kt")
|
@TestMetadata("funArgument.kt")
|
||||||
public void testFunArgument() throws Exception {
|
public void testFunArgument() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/funArgument.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/funArgument.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("functionLiteral.kt")
|
@TestMetadata("functionLiteral.kt")
|
||||||
public void testFunctionLiteral() throws Exception {
|
public void testFunctionLiteral() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/functionLiteral.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/functionLiteral.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("getConvention.kt")
|
@TestMetadata("getConvention.kt")
|
||||||
public void testGetConvention() throws Exception {
|
public void testGetConvention() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/getConvention.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/getConvention.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("imports.kt")
|
@TestMetadata("infixCall.kt")
|
||||||
public void testImports() throws Exception {
|
public void testInfixCall() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/imports.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/infixCall.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("infixCall.kt")
|
@TestMetadata("infixCallArgument.kt")
|
||||||
public void testInfixCall() throws Exception {
|
public void testInfixCallArgument() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/infixCall.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/infixCallArgument.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("infixCallArgument.kt")
|
@TestMetadata("isExpression.kt")
|
||||||
public void testInfixCallArgument() throws Exception {
|
public void testIsExpression() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/infixCallArgument.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/isExpression.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("isExpression.kt")
|
@TestMetadata("propertyCall.kt")
|
||||||
public void testIsExpression() throws Exception {
|
public void testPropertyCall() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/isExpression.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/propertyCall.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("keyword.kt")
|
@TestMetadata("qualifiedExpressionProperty.kt")
|
||||||
public void testKeyword() throws Exception {
|
public void testQualifiedExpressionProperty() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/keyword.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/qualifiedExpressionProperty.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("modifier.kt")
|
@TestMetadata("qualifiedExpressionReceiver.kt")
|
||||||
public void testModifier() throws Exception {
|
public void testQualifiedExpressionReceiver() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/modifier.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/qualifiedExpressionReceiver.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("package.kt")
|
@TestMetadata("qualifiedExpressionSelector.kt")
|
||||||
public void testPackage() throws Exception {
|
public void testQualifiedExpressionSelector() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/package.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/qualifiedExpressionSelector.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("param.kt")
|
@TestMetadata("super.kt")
|
||||||
public void testParam() throws Exception {
|
public void testSuper() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/param.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/super.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("propertyCall.kt")
|
@TestMetadata("this.kt")
|
||||||
public void testPropertyCall() throws Exception {
|
public void testThis() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/propertyCall.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/this.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("propertyDeclaration.kt")
|
@TestMetadata("thisWithLabel.kt")
|
||||||
public void testPropertyDeclaration() throws Exception {
|
public void testThisWithLabel() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/propertyDeclaration.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/thisWithLabel.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("qualifiedExpressionProperty.kt")
|
@TestMetadata("unaryExpression.kt")
|
||||||
public void testQualifiedExpressionProperty() throws Exception {
|
public void testUnaryExpression() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/qualifiedExpressionProperty.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/unaryExpression.kt");
|
||||||
doTest(fileName);
|
doTestWoMethodCalls(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("qualifiedExpressionReceiver.kt")
|
|
||||||
public void testQualifiedExpressionReceiver() throws Exception {
|
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/qualifiedExpressionReceiver.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("qualifiedExpressionSelector.kt")
|
|
||||||
public void testQualifiedExpressionSelector() throws Exception {
|
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/qualifiedExpressionSelector.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("super.kt")
|
|
||||||
public void testSuper() throws Exception {
|
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/super.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("this.kt")
|
|
||||||
public void testThis() throws Exception {
|
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/this.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("thisWithLabel.kt")
|
|
||||||
public void testThisWithLabel() throws Exception {
|
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/thisWithLabel.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("unaryExpression.kt")
|
|
||||||
public void testUnaryExpression() throws Exception {
|
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/unaryExpression.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("userType.kt")
|
|
||||||
public void testUserType() throws Exception {
|
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/userType.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("userTypeGeneric.kt")
|
|
||||||
public void testUserTypeGeneric() throws Exception {
|
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/userTypeGeneric.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("userTypeQualified.kt")
|
|
||||||
public void testUserTypeQualified() throws Exception {
|
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/userTypeQualified.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user