void (@NotNull Project project, @NotNull RootType rootType, @NotNull Runnable onUpdate, @NotNull Disposable parentDisposable, @NotNull Map<RootType, Disposable> disposables) { if (rootType.isHidden()) return; Disposable rootDisposable = disposables.get(rootType); Disposer.register(parentDisposable, rootDisposable); ReadAction .nonBlocking(() -> rootType.registerTreeUpdater(project, parentDisposable, onUpdate)) .expireWith(parentDisposable) .submit(NonUrgentExecutor.getInstance()); }