From a0477eb7c76ad4770d143fecb037e62d2b2b49b5 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Sun, 13 Jan 2019 15:58:43 +0100 Subject: [PATCH] cleanup (rename) --- .../configuration-store-impl/src/FileBasedStorage.kt | 10 +++++----- .../src/ModuleStateStorageManager.kt | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/platform/configuration-store-impl/src/FileBasedStorage.kt b/platform/configuration-store-impl/src/FileBasedStorage.kt index d730d1b17797..321aa8e0678d 100644 --- a/platform/configuration-store-impl/src/FileBasedStorage.kt +++ b/platform/configuration-store-impl/src/FileBasedStorage.kt @@ -42,7 +42,7 @@ open class FileBasedStorage(file: Path, @Volatile private var cachedVirtualFile: VirtualFile? = null protected var lineSeparator: LineSeparator? = null - protected var blockSavingTheContent = false + protected var isBlockSavingTheContent = false @Volatile var file = file @@ -75,7 +75,7 @@ open class FileBasedStorage(file: Path, protected open class FileSaveSession(storageData: StateMap, storage: FileBasedStorage) : XmlElementStorage.XmlElementStorageSaveSession(storageData, storage) { override fun save() { - if (storage.blockSavingTheContent) { + if (storage.isBlockSavingTheContent) { LOG.info("Save blocked for ${storage.fileSpec}") } else { @@ -151,7 +151,7 @@ open class FileBasedStorage(file: Path, } override fun loadLocalData(): Element? { - blockSavingTheContent = false + isBlockSavingTheContent = false return runAndHandleExceptions { loadLocalDataUsingIo() } } @@ -187,7 +187,7 @@ open class FileBasedStorage(file: Path, protected fun processReadException(e: Exception?) { val contentTruncated = e == null - blockSavingTheContent = !contentTruncated && + isBlockSavingTheContent = !contentTruncated && (PROJECT_FILE == fileSpec || fileSpec.startsWith(PROJECT_CONFIG_DIR) || fileSpec == StoragePathMacros.MODULE_FILE || fileSpec == StoragePathMacros.WORKSPACE_FILE) @@ -198,7 +198,7 @@ open class FileBasedStorage(file: Path, val app = ApplicationManager.getApplication() if (!app.isUnitTestMode && !app.isHeadlessEnvironment) { val reason = if (contentTruncated) "content truncated" else e!!.message - val action = if (blockSavingTheContent) "Please correct the file content" else "File content will be recreated" + val action = if (isBlockSavingTheContent) "Please correct the file content" else "File content will be recreated" Notification(Notifications.SYSTEM_MESSAGES_GROUP_ID, "Load Settings", "Cannot load settings from file '$file': $reason\n$action", diff --git a/platform/configuration-store-impl/src/ModuleStateStorageManager.kt b/platform/configuration-store-impl/src/ModuleStateStorageManager.kt index 3ea3c8189c07..15b61c778717 100644 --- a/platform/configuration-store-impl/src/ModuleStateStorageManager.kt +++ b/platform/configuration-store-impl/src/ModuleStateStorageManager.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.configurationStore import com.intellij.openapi.components.* @@ -81,7 +81,7 @@ internal class ModuleStateStorageManager(macroSubstitutor: TrackingPathMacroSubs provider: StreamProvider? = null) : MyFileStorage(storageManager, file, fileSpec, rootElementName, roamingType, pathMacroManager, provider) { // use VFS to load module file because it is refreshed and loaded into VFS in any case override fun loadLocalData(): Element? { - blockSavingTheContent = false + isBlockSavingTheContent = false val virtualFile = virtualFile if (virtualFile == null || !virtualFile.exists()) { // only on first load