void () { LOG.debug("Downloading requested"); File localFile; synchronized (myLock) { if (myState != RemoteFileState.DOWNLOADING_NOT_STARTED) { LOG.debug("File already downloaded: file = " + myLocalVirtualFile + ", state = " + myState); return; } myState = RemoteFileState.DOWNLOADING_IN_PROGRESS; try { myLocalFile = myManager.getStorage().createLocalFile(myUrl); LOG.debug("Local file created: " + myLocalFile.getAbsolutePath()); } catch (IOException e) { LOG.info(e); errorOccurred(IdeCoreBundle.message("cannot.create.local.file", e.getMessage()), false); return; } myCancelled.set(false); localFile = myLocalFile; } for (FileDownloadingListener listener : myListeners) { listener.downloadingStarted(); } if (myContentProvider == null) { myContentProvider = myManager.findContentProvider(myUrl); } myContentProvider.saveContent(myUrl, localFile, this); }