use of com.intellij.psi.impl.PsiTreeChangeEventImpl.PsiEventType in project intellij-community by JetBrains.
the class JavaCodeBlockModificationListener method onTreeChanged.
@Override
protected void onTreeChanged(@NotNull PsiTreeChangeEventImpl event) {
PsiModificationTracker tracker = myPsiManager.getModificationTracker();
long cur = tracker.getOutOfCodeBlockModificationCount();
super.onTreeChanged(event);
if (cur == tracker.getOutOfCodeBlockModificationCount()) {
PsiEventType code = event.getCode();
if (code == PsiEventType.CHILD_ADDED || code == PsiEventType.CHILD_REMOVED || code == PsiEventType.CHILD_REPLACED) {
if (hasClassesInside(event.getOldChild()) || event.getOldChild() != event.getChild() && hasClassesInside(event.getChild())) {
onOutOfCodeBlockModification(event);
doIncOutOfCodeBlockCounter();
}
}
}
}
Aggregations