KaElementModificationType¶
sealed interface KaElementModificationType
KaElementModificationType describes which kind of modification was applied to a changed PsiElement. KaSourceModificationService uses this information to perform change locality detection.
Inheritors¶
Types¶
ElementAdded¶
object ElementAdded : KaElementModificationType
The element has been added as a new element.
ElementRemoved¶
class ElementRemoved(val removedElement: PsiElement) : KaElementModificationType
The element passed is the parent of a removed element, which is additionally provided as removedElement. The removed element itself cannot be the modification "anchor" because it has already been removed and is not part of the KtFile anymore, but it might still be used to determine the modification's change type.
ElementReplaced¶
class ElementReplaced(val replacedElement: PsiElement) : KaElementModificationType
The element passed is the replacement element. The replaced element itself is represented by replacedElement. The replaced element itself cannot be the modification "anchor" because it has already been replaced and is not part of the KtFile anymore, but it might still be used to determine the modification's change type.
Unknown¶
object Unknown : KaElementModificationType
Which kind of modification was applied to the element is unknown.