void (@NotNull Runnable callback) { if (myCatalog instanceof HttpVirtualFile) { RemoteFileInfo info = ((HttpVirtualFile)myCatalog).getFileInfo(); if (info != null) { FileDownloadingAdapter adapter = new FileDownloadingAdapter() { @Override public void fileDownloaded(@NotNull VirtualFile localFile) { callback.run(); } }; myDownloadingAdapters.put(callback, adapter); info.addDownloadingListener(adapter); } } }