in src/main/kotlin/org/jetbrains/tinygoplugin/sdk/TinyGoDownloadSdkService.kt [71:95]
override fun onFinished() {
logger.debug("Start processing downloaded temporary TinyGo SDK object")
synchronized(downloadingTinyGoSdks) {
downloadingTinyGoSdks.remove(sdk)
logger.debug("Removed TinyGo SDK from the list of downloading SDKs")
}
val localSdk = sdk.toLocalTinyGoSdk()
if (localSdk == GoSdk::NULL) {
logger.debug("Converting of downloading SDK to local failed")
return
}
service<TinyGoSdkList>().addSdk(localSdk)
logger.debug("Added downloaded TinyGo SDK to the list of local SDKs")
sdk.isDownloaded = true
synchronized(lock) {
if (success) {
sdk.isDownloaded = true
GoNotifications.getGeneralGroup()
.createNotification("Downloaded SDK", NotificationType.INFORMATION)
.notify(null)
}
}
onFinish.accept(localSdk)
}