本文整理汇总了Java中com.intellij.pom.tree.events.impl.TreeChangeEventImpl.addElementaryChange方法的典型用法代码示例。如果您正苦于以下问题:Java TreeChangeEventImpl.addElementaryChange方法的具体用法?Java TreeChangeEventImpl.addElementaryChange怎么用?Java TreeChangeEventImpl.addElementaryChange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.pom.tree.events.impl.TreeChangeEventImpl
的用法示例。
在下文中一共展示了TreeChangeEventImpl.addElementaryChange方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doActualPsiChange
import com.intellij.pom.tree.events.impl.TreeChangeEventImpl; //导入方法依赖的package包/类
@Override
void doActualPsiChange(@Nonnull PsiFile file, @Nonnull TreeChangeEventImpl changeEvent) {
PsiElement psiParent = myOldParent.getPsi();
PsiElement psiChild = file.isPhysical() ? myOldNode.getPsi() : null;
if (psiParent != null && psiChild != null) {
PsiTreeChangeEventImpl event = new PsiTreeChangeEventImpl(file.getManager());
event.setParent(psiParent);
event.setChild(psiChild);
event.setFile(file);
((PsiManagerEx)file.getManager()).beforeChildRemoval(event);
}
changeEvent.addElementaryChange(myOldParent);
myOldNode.rawRemove();
myOldParent.subtreeChanged();
DebugUtil.checkTreeStructure(myOldParent);
}
示例2: add
import com.intellij.pom.tree.events.impl.TreeChangeEventImpl; //导入方法依赖的package包/类
private static void add(TreeChangeEventImpl destinationTreeChange, CompositeElement parent, TreeElement first) {
destinationTreeChange.addElementaryChange(parent);
parent.rawAddChildren(first);
}
示例3: remove
import com.intellij.pom.tree.events.impl.TreeChangeEventImpl; //导入方法依赖的package包/类
private static void remove(TreeChangeEventImpl destinationTreeChange, TreeElement first, TreeElement last) {
if (first != null) {
destinationTreeChange.addElementaryChange(first.getTreeParent());
first.rawRemoveUpTo(last);
}
}
示例4: insertBefore
import com.intellij.pom.tree.events.impl.TreeChangeEventImpl; //导入方法依赖的package包/类
private static void insertBefore(TreeChangeEventImpl destinationTreeChange, @Nonnull TreeElement anchorBefore, TreeElement first) {
destinationTreeChange.addElementaryChange(anchorBefore.getTreeParent());
anchorBefore.rawInsertBeforeMe(first);
}
示例5: replace
import com.intellij.pom.tree.events.impl.TreeChangeEventImpl; //导入方法依赖的package包/类
private static void replace(TreeChangeEventImpl sourceTreeChange, TreeElement oldChild, TreeElement newChild) {
sourceTreeChange.addElementaryChange(oldChild.getTreeParent());
oldChild.rawReplaceWithList(newChild);
}