rename "Jet" from names of IDE classes; consistently use Kt prefix for PSI elements and classes directly related to specific PSI elements
This commit is contained in:
@@ -49,7 +49,7 @@ public class KotlinLightClassCoherenceTest extends KotlinAsJavaTestBase {
|
||||
|
||||
@NotNull
|
||||
protected PsiClass doTest(String qualifiedName) {
|
||||
KotlinLightClass psiClass = (KotlinLightClass) finder.findClass(qualifiedName, GlobalSearchScope.allScope(getProject()));
|
||||
KtLightClass psiClass = (KtLightClass) finder.findClass(qualifiedName, GlobalSearchScope.allScope(getProject()));
|
||||
assertNotNull("Class not found: " + qualifiedName, psiClass);
|
||||
|
||||
Asserter asserter = new Asserter();
|
||||
@@ -76,7 +76,7 @@ public class KotlinLightClassCoherenceTest extends KotlinAsJavaTestBase {
|
||||
}
|
||||
}
|
||||
|
||||
public void assertModifiersCoherent(KotlinLightClass lightClass) {
|
||||
public void assertModifiersCoherent(KtLightClass lightClass) {
|
||||
PsiClass delegate = lightClass.getDelegate();
|
||||
for (String modifier : PsiModifier.MODIFIERS) {
|
||||
assertEquals("Incoherent modifier: " + modifier,
|
||||
@@ -85,7 +85,7 @@ public class KotlinLightClassCoherenceTest extends KotlinAsJavaTestBase {
|
||||
}
|
||||
}
|
||||
|
||||
public void assertPropertyCoherent(KotlinLightClass lightClass, String methodName) {
|
||||
public void assertPropertyCoherent(KtLightClass lightClass, String methodName) {
|
||||
Class<?> reflect = PsiClass.class;
|
||||
try {
|
||||
Method method = reflect.getMethod(methodName);
|
||||
|
||||
@@ -52,7 +52,7 @@ public class LightClassAnnotationsTest extends KotlinAsJavaTestBase {
|
||||
|
||||
private void doTest(@NotNull String fqName) {
|
||||
PsiClass psiClass = finder.findClass(fqName, GlobalSearchScope.allScope(getProject()));
|
||||
if (!(psiClass instanceof KotlinLightClass)) {
|
||||
if (!(psiClass instanceof KtLightClass)) {
|
||||
throw new IllegalStateException("Not a light class: " + psiClass + " (" + fqName + ")");
|
||||
}
|
||||
|
||||
|
||||
@@ -48,9 +48,9 @@ object LightClassTestCommon {
|
||||
if (lightClass == null) {
|
||||
return "<not generated>"
|
||||
}
|
||||
TestCase.assertTrue("Not a light class: $lightClass ($fqName)", lightClass is KotlinLightClass)
|
||||
TestCase.assertTrue("Not a light class: $lightClass ($fqName)", lightClass is KtLightClass)
|
||||
|
||||
val delegate = (lightClass as KotlinLightClass).getDelegate()
|
||||
val delegate = (lightClass as KtLightClass).getDelegate()
|
||||
TestCase.assertTrue("Not a CLS element: $delegate", delegate is ClsElementImpl)
|
||||
|
||||
val buffer = StringBuilder()
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.jvm.compiler
|
||||
|
||||
import com.intellij.psi.JavaPsiFacade
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
import org.jetbrains.kotlin.asJava.KotlinLightClass
|
||||
import org.jetbrains.kotlin.asJava.KtLightClass
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl
|
||||
@@ -58,7 +58,7 @@ public class KotlinClassFinderTest : KotlinTestWithEnvironmentManagement() {
|
||||
val className = "test.A.B.C"
|
||||
val psiClass = JavaPsiFacade.getInstance(project).findClass(className, GlobalSearchScope.allScope(project))
|
||||
assertNotNull(psiClass, "Psi class not found for $className")
|
||||
assertTrue(psiClass !is KotlinLightClass, "Kotlin light classes are not not expected");
|
||||
assertTrue(psiClass !is KtLightClass, "Kotlin light classes are not not expected");
|
||||
|
||||
val binaryClass = JvmVirtualFileFinder.SERVICE.getInstance(project).findKotlinClass(JavaClassImpl(psiClass!!))
|
||||
assertNotNull(binaryClass, "No binary class for $className")
|
||||
|
||||
Reference in New Issue
Block a user