mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (formatting)
This commit is contained in:
+4
-7
@@ -47,6 +47,7 @@ import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.openapi.vfs.CharsetToolkit
|
||||
import com.intellij.util.PlatformUtils
|
||||
import com.intellij.util.SystemProperties
|
||||
import com.intellij.util.containers.ContainerUtil
|
||||
import com.intellij.util.io.HttpRequests
|
||||
import com.intellij.util.io.URLUtil
|
||||
@@ -70,13 +71,13 @@ import java.util.*
|
||||
*/
|
||||
object UpdateChecker {
|
||||
private val LOG = Logger.getInstance("#com.intellij.openapi.updateSettings.impl.UpdateChecker")
|
||||
val NO_PLATFORM_UPDATE = "ide.no.platform.update"
|
||||
|
||||
@JvmField
|
||||
val NOTIFICATIONS = NotificationGroup(IdeBundle.message("update.notifications.group"), NotificationDisplayType.STICKY_BALLOON, true)
|
||||
|
||||
private val INSTALLATION_UID = "installation.uid"
|
||||
private val DISABLED_UPDATE = "disabled_update.txt"
|
||||
private val NO_PLATFORM_UPDATE = "ide.no.platform.update"
|
||||
|
||||
private var ourDisabledToUpdatePlugins: MutableSet<String>? = null
|
||||
private val ourAdditionalRequestOptions = hashMapOf<String, String>()
|
||||
@@ -113,12 +114,8 @@ object UpdateChecker {
|
||||
val fromSettings = customSettings != null
|
||||
|
||||
ProgressManager.getInstance().run(object : Task.Backgroundable(project, IdeBundle.message("updates.checking.progress"), true) {
|
||||
override fun run(indicator: ProgressIndicator) {
|
||||
doUpdateAndShowResult(getProject(), fromSettings, true, settings, indicator, null)
|
||||
}
|
||||
|
||||
override fun run(indicator: ProgressIndicator) = doUpdateAndShowResult(getProject(), fromSettings, true, settings, indicator, null)
|
||||
override fun isConditionalModal(): Boolean = fromSettings
|
||||
|
||||
override fun shouldStartInBackground(): Boolean = !fromSettings
|
||||
})
|
||||
}
|
||||
@@ -181,7 +178,7 @@ object UpdateChecker {
|
||||
}
|
||||
|
||||
private fun checkPlatformUpdate(settings: UpdateSettings): CheckForUpdateResult {
|
||||
if (System.getProperty(NO_PLATFORM_UPDATE, "false").toBoolean()) {
|
||||
if (SystemProperties.getBooleanProperty(NO_PLATFORM_UPDATE, false)) {
|
||||
return CheckForUpdateResult(UpdateStrategy.State.NOTHING_LOADED, null)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user