public class AstLoadingFilter
extends java.lang.Object
disallowTreeLoading(com.intellij.util.ThrowableRunnable<E>)
should be used.forceAllowTreeLoading(com.intellij.psi.PsiFile, com.intellij.util.ThrowableRunnable<E>)
.
In this case there are no performance gains, but later it will be possible to examine all bottlenecks
by finding usages of forceAllowTreeLoading(com.intellij.psi.PsiFile, com.intellij.util.ThrowableRunnable<E>)
disallowTreeLoading { // some deep trace ... doSomeOperation { // access file tree, exception is thrown } forceAllowTreeLoading(file) { doSomeOperation { // access file tree, no exception is thrown } doAnotherOperation { // access another file tree, exception is thrown } } forceAllowTreeLoading(file) { disallowTreeLoading { doSomeOperation { // nested disallowing has no effect in any case // access file tree, no exception is thrown, access is still allowed for file } } } }Note that tree access won't result in an exception when the tree was already loaded.
Modifier and Type | Method and Description |
---|---|
static void |
assertTreeLoadingAllowed(VirtualFile file) |
static <T,E extends java.lang.Throwable> |
disallowTreeLoading(ThrowableComputable<? extends T,E> computable) |
static <T,E extends java.lang.Throwable> |
disallowTreeLoading(ThrowableComputable<? extends T,E> computable,
java.util.function.Supplier<java.lang.String> debugInfo) |
static <E extends java.lang.Throwable> |
disallowTreeLoading(ThrowableRunnable<E> runnable) |
static <T,E extends java.lang.Throwable> |
forceAllowTreeLoading(PsiFile psiFile,
ThrowableComputable<? extends T,E> computable) |
static <E extends java.lang.Throwable> |
forceAllowTreeLoading(PsiFile psiFile,
ThrowableRunnable<E> runnable) |
static <T,E extends java.lang.Throwable> |
forceAllowTreeLoading(VirtualFile virtualFile,
ThrowableComputable<? extends T,E> computable) |
static <E extends java.lang.Throwable> |
forceAllowTreeLoading(VirtualFile virtualFile,
ThrowableRunnable<E> runnable) |
public static void assertTreeLoadingAllowed(VirtualFile file)
public static <E extends java.lang.Throwable> void disallowTreeLoading(ThrowableRunnable<E> runnable) throws E extends java.lang.Throwable
E extends java.lang.Throwable
public static <T,E extends java.lang.Throwable> T disallowTreeLoading(ThrowableComputable<? extends T,E> computable) throws E extends java.lang.Throwable
E extends java.lang.Throwable
public static <T,E extends java.lang.Throwable> T disallowTreeLoading(ThrowableComputable<? extends T,E> computable, java.util.function.Supplier<java.lang.String> debugInfo) throws E extends java.lang.Throwable
E extends java.lang.Throwable
public static <E extends java.lang.Throwable> void forceAllowTreeLoading(PsiFile psiFile, ThrowableRunnable<E> runnable) throws E extends java.lang.Throwable
E extends java.lang.Throwable
public static <E extends java.lang.Throwable> void forceAllowTreeLoading(VirtualFile virtualFile, ThrowableRunnable<E> runnable) throws E extends java.lang.Throwable
E extends java.lang.Throwable
public static <T,E extends java.lang.Throwable> T forceAllowTreeLoading(PsiFile psiFile, ThrowableComputable<? extends T,E> computable) throws E extends java.lang.Throwable
E extends java.lang.Throwable
public static <T,E extends java.lang.Throwable> T forceAllowTreeLoading(VirtualFile virtualFile, ThrowableComputable<? extends T,E> computable) throws E extends java.lang.Throwable
E extends java.lang.Throwable