void (final @NotNull String propertyName, @NotNull Disposable parent, final @NotNull PropertyChangeListener listener) { PCS.addPropertyChangeListener(propertyName, listener); Disposer.register(parent, new Disposable() { @Override public void dispose() { PCS.removePropertyChangeListener(propertyName, listener); } }); }