public static boolean isEnteringStaticScope(@NotNull PsiScopeProcessor.Event event, @Nullable Object associated) {
    if (event == START_STATIC) return true;

    return event == EXIT_LEVEL &&
           associated instanceof PsiModifierListOwner &&
           ((PsiModifierListOwner)associated).hasModifierProperty(PsiModifier.STATIC);
  }
public static boolean isEnteringStaticScope(@NotNull PsiScopeProcessor.Event event, @Nullable Object associated)