Search in sources :

Example 1 with ReplaceChangeInfoImpl

use of com.intellij.pom.tree.events.impl.ReplaceChangeInfoImpl in project intellij-community by JetBrains.

the class CompositeElement method replace.

private static void replace(final TreeChangeEvent sourceTreeChange, final TreeElement oldChild, final TreeElement newChild) {
    oldChild.rawReplaceWithList(newChild);
    final ReplaceChangeInfoImpl change = new ReplaceChangeInfoImpl(newChild);
    sourceTreeChange.addElementaryChange(newChild, change);
    change.setReplaced(oldChild);
}
Also used : ReplaceChangeInfoImpl(com.intellij.pom.tree.events.impl.ReplaceChangeInfoImpl)

Example 2 with ReplaceChangeInfoImpl

use of com.intellij.pom.tree.events.impl.ReplaceChangeInfoImpl in project intellij-community by JetBrains.

the class ASTDiffBuilder method nodeReplaced.

@Override
public void nodeReplaced(@NotNull ASTNode oldNode, @NotNull ASTNode newNode) {
    if (oldNode instanceof FileElement && newNode instanceof FileElement) {
    } else {
        final ReplaceChangeInfoImpl change = new ReplaceChangeInfoImpl(newNode);
        change.setReplaced(oldNode);
        myEvent.addElementaryChange(newNode, change);
    }
}
Also used : FileElement(com.intellij.psi.impl.source.tree.FileElement) ReplaceChangeInfoImpl(com.intellij.pom.tree.events.impl.ReplaceChangeInfoImpl)

Aggregations

ReplaceChangeInfoImpl (com.intellij.pom.tree.events.impl.ReplaceChangeInfoImpl)2 FileElement (com.intellij.psi.impl.source.tree.FileElement)1