Esempio n. 1
0
 public void childrenChanged(@NotNull PsiTreeChangeEventImpl event) {
   event.setCode(PsiTreeChangeEventImpl.PsiEventType.CHILDREN_CHANGED);
   if (LOG.isDebugEnabled()) {
     LOG.debug("childrenChanged: parent = " + event.getParent());
   }
   fireEvent(event);
   afterChange(true);
 }
Esempio n. 2
0
 public void childRemoved(@NotNull PsiTreeChangeEventImpl event) {
   event.setCode(PsiTreeChangeEventImpl.PsiEventType.CHILD_REMOVED);
   if (LOG.isDebugEnabled()) {
     LOG.debug("childRemoved: child = " + event.getChild() + ", parent = " + event.getParent());
   }
   fireEvent(event);
   afterChange(true);
 }
Esempio n. 3
0
 public void propertyChanged(@NotNull PsiTreeChangeEventImpl event) {
   event.setCode(PsiTreeChangeEventImpl.PsiEventType.PROPERTY_CHANGED);
   if (LOG.isDebugEnabled()) {
     LOG.debug(
         "propertyChanged: element = "
             + event.getElement()
             + ", propertyName = "
             + event.getPropertyName()
             + ", oldValue = "
             + event.getOldValue()
             + ", newValue = "
             + event.getNewValue());
   }
   fireEvent(event);
   afterChange(true);
 }
 public static void sendAfterChildrenChangedEvent(
     @NotNull PsiManagerImpl manager,
     @NotNull PsiFile scope,
     int oldLength,
     boolean isGenericChange) {
   if (!scope.isPhysical()) {
     manager.afterChange(false);
     return;
   }
   PsiTreeChangeEventImpl event = new PsiTreeChangeEventImpl(manager);
   event.setParent(scope);
   event.setFile(scope);
   event.setOffset(0);
   event.setOldLength(oldLength);
   event.setGenericChange(isGenericChange);
   manager.childrenChanged(event);
 }