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:
Alexey Sedunov
2016-06-20 17:54:03 +03:00
parent 8e061c9ec1
commit 248f4c1645
10 changed files with 156 additions and 2 deletions
@@ -44,6 +44,11 @@ public class KtSuperTypeList extends KtElementImplStub<KotlinPlaceHolderStub<KtS
return visitor.visitSuperTypeList(this, data);
}
@NotNull
public KtSuperTypeListEntry addEntry(@NotNull KtSuperTypeListEntry entry) {
return EditCommaSeparatedListHelper.INSTANCE.addItem(this, getEntries(), entry);
}
public void removeEntry(@NotNull KtSuperTypeListEntry entry) {
EditCommaSeparatedListHelper.INSTANCE.removeItem(entry);
if (getEntries().isEmpty()) {