public static boolean shouldProcessIncludesNow() {
    return FileBasedIndex.getInstance().getFileBeingCurrentlyIndexed() == null &&
           !XmlUtil.isStubBuilding(); // todo the first condition should be enough
  }
public static boolean shouldProcessIncludesNow()