mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
UastCreateMethodFix new method finding simplification
This commit is contained in:
+1
-2
@@ -39,8 +39,7 @@ class UastCreateMethodFix(containingClass: UClass, private val createMethodActio
|
||||
val methodsBefore = containingClass.element?.methods ?: return
|
||||
createMethodAction.invoke(project, null, file)
|
||||
val newMethod = containingClass.element?.methods?.
|
||||
filterNot { method -> methodsBefore.any { it.isEquivalentTo(method) } }?.
|
||||
first() ?: return
|
||||
firstOrNull { method -> methodsBefore.none { it.isEquivalentTo(method) } } ?: return
|
||||
reformatAndOpenCreatedMethod(newMethod)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user