void (@NotNull DnDSource source, @NotNull JComponent component, @NotNull Disposable parentDisposable) { registerSource(source, component); Disposer.register(parentDisposable, new Disposable() { @Override public void dispose() { unregisterSource(source, component); } }); }