mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not replace anonymous inheritance with delegation
This commit is contained in:
+2
@@ -552,6 +552,7 @@ public class InheritanceToDelegationProcessor extends BaseRefactoringProcessor {
|
||||
|
||||
private void addImplementingInterfaces() throws IncorrectOperationException {
|
||||
final PsiReferenceList implementsList = myClass.getImplementsList();
|
||||
LOG.assertTrue(implementsList != null);
|
||||
for (PsiClass delegatedInterface : myDelegatedInterfaces) {
|
||||
if (!myClassImplementedInterfaces.contains(delegatedInterface)) {
|
||||
implementsList.add(myFactory.createClassReferenceElement(delegatedInterface));
|
||||
@@ -560,6 +561,7 @@ public class InheritanceToDelegationProcessor extends BaseRefactoringProcessor {
|
||||
|
||||
if (!myBaseClass.isInterface()) {
|
||||
final PsiReferenceList extendsList = myClass.getExtendsList();
|
||||
LOG.assertTrue(extendsList != null);
|
||||
extendsList.getReferenceElements()[0].delete();
|
||||
} else {
|
||||
final PsiJavaCodeReferenceElement[] interfaceRefs = implementsList.getReferenceElements();
|
||||
|
||||
Reference in New Issue
Block a user