void cacheElement(@Nullable E element) {
    myElement = element == null ? null :
                PsiManagerEx.getInstanceEx(getProject()).isBatchFilesProcessingMode() ? new WeakReference<>(element) :
                new SoftReference<>(element);
  }
void cacheElement(@Nullable E element)