MyLoadingChangesPanel ( @NotNull Project project, @NotNull LocalContent localContent, @NotNull ThrowableComputable<? extends Collection<Change>, ? extends VcsException> changesLoader ) { MyChangesBrowser changesBrowser = new MyChangesBrowser(project, localContent); MyLoadingChangesPanel changesPanel = new MyLoadingChangesPanel(changesBrowser) { @NotNull @Override protected Collection<Change> loadChanges() throws VcsException { return changesLoader.compute(); } }; Disposer.register(changesPanel, changesBrowser); changesPanel.reloadChanges(); return changesPanel; }