Fixed tests for stubs

This commit is contained in:
Valentin Kipyatkov
2015-03-31 16:19:15 +03:00
parent 5ba5618718
commit bff2b2f378
30 changed files with 78 additions and 77 deletions
@@ -22,6 +22,7 @@ import com.intellij.psi.stubs.NamedStub
import com.intellij.psi.stubs.StubBase
import com.intellij.psi.stubs.StubElement
import org.jetbrains.kotlin.psi.JetElementImplStub
import org.jetbrains.kotlin.psi.stubs.KotlinCallableStubBase
import org.jetbrains.kotlin.psi.stubs.KotlinClassOrObjectStub
import org.jetbrains.kotlin.psi.stubs.KotlinStubWithFqName
import java.lang.reflect.Method
@@ -30,7 +31,7 @@ import java.util.ArrayList
public open class KotlinStubBaseImpl<T : JetElementImplStub<*>>(parent: StubElement<*>?, elementType: IStubElementType<*, *>) : StubBase<T>(parent, elementType) {
override fun toString(): String {
val stubInterface = this.javaClass.getInterfaces().filter { it.getName().endsWith("Stub") }.single()
val stubInterface = this.javaClass.getInterfaces().filter { it.getName().contains("Stub") }.single()
val propertiesValues = renderPropertyValues(stubInterface)
if (propertiesValues.isEmpty()) {
return ""
@@ -76,6 +77,6 @@ public open class KotlinStubBaseImpl<T : JetElementImplStub<*>>(parent: StubElem
companion object {
private val LOGGER: Logger = Logger.getInstance(javaClass<KotlinStubBaseImpl<JetElementImplStub<*>>>())
private val BASE_STUB_INTERFACES = listOf(javaClass<KotlinStubWithFqName<*>>(), javaClass<KotlinClassOrObjectStub<*>>(), javaClass<NamedStub<*>>())
private val BASE_STUB_INTERFACES = listOf(javaClass<KotlinStubWithFqName<*>>(), javaClass<KotlinClassOrObjectStub<*>>(), javaClass<NamedStub<*>>(), javaClass<KotlinCallableStubBase<*>>())
}
}