toString() for KotlinLightClassForExplicitDeclaration

This commit is contained in:
Andrey Breslav
2012-12-28 20:19:08 +04:00
parent 4b4a9eb6c9
commit 7f051e38e5
6 changed files with 17 additions and 7 deletions
@@ -306,4 +306,14 @@ public class KotlinLightClassForExplicitDeclaration extends AbstractLightClass i
public PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException { public PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException {
return super.setName(name); // TODO return super.setName(name); // TODO
} }
@Override
public String toString() {
try {
return KotlinLightClass.class.getSimpleName() + ":" + getQualifiedName();
}
catch (Throwable e) {
return KotlinLightClass.class.getSimpleName() + ":" + e.toString();
}
}
} }
@@ -11,6 +11,6 @@ class TestClass5 {
} }
// ANNOTATION: java.lang.Deprecated // ANNOTATION: java.lang.Deprecated
// SEARCH: JetLightClass:TestClass1, JetLightClass:TestClass2, JetLightClass:TestClass3 // SEARCH: KotlinLightClass:TestClass1, KotlinLightClass:TestClass2, KotlinLightClass:TestClass3
// SEARCH: JetLightClass:TestClass4 // SEARCH: KotlinLightClass:TestClass4
// SEARCH: JetLightClass:TestClass5.innerTestClass5 // SEARCH: KotlinLightClass:TestClass5.innerTestClass5
@@ -5,4 +5,4 @@ MyAnnotation("f", "s") class Test1() {}
annotation class MyAnnotation(val first: String, val second: String) annotation class MyAnnotation(val first: String, val second: String)
// ANNOTATION: MyAnnotation // ANNOTATION: MyAnnotation
// SEARCH: PsiMethod:test1, JetLightClass:Test1 // SEARCH: PsiMethod:test1, KotlinLightClass:Test1
@@ -1,4 +1,4 @@
class A: Object() {} class A: Object() {}
// CLASS: java.lang.Object // CLASS: java.lang.Object
// SEARCH: JetLightClass:A // SEARCH: KotlinLightClass:A
@@ -3,4 +3,4 @@ class A: Base() {}
open class Base() {} open class Base() {}
// CLASS: Base // CLASS: Base
// SEARCH: JetLightClass:A // SEARCH: KotlinLightClass:A
+1 -1
View File
@@ -9,4 +9,4 @@ class Test2: junit.framework.TestCase() {
} }
// CLASS: junit.framework.TestCase // CLASS: junit.framework.TestCase
// SEARCH: JetLightClass:Test1, JetLightClass:Test2 // SEARCH: KotlinLightClass:Test1, KotlinLightClass:Test2