void (final @NotNull Runnable runnable) { if (isDisposed()) return; final Application app = ApplicationManager.getApplication(); if (app != null) { final class Task extends TreeRunnable { private Task() { super("AbstractTreeBuilder.runBackgroundLoading"); } @Override public void perform() { runnable.run(); } } ReadAction.nonBlocking(new Task()).executeSynchronously(); } else { runnable.run(); } }