mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
kotlin 1.2 — use [] instead of arrayOf for storages
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ import org.jdom.Element
|
||||
import org.jetbrains.jps.model.serialization.java.compiler.JpsJavaCompilerConfigurationSerializer
|
||||
import java.util.*
|
||||
|
||||
@State(name = "ExternalCompilerConfiguration", storages = arrayOf(Storage("compiler.xml")), externalStorageOnly = true)
|
||||
@State(name = "ExternalCompilerConfiguration", storages = [(Storage("compiler.xml"))], externalStorageOnly = true)
|
||||
internal class ExternalCompilerConfigurationStorage(private val project: Project) : PersistentStateComponent<Element>, ProjectModelElement {
|
||||
var loadedState: Map<String, String>? = null
|
||||
private set
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2017 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-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.
|
||||
package com.intellij.profile.codeInspection
|
||||
|
||||
import com.intellij.codeInspection.InspectionProfile
|
||||
@@ -49,7 +49,7 @@ private val defaultSchemeDigest = loadElement("""<component name="InspectionProj
|
||||
</profile>
|
||||
</component>""").digest()
|
||||
|
||||
@State(name = "InspectionProjectProfileManager", storages = arrayOf(Storage(value = "inspectionProfiles/profiles_settings.xml", exclusive = true)))
|
||||
@State(name = "InspectionProjectProfileManager", storages = [(Storage(value = "inspectionProfiles/profiles_settings.xml", exclusive = true))])
|
||||
class ProjectInspectionProfileManager(val project: Project,
|
||||
private val applicationProfileManager: InspectionProfileManager,
|
||||
private val scopeManager: DependencyValidationManager,
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// 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.
|
||||
package com.intellij.configurationStore
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
@@ -106,7 +92,7 @@ private class MyExternalizationSession(val externalizationSession: StateStorage.
|
||||
}
|
||||
|
||||
// ExportSettingsAction checks only "State" annotation presence, but doesn't require PersistentStateComponent implementation, so, we can just specify annotation
|
||||
@State(name = "ProjectManager", storages = arrayOf(Storage(FILE_SPEC)))
|
||||
@State(name = "ProjectManager", storages = [(Storage(FILE_SPEC))])
|
||||
private class DefaultProjectExportableAndSaveTrigger : SettingsSavingComponent {
|
||||
@Volatile
|
||||
var project: Project? = null
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// 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.
|
||||
package com.intellij.configurationStore
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
@@ -209,7 +195,7 @@ internal class ApplicationStoreTest {
|
||||
</application>""")
|
||||
}
|
||||
|
||||
@State(name = "A", storages = arrayOf(Storage("a.xml")), additionalExportFile = "foo")
|
||||
@State(name = "A", storages = [(Storage("a.xml"))], additionalExportFile = "foo")
|
||||
private open class A : PersistentStateComponent<TestState> {
|
||||
var options = TestState()
|
||||
|
||||
@@ -250,7 +236,7 @@ internal class ApplicationStoreTest {
|
||||
fun `modification tracker`() {
|
||||
testAppConfig.refreshVfs()
|
||||
|
||||
@State(name = "modificationTrackerA", storages = arrayOf(Storage("a.xml")))
|
||||
@State(name = "modificationTrackerA", storages = [(Storage("a.xml"))])
|
||||
open class A : PersistentStateComponent<TestState>, SimpleModificationTracker() {
|
||||
var options = TestState()
|
||||
|
||||
@@ -314,7 +300,7 @@ internal class ApplicationStoreTest {
|
||||
fun persistentStateComponentWithModificationTracker() {
|
||||
testAppConfig.refreshVfs()
|
||||
|
||||
@State(name = "TestPersistentStateComponentWithModificationTracker", storages = arrayOf(Storage("b.xml")))
|
||||
@State(name = "TestPersistentStateComponentWithModificationTracker", storages = [(Storage("b.xml"))])
|
||||
open class A : PersistentStateComponentWithModificationTracker<TestState> {
|
||||
var modificationCount = AtomicLong(0)
|
||||
|
||||
@@ -377,7 +363,7 @@ internal class ApplicationStoreTest {
|
||||
}
|
||||
|
||||
@Test fun `do not check if only format changed for non-roamable storage`() {
|
||||
@State(name = "A", storages = arrayOf(Storage(value = "b.xml", roamingType = RoamingType.DISABLED)))
|
||||
@State(name = "A", storages = [(Storage(value = "b.xml", roamingType = RoamingType.DISABLED))])
|
||||
class AWorkspace : A()
|
||||
|
||||
val oldContent = """<application><component name="A" foo="old" deprecated="old"/></application>"""
|
||||
@@ -403,7 +389,7 @@ internal class ApplicationStoreTest {
|
||||
}
|
||||
|
||||
@Test fun `other xml file as not-roamable without explicit roaming`() {
|
||||
@State(name = "A", storages = arrayOf(Storage(value = "other.xml")))
|
||||
@State(name = "A", storages = [(Storage(value = "other.xml"))])
|
||||
class AOther : A()
|
||||
|
||||
val component = AOther()
|
||||
@@ -470,7 +456,7 @@ internal class ApplicationStoreTest {
|
||||
var foo = "defaultValue"
|
||||
}
|
||||
|
||||
@State(name = "A", storages = arrayOf(Storage("new.xml"), Storage(value = "old.xml", deprecated = true)))
|
||||
@State(name = "A", storages = [(Storage("new.xml")), (Storage(value = "old.xml", deprecated = true))])
|
||||
class SeveralStoragesConfigured : Foo(), PersistentStateComponent<SeveralStoragesConfigured> {
|
||||
override fun getState(): SeveralStoragesConfigured? {
|
||||
return this
|
||||
@@ -481,7 +467,7 @@ internal class ApplicationStoreTest {
|
||||
}
|
||||
}
|
||||
|
||||
@State(name = "A", storages = arrayOf(Storage(value = "old.xml", deprecated = true), Storage("new.xml")))
|
||||
@State(name = "A", storages = [(Storage(value = "old.xml", deprecated = true)), (Storage("new.xml"))])
|
||||
class ActualStorageLast : Foo(), PersistentStateComponent<ActualStorageLast> {
|
||||
override fun getState() = this
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ internal class DefaultProjectStoreTest {
|
||||
|
||||
internal const val TEST_COMPONENT_NAME = "Foo"
|
||||
|
||||
@State(name = TEST_COMPONENT_NAME, storages = arrayOf(Storage(value = "testSchemes", stateSplitter = TestStateSplitter::class)))
|
||||
@State(name = TEST_COMPONENT_NAME, storages = [(Storage(value = "testSchemes", stateSplitter = TestStateSplitter::class))])
|
||||
private class TestComponent: PersistentStateComponent<Element> {
|
||||
private var element = Element("state")
|
||||
|
||||
|
||||
@@ -12,10 +12,7 @@ import com.intellij.util.xmlb.annotations.OptionTag
|
||||
import com.intellij.util.xmlb.annotations.XMap
|
||||
import java.util.*
|
||||
|
||||
@State(
|
||||
name = "DiffSettings",
|
||||
storages = arrayOf(Storage(value = DiffUtil.DIFF_CONFIG))
|
||||
)
|
||||
@State(name = "DiffSettings", storages = [(Storage(value = DiffUtil.DIFF_CONFIG))])
|
||||
class DiffSettingsHolder : PersistentStateComponent<DiffSettingsHolder.State> {
|
||||
data class SharedSettings(
|
||||
var GO_TO_NEXT_FILE_ON_NEXT_DIFFERENCE: Boolean = true
|
||||
|
||||
@@ -15,10 +15,7 @@ import com.intellij.util.xmlb.annotations.Transient
|
||||
import com.intellij.util.xmlb.annotations.XMap
|
||||
import java.util.*
|
||||
|
||||
@State(
|
||||
name = "TextDiffSettings",
|
||||
storages = arrayOf(Storage(value = DiffUtil.DIFF_CONFIG))
|
||||
)
|
||||
@State(name = "TextDiffSettings", storages = [(Storage(value = DiffUtil.DIFF_CONFIG))])
|
||||
class TextDiffSettingsHolder : PersistentStateComponent<TextDiffSettingsHolder.State> {
|
||||
companion object {
|
||||
@JvmField val CONTEXT_RANGE_MODES: IntArray = intArrayOf(1, 2, 4, 8, -1)
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.awt.RenderingHints
|
||||
import javax.swing.JComponent
|
||||
import javax.swing.SwingConstants
|
||||
|
||||
@State(name = "UISettings", storages = arrayOf(Storage("ui.lnf.xml")))
|
||||
@State(name = "UISettings", storages = [(Storage("ui.lnf.xml"))])
|
||||
class UISettings : BaseState(), PersistentStateComponent<UISettings> {
|
||||
// These font properties should not be set in the default ctor,
|
||||
// so that to make the serialization logic judge if a property
|
||||
|
||||
+2
-19
@@ -1,16 +1,4 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// 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.
|
||||
package com.intellij.codeInsight.hints.settings
|
||||
|
||||
import com.intellij.lang.Language
|
||||
@@ -21,7 +9,6 @@ import com.intellij.openapi.components.Storage
|
||||
import com.intellij.util.getAttributeBooleanValue
|
||||
import org.jdom.Element
|
||||
|
||||
|
||||
private object XmlTagHelper {
|
||||
val BLACKLISTS = "blacklists"
|
||||
val LANGUAGE_LIST = "blacklist"
|
||||
@@ -31,9 +18,7 @@ private object XmlTagHelper {
|
||||
val PATTERN = "pattern"
|
||||
}
|
||||
|
||||
|
||||
class Diff(val added: Set<String>, val removed: Set<String>) {
|
||||
|
||||
fun applyOn(base: Set<String>): Set<String> {
|
||||
val baseSet = base.toMutableSet()
|
||||
added.forEach { baseSet.add(it) }
|
||||
@@ -52,11 +37,9 @@ class Diff(val added: Set<String>, val removed: Set<String>) {
|
||||
return Diff(added, removed)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@State(name = "ParameterNameHintsSettings", storages = arrayOf(Storage("parameter.hints.xml")))
|
||||
@State(name = "ParameterNameHintsSettings", storages = [(Storage("parameter.hints.xml"))])
|
||||
class ParameterNameHintsSettings : PersistentStateComponent<Element> {
|
||||
private val removedPatterns = hashMapOf<String, Set<String>>()
|
||||
private val addedPatterns = hashMapOf<String, Set<String>>()
|
||||
|
||||
@@ -43,7 +43,7 @@ private const val OPTION = "option"
|
||||
private const val RECENT = "recent_temporary"
|
||||
|
||||
// open for Upsource (UpsourceRunManager overrides to disable loadState (empty impl))
|
||||
@State(name = "RunManager", defaultStateAsResource = true, storages = arrayOf(Storage(value = StoragePathMacros.WORKSPACE_FILE, useSaveThreshold = ThreeState.NO)))
|
||||
@State(name = "RunManager", defaultStateAsResource = true, storages = [(Storage(value = StoragePathMacros.WORKSPACE_FILE, useSaveThreshold = ThreeState.NO))])
|
||||
open class RunManagerImpl(internal val project: Project) : RunManagerEx(), PersistentStateComponent<Element>, Disposable {
|
||||
companion object {
|
||||
const val CONFIGURATION = "configuration"
|
||||
|
||||
+2
-18
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// 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.
|
||||
package com.intellij.ide.projectView.impl
|
||||
|
||||
import com.intellij.openapi.components.PersistentStateComponent
|
||||
@@ -24,9 +10,7 @@ import com.intellij.util.xmlb.XmlSerializerUtil
|
||||
/**
|
||||
* @author Konstantin Bulenkov
|
||||
*/
|
||||
@State(name = "ProjectViewSharedSettings",
|
||||
storages = arrayOf(Storage(value = "projectView.xml")))
|
||||
|
||||
@State(name = "ProjectViewSharedSettings", storages = [(Storage(value = "projectView.xml"))])
|
||||
class ProjectViewSharedSettings : PersistentStateComponent<ProjectViewSharedSettings> {
|
||||
var flattenPackages = false
|
||||
var showMembers = false
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 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-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.
|
||||
package com.intellij.openapi.module.impl
|
||||
|
||||
import com.intellij.notification.Notification
|
||||
@@ -22,7 +20,7 @@ import com.intellij.xml.util.XmlStringUtil
|
||||
*
|
||||
* @author nik
|
||||
*/
|
||||
@State(name = "AutomaticModuleUnloader", storages = arrayOf(Storage(StoragePathMacros.WORKSPACE_FILE)))
|
||||
@State(name = "AutomaticModuleUnloader", storages = [(Storage(StoragePathMacros.WORKSPACE_FILE))])
|
||||
class AutomaticModuleUnloader(private val project: Project) : PersistentStateComponent<LoadedModulesListStorage> {
|
||||
private val loadedModulesListStorage = LoadedModulesListStorage()
|
||||
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// 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.
|
||||
package com.intellij.diagnostic
|
||||
|
||||
import com.intellij.credentialStore.CredentialAttributes
|
||||
@@ -25,7 +11,7 @@ import com.intellij.openapi.components.State
|
||||
import com.intellij.openapi.components.Storage
|
||||
import com.intellij.util.io.decodeBase64
|
||||
|
||||
@State(name = "ErrorReportConfigurable", storages = arrayOf(Storage(value = "other.xml", deprecated = true, roamingType = RoamingType.DISABLED)))
|
||||
@State(name = "ErrorReportConfigurable", storages = [(Storage(value = "other.xml", deprecated = true, roamingType = RoamingType.DISABLED))])
|
||||
internal class ErrorReportConfigurable : PersistentStateComponent<OldState> {
|
||||
override fun getState() = OldState()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2017 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-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.
|
||||
package com.intellij.openapi.keymap.impl
|
||||
|
||||
import com.intellij.configurationStore.LazySchemeProcessor
|
||||
@@ -29,7 +29,7 @@ internal const val KEYMAPS_DIR_PATH = "keymaps"
|
||||
private const val ACTIVE_KEYMAP = "active_keymap"
|
||||
private const val NAME_ATTRIBUTE = "name"
|
||||
|
||||
@State(name = "KeymapManager", storages = arrayOf(Storage(value = "keymap.xml", roamingType = RoamingType.PER_OS)), additionalExportFile = KEYMAPS_DIR_PATH)
|
||||
@State(name = "KeymapManager", storages = [(Storage(value = "keymap.xml", roamingType = RoamingType.PER_OS))], additionalExportFile = KEYMAPS_DIR_PATH)
|
||||
class KeymapManagerImpl(defaultKeymap: DefaultKeymap, factory: SchemeManagerFactory) : KeymapManagerEx(), PersistentStateComponent<Element> {
|
||||
private val listeners = ContainerUtil.createLockFreeCopyOnWriteList<KeymapManagerListener>()
|
||||
private val boundShortcuts = THashMap<String, String>()
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.jdom.Element
|
||||
import java.awt.Frame
|
||||
import java.awt.Rectangle
|
||||
|
||||
@State(name = "ProjectFrameBounds", storages = arrayOf(Storage(StoragePathMacros.WORKSPACE_FILE)))
|
||||
@State(name = "ProjectFrameBounds", storages = [(Storage(StoragePathMacros.WORKSPACE_FILE))])
|
||||
class ProjectFrameBounds(private val project: Project) : PersistentStateComponent<FrameInfo>, ModificationTracker {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
||||
+2
-4
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 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-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.
|
||||
package com.intellij.openapi.module.impl
|
||||
|
||||
import com.intellij.openapi.components.PersistentStateComponent
|
||||
@@ -17,7 +15,7 @@ import org.jdom.Element
|
||||
/**
|
||||
* todo rename component state name to "ExternalProjectModuleManager" for consistency (2018.1 release)
|
||||
*/
|
||||
@State(name = "ExternalModuleListStorage", storages = arrayOf(Storage("modules.xml")), externalStorageOnly = true)
|
||||
@State(name = "ExternalModuleListStorage", storages = [(Storage("modules.xml"))], externalStorageOnly = true)
|
||||
internal class ExternalModuleListStorage(private val project: Project) : PersistentStateComponent<Element>, ProjectModelElement {
|
||||
var loadedState: Set<ModulePath>? = null
|
||||
private set
|
||||
|
||||
+2
-16
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// 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.
|
||||
package com.intellij.openapi.module.impl
|
||||
|
||||
import com.intellij.ProjectTopics
|
||||
@@ -37,7 +23,7 @@ import kotlin.concurrent.write
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
@State(name = "ModuleRenamingHistory", storages = arrayOf(Storage("modules.xml")))
|
||||
@State(name = "ModuleRenamingHistory", storages = [(Storage("modules.xml"))])
|
||||
class ModulePointerManagerImpl(private val project: Project) : ModulePointerManager(), PersistentStateComponent<ModuleRenamingHistoryState> {
|
||||
private val unresolved = MultiMap.createSmart<String, ModulePointerImpl>()
|
||||
private val pointers = MultiMap.createSmart<Module, ModulePointerImpl>()
|
||||
|
||||
+2
-16
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// 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.
|
||||
package com.intellij.openapi.roots.impl.libraries
|
||||
|
||||
import com.intellij.openapi.components.State
|
||||
@@ -27,7 +13,7 @@ import com.intellij.openapi.roots.libraries.LibraryTablesRegistrar
|
||||
import com.intellij.openapi.util.Pair
|
||||
import org.jdom.Element
|
||||
|
||||
@State(name = "libraryTable", storages = arrayOf(Storage(value = "libraries", stateSplitter = ProjectLibraryTable.LibraryStateSplitter::class)))
|
||||
@State(name = "libraryTable", storages = [(Storage(value = "libraries", stateSplitter = ProjectLibraryTable.LibraryStateSplitter::class))])
|
||||
open class ProjectLibraryTable(val project: Project) : LibraryTableBase() {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 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-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.
|
||||
package com.intellij.usages
|
||||
|
||||
import com.intellij.openapi.components.PersistentStateComponent
|
||||
@@ -8,7 +6,7 @@ import com.intellij.openapi.components.ServiceManager
|
||||
import com.intellij.openapi.components.State
|
||||
import com.intellij.openapi.components.Storage
|
||||
|
||||
@State(name = "ShowUsagesSettings", storages = arrayOf(Storage("usageView.xml")))
|
||||
@State(name = "ShowUsagesSettings", storages = [(Storage("usageView.xml"))])
|
||||
class ShowUsagesSettings : PersistentStateComponent<ShowUsageViewSettings> {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 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-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.
|
||||
package com.intellij.usages
|
||||
|
||||
import com.intellij.openapi.components.*
|
||||
@@ -11,7 +9,7 @@ import com.intellij.util.xmlb.annotations.Transient
|
||||
/**
|
||||
* Passed params will be used as default values, so, do not use constructor if instance will be used as a state (unless you want to change defaults)
|
||||
*/
|
||||
@State(name = "UsageViewSettings", storages = arrayOf(Storage("usageView.xml"), Storage(value = "other.xml", deprecated = true)))
|
||||
@State(name = "UsageViewSettings", storages = [(Storage("usageView.xml")), (Storage(value = "other.xml", deprecated = true))])
|
||||
open class UsageViewSettings(
|
||||
isGroupByFileStructure: Boolean = true,
|
||||
isGroupByModule: Boolean = true,
|
||||
|
||||
+2
-19
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// 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.
|
||||
package com.intellij.openapi.vcs.impl
|
||||
|
||||
import com.intellij.diff.util.Range
|
||||
@@ -30,10 +16,7 @@ import org.jdom.Element
|
||||
private typealias TrackerState = PartialLocalLineStatusTracker.State
|
||||
private typealias FullTrackerState = PartialLocalLineStatusTracker.FullState
|
||||
|
||||
@State(
|
||||
name = "LineStatusTrackerManager",
|
||||
storages = arrayOf(Storage(value = StoragePathMacros.WORKSPACE_FILE))
|
||||
)
|
||||
@State(name = "LineStatusTrackerManager", storages = [(Storage(value = StoragePathMacros.WORKSPACE_FILE))])
|
||||
class PartialLineStatusTrackerManagerState(
|
||||
private val project: Project,
|
||||
private val lineStatusTracker: LineStatusTrackerManager
|
||||
|
||||
@@ -47,7 +47,7 @@ private const val MODULE = "module"
|
||||
|
||||
private val LOG = Logger.getInstance(CopyrightManager::class.java)
|
||||
|
||||
@State(name = "CopyrightManager", storages = arrayOf(Storage(value = "copyright/profiles_settings.xml", exclusive = true)))
|
||||
@State(name = "CopyrightManager", storages = [(Storage(value = "copyright/profiles_settings.xml", exclusive = true))])
|
||||
class CopyrightManager @JvmOverloads constructor(private val project: Project, schemeManagerFactory: SchemeManagerFactory, isSupportIprProjects: Boolean = true) : PersistentStateComponent<Element> {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 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-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.
|
||||
package org.jetbrains.settingsRepository
|
||||
|
||||
import com.intellij.openapi.components.PersistentStateComponent
|
||||
@@ -9,7 +7,7 @@ import com.intellij.openapi.components.Storage
|
||||
import com.intellij.openapi.components.StoragePathMacros
|
||||
import com.intellij.util.xmlb.XmlSerializerUtil
|
||||
|
||||
@State(name = "IcsProjectId", storages = arrayOf(Storage(StoragePathMacros.WORKSPACE_FILE)))
|
||||
@State(name = "IcsProjectId", storages = [(Storage(StoragePathMacros.WORKSPACE_FILE))])
|
||||
class ProjectId : PersistentStateComponent<ProjectId> {
|
||||
var uid: String? = null
|
||||
var path: String? = null
|
||||
|
||||
@@ -12,11 +12,7 @@ import com.intellij.util.xmlb.annotations.OptionTag
|
||||
import com.intellij.util.xmlb.annotations.XMap
|
||||
import java.util.*
|
||||
|
||||
|
||||
@State(
|
||||
name = "SvnDiffSettings",
|
||||
storages = arrayOf(Storage(value = DiffUtil.DIFF_CONFIG))
|
||||
)
|
||||
@State(name = "SvnDiffSettings", storages = [(Storage(value = DiffUtil.DIFF_CONFIG))])
|
||||
class SvnDiffSettingsHolder : PersistentStateComponent<SvnDiffSettingsHolder.State> {
|
||||
class SharedSettings(
|
||||
)
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// 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.
|
||||
package org.jetbrains.plugins.terminal
|
||||
|
||||
import com.intellij.openapi.components.PersistentStateComponent
|
||||
@@ -26,7 +12,7 @@ import java.io.File
|
||||
* @author traff
|
||||
*/
|
||||
|
||||
@State(name = "TerminalOptionsProvider", storages = arrayOf(Storage("terminal.xml")))
|
||||
@State(name = "TerminalOptionsProvider", storages = [(Storage("terminal.xml"))])
|
||||
class TerminalOptionsProvider : PersistentStateComponent<TerminalOptionsProvider.State> {
|
||||
private val myState = State()
|
||||
|
||||
@@ -125,7 +111,7 @@ class TerminalOptionsProvider : PersistentStateComponent<TerminalOptionsProvider
|
||||
}
|
||||
|
||||
fun highlightHyperlinks(): Boolean {
|
||||
return myState.myHighlightHyperlinks;
|
||||
return myState.myHighlightHyperlinks
|
||||
}
|
||||
|
||||
fun setHighlightHyperlinks(highlight: Boolean) {
|
||||
|
||||
+2
-16
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// 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.
|
||||
package org.jetbrains.plugins.terminal
|
||||
|
||||
import com.intellij.openapi.components.PersistentStateComponent
|
||||
@@ -30,7 +16,7 @@ import kotlin.reflect.KProperty
|
||||
/**
|
||||
* @author traff
|
||||
*/
|
||||
@State(name = "TerminalProjectOptionsProvider", storages = arrayOf(Storage("terminal.xml")))
|
||||
@State(name = "TerminalProjectOptionsProvider", storages = [(Storage("terminal.xml"))])
|
||||
class TerminalProjectOptionsProvider(val project: Project) : PersistentStateComponent<TerminalProjectOptionsProvider.State> {
|
||||
|
||||
private val myState = State()
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2017 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-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.
|
||||
package com.jetbrains.python.sdk
|
||||
|
||||
import com.intellij.openapi.components.PersistentStateComponent
|
||||
@@ -109,7 +109,7 @@ class SettingsState {
|
||||
var virtualEnvActivate = true
|
||||
}
|
||||
|
||||
@State(name = "PyVirtualEnvTerminalCustomizer", storages = arrayOf(Storage("python-terminal.xml")))
|
||||
@State(name = "PyVirtualEnvTerminalCustomizer", storages = [(Storage("python-terminal.xml"))])
|
||||
class PyVirtualEnvTerminalSettings : PersistentStateComponent<SettingsState> {
|
||||
var myState = SettingsState()
|
||||
|
||||
|
||||
@@ -1,6 +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-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.
|
||||
package com.jetbrains.python.sdk
|
||||
|
||||
import com.intellij.application.options.ReplacePathToMacroMap
|
||||
@@ -16,7 +14,7 @@ import org.jetbrains.jps.model.serialization.PathMacroUtil
|
||||
/**
|
||||
* @author vlan
|
||||
*/
|
||||
@State(name = "PySdkSettings", storages = arrayOf(Storage(value = "py_sdk_settings.xml", roamingType = RoamingType.DISABLED)))
|
||||
@State(name = "PySdkSettings", storages = [(Storage(value = "py_sdk_settings.xml", roamingType = RoamingType.DISABLED))])
|
||||
class PySdkSettings : PersistentStateComponent<PySdkSettings.State> {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
||||
Reference in New Issue
Block a user