void (boolean optimizeImportsOnTheFly, Disposable parentDisposable) { boolean prev = this.optimizeImportsOnTheFly; this.optimizeImportsOnTheFly = optimizeImportsOnTheFly; Disposer.register(parentDisposable, () -> { this.optimizeImportsOnTheFly = prev; }); }