Light Classes: Implement light elements for 'extends'/'implements' reference lists. Support adding/removing of super type list entries via light elements.
Fix exception on applying "Convert to class" intention to Java interface with Kotlin inheritor(s) #KT-11281 Fixed (cherry picked from commit 4ec4914)
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
interface IK
|
||||
|
||||
class C2 : I() {
|
||||
|
||||
}
|
||||
|
||||
class C3: I(), IK {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Convert to 'class'" "true"
|
||||
public abstract class <caret>I {
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
interface IK
|
||||
|
||||
class C2 : I {
|
||||
|
||||
}
|
||||
|
||||
class C3: I, IK {
|
||||
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Convert to 'class'" "true"
|
||||
public interface <caret>I {
|
||||
|
||||
}
|
||||
@@ -544,6 +544,21 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/quickfix/convertJavaInterfaceToClass")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ConvertJavaInterfaceToClass extends AbstractQuickFixMultiFileTest {
|
||||
public void testAllFilesPresentInConvertJavaInterfaceToClass() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/convertJavaInterfaceToClass"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("kotlinInheritor.before.Main.java")
|
||||
public void testKotlinInheritor() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/convertJavaInterfaceToClass/kotlinInheritor.before.Main.java");
|
||||
doTestWithExtraFile(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/quickfix/createFromUsage")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user