void (Project project, Disposable parentDisposable, String notNull, String nullable) { NullableNotNullManager nnnManager = NullableNotNullManager.getInstance(project); nnnManager.setNotNulls(notNull); nnnManager.setNullables(nullable); Disposer.register(parentDisposable, () -> { nnnManager.setNotNulls(); nnnManager.setNullables(); }); }