void (PsiTreeChangeEvent afterEvent) { PsiTreeChangeEventImpl.PsiEventType code = ((PsiTreeChangeEventImpl)afterEvent).getCode(); assertFalse(code.name(), code.name().startsWith("BEFORE_")); PsiTreeChangeEventImpl.PsiEventType beforeCode = PsiTreeChangeEventImpl.PsiEventType.values()[code.ordinal() - 1]; assertTrue(beforeCode.name(), beforeCode.name().startsWith("BEFORE_")); String beforeText = eventText(afterEvent, beforeCode); int i = eventsFired.indexOf(beforeText); assertTrue("Event '" + beforeText + "' must be fired. Events so far: " + eventsFired, i >= 0); }