diff --git a/images/src/org/intellij/images/search/ImageTagManager.java b/images/src/org/intellij/images/search/ImageTagManager.java index 0fd96ae57226..01693f04c204 100644 --- a/images/src/org/intellij/images/search/ImageTagManager.java +++ b/images/src/org/intellij/images/search/ImageTagManager.java @@ -1,17 +1,5 @@ /* - * 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-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. */ package org.intellij.images.search; @@ -21,10 +9,10 @@ import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.util.xmlb.annotations.AbstractCollection; import com.intellij.util.xmlb.annotations.MapAnnotation; import com.intellij.util.xmlb.annotations.Property; import com.intellij.util.xmlb.annotations.Tag; +import com.intellij.util.xmlb.annotations.XCollection; import org.jetbrains.annotations.Nullable; import java.util.*; @@ -92,7 +80,7 @@ public class ImageTagManager implements PersistentStateComponent myFiles = new LinkedHashSet<>(); public void remove(String path) { diff --git a/java/compiler/impl/src/com/intellij/packaging/impl/compiler/ArtifactsWorkspaceSettings.java b/java/compiler/impl/src/com/intellij/packaging/impl/compiler/ArtifactsWorkspaceSettings.java index ac0cbabadd65..6c76b98ac94a 100644 --- a/java/compiler/impl/src/com/intellij/packaging/impl/compiler/ArtifactsWorkspaceSettings.java +++ b/java/compiler/impl/src/com/intellij/packaging/impl/compiler/ArtifactsWorkspaceSettings.java @@ -1,17 +1,5 @@ /* - * 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-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. */ package com.intellij.packaging.impl.compiler; @@ -20,8 +8,7 @@ import com.intellij.openapi.project.Project; import com.intellij.packaging.artifacts.Artifact; import com.intellij.packaging.artifacts.ArtifactManager; import com.intellij.util.containers.ContainerUtil; -import com.intellij.util.xmlb.annotations.AbstractCollection; -import com.intellij.util.xmlb.annotations.Tag; +import com.intellij.util.xmlb.annotations.XCollection; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; @@ -74,8 +61,7 @@ public class ArtifactsWorkspaceSettings implements PersistentStateComponent myArtifactsToBuild = new ArrayList<>(); } diff --git a/java/debugger/impl/src/com/intellij/debugger/memory/component/InstancesTracker.java b/java/debugger/impl/src/com/intellij/debugger/memory/component/InstancesTracker.java index b80898f70b3d..fb9ac93e55a3 100644 --- a/java/debugger/impl/src/com/intellij/debugger/memory/component/InstancesTracker.java +++ b/java/debugger/impl/src/com/intellij/debugger/memory/component/InstancesTracker.java @@ -1,30 +1,18 @@ /* - * 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-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. */ package com.intellij.debugger.memory.component; +import com.intellij.debugger.memory.event.InstancesTrackerListener; +import com.intellij.debugger.memory.tracking.TrackingType; import com.intellij.openapi.Disposable; import com.intellij.openapi.components.*; import com.intellij.openapi.project.Project; import com.intellij.util.EventDispatcher; import com.intellij.util.containers.HashMap; -import com.intellij.util.xmlb.annotations.AbstractCollection; +import com.intellij.util.xmlb.annotations.XCollection; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import com.intellij.debugger.memory.event.InstancesTrackerListener; -import com.intellij.debugger.memory.tracking.TrackingType; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -112,8 +100,8 @@ public class InstancesTracker extends AbstractProjectComponent static class MyState { boolean isBackgroundTrackingEnabled = false; - @AbstractCollection(surroundWithTag = false, elementTypes = {Map.Entry.class}) final Map classes = - new ConcurrentHashMap<>(); + @XCollection(elementTypes = {Map.Entry.class}) + final Map classes = new ConcurrentHashMap<>(); MyState() { } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorSettings.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorSettings.java index e96adb15f7bc..7a8fb7c7ce79 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorSettings.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorSettings.java @@ -1,17 +1,5 @@ /* - * Copyright 2000-2009 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-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. */ package com.intellij.openapi.roots.ui.configuration.artifacts; @@ -19,8 +7,8 @@ import com.intellij.openapi.components.PersistentStateComponent; import com.intellij.packaging.elements.ComplexPackagingElementType; import com.intellij.packaging.elements.PackagingElementFactory; import com.intellij.packaging.elements.PackagingElementType; -import com.intellij.util.xmlb.annotations.AbstractCollection; import com.intellij.util.xmlb.annotations.Tag; +import com.intellij.util.xmlb.annotations.XCollection; import java.util.ArrayList; import java.util.Collection; @@ -84,8 +72,7 @@ public class ArtifactEditorSettings implements PersistentStateComponent myTypesToShowContentIds = new ArrayList<>(); } } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/ProjectStructureProblemsSettingsBase.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/ProjectStructureProblemsSettingsBase.java index 1290f434e696..a3e609651a40 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/ProjectStructureProblemsSettingsBase.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/ProjectStructureProblemsSettingsBase.java @@ -1,25 +1,12 @@ /* - * Copyright 2000-2011 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-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. */ package com.intellij.openapi.roots.ui.configuration.projectRoot.daemon; import com.intellij.openapi.components.PersistentStateComponent; import com.intellij.util.containers.SortedList; import com.intellij.util.xmlb.XmlSerializerUtil; -import com.intellij.util.xmlb.annotations.AbstractCollection; -import com.intellij.util.xmlb.annotations.Tag; +import com.intellij.util.xmlb.annotations.XCollection; import org.jetbrains.annotations.NotNull; import java.util.List; @@ -28,8 +15,7 @@ import java.util.List; * @author nik */ public class ProjectStructureProblemsSettingsBase extends ProjectStructureProblemsSettings implements PersistentStateComponent { - @AbstractCollection(surroundWithTag = false, elementTag = "problem", elementValueAttribute = "id") - @Tag("ignored-problems") + @XCollection(propertyElementName = "ignored-problems", elementName = "problem", valueAttributeName = "id") public List myIgnoredProblems = new SortedList<>(String.CASE_INSENSITIVE_ORDER); @Override diff --git a/java/manifest/src/org/jetbrains/lang/manifest/highlighting/MisspelledHeaderInspection.java b/java/manifest/src/org/jetbrains/lang/manifest/highlighting/MisspelledHeaderInspection.java index 3b9d56188f7a..98d6376c4da8 100644 --- a/java/manifest/src/org/jetbrains/lang/manifest/highlighting/MisspelledHeaderInspection.java +++ b/java/manifest/src/org/jetbrains/lang/manifest/highlighting/MisspelledHeaderInspection.java @@ -39,7 +39,7 @@ import com.intellij.ui.DocumentAdapter; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; import com.intellij.util.text.EditDistance; -import com.intellij.util.xmlb.annotations.AbstractCollection; +import com.intellij.util.xmlb.annotations.XCollection; import gnu.trove.THashSet; import org.jetbrains.annotations.NotNull; import org.jetbrains.lang.manifest.ManifestBundle; @@ -60,7 +60,7 @@ public class MisspelledHeaderInspection extends LocalInspectionTool { private static final int MAX_DISTANCE = 4; private static final int TYPO_DISTANCE = 2; - @AbstractCollection(surroundWithTag = false, elementTag = "header") + @XCollection(elementName = "header") public final Set CUSTOM_HEADERS = new THashSet<>(CaseInsensitiveStringHashingStrategy.INSTANCE); private final HeaderParserRepository myRepository; diff --git a/platform/analysis-api/src/com/intellij/psi/search/scope/packageSet/NamedScopeManager.java b/platform/analysis-api/src/com/intellij/psi/search/scope/packageSet/NamedScopeManager.java index d8429b606281..d146a2291081 100644 --- a/platform/analysis-api/src/com/intellij/psi/search/scope/packageSet/NamedScopeManager.java +++ b/platform/analysis-api/src/com/intellij/psi/search/scope/packageSet/NamedScopeManager.java @@ -1,17 +1,5 @@ /* - * 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-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. */ package com.intellij.psi.search.scope.packageSet; @@ -24,8 +12,7 @@ import com.intellij.openapi.components.StoragePathMacros; import com.intellij.openapi.project.Project; import com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters; import com.intellij.util.xmlb.XmlSerializer; -import com.intellij.util.xmlb.annotations.AbstractCollection; -import com.intellij.util.xmlb.annotations.Tag; +import com.intellij.util.xmlb.annotations.XCollection; import org.jdom.Element; import javax.swing.*; @@ -68,8 +55,7 @@ public class NamedScopeManager extends NamedScopesHolder { } public static class OrderState { - @Tag("order") - @AbstractCollection(surroundWithTag = false, elementTag = "scope", elementValueAttribute = "name") + @XCollection(elementName = "scope", valueAttributeName = "name", propertyElementName = "order") public List myOrder = new ArrayList<>(); @Override diff --git a/platform/configuration-store-impl/testSrc/xml/XmlSerializerCollectionTest.kt b/platform/configuration-store-impl/testSrc/xml/XmlSerializerCollectionTest.kt index 6e4521d33bd7..63460139b03e 100644 --- a/platform/configuration-store-impl/testSrc/xml/XmlSerializerCollectionTest.kt +++ b/platform/configuration-store-impl/testSrc/xml/XmlSerializerCollectionTest.kt @@ -122,7 +122,7 @@ internal class XmlSerializerCollectionTest { @Test fun arrayWithoutTag() { @Tag("bean") class Bean { - @AbstractCollection(elementTag = "vvalue", elementValueAttribute = "v", surroundWithTag = false) + @XCollection(elementName = "vvalue", valueAttributeName = "v") var v = arrayOf("a", "b") var INT_V = 1 } diff --git a/platform/configuration-store-impl/testSrc/xml/XmlSerializerTest.kt b/platform/configuration-store-impl/testSrc/xml/XmlSerializerTest.kt index 542d30aa121e..55e144f9396d 100644 --- a/platform/configuration-store-impl/testSrc/xml/XmlSerializerTest.kt +++ b/platform/configuration-store-impl/testSrc/xml/XmlSerializerTest.kt @@ -25,7 +25,6 @@ import com.intellij.testFramework.assertConcurrent import com.intellij.util.loadElement import com.intellij.util.xmlb.* import com.intellij.util.xmlb.annotations.* -import com.intellij.util.xmlb.annotations.AbstractCollection import junit.framework.TestCase import org.assertj.core.api.Assertions.assertThat import org.intellij.lang.annotations.Language @@ -255,7 +254,7 @@ internal class XmlSerializerTest { @Test fun filterSerializer() { val bean = BeanWithPublicFields() - assertSerializer(bean, "\n" + " ", SerializationFilter { accessor, bean -> accessor.name.startsWith("I") }) + assertSerializer(bean, "\n" + " ", SerializationFilter { accessor, _ -> accessor.name.startsWith("I") }) } @Test fun transient() { @@ -320,7 +319,7 @@ internal class XmlSerializerTest { @Tag("bean") private class BeanWithArrayWithoutAllTag { @Property(surroundWithTag = false) - @AbstractCollection(elementTag = "vvalue", elementValueAttribute = "v", surroundWithTag = false) + @XCollection(elementName = "vvalue", valueAttributeName = "v") var v = arrayOf("a", "b") var intV = 1 @@ -350,7 +349,7 @@ internal class XmlSerializerTest { @Tag("bean") class BeanWithArrayWithoutAllTag2 { @Property(surroundWithTag = false) - @AbstractCollection(elementTag = "vvalue", elementValueAttribute = "", surroundWithTag = false) + @XCollection(elementName = "vvalue", valueAttributeName = "") var v = arrayOf("a", "b") var intV = 1 } diff --git a/platform/core-api/src/com/intellij/ide/plugins/PluginBean.java b/platform/core-api/src/com/intellij/ide/plugins/PluginBean.java index 22b279707a09..db7821944750 100644 --- a/platform/core-api/src/com/intellij/ide/plugins/PluginBean.java +++ b/platform/core-api/src/com/intellij/ide/plugins/PluginBean.java @@ -4,7 +4,10 @@ package com.intellij.ide.plugins; import com.intellij.openapi.components.OldComponentConfig; -import com.intellij.util.xmlb.annotations.*; +import com.intellij.util.xmlb.annotations.Attribute; +import com.intellij.util.xmlb.annotations.Property; +import com.intellij.util.xmlb.annotations.Tag; +import com.intellij.util.xmlb.annotations.XCollection; import org.jdom.Element; import org.jetbrains.annotations.NonNls; @@ -85,6 +88,6 @@ public class PluginBean { public boolean allowBundledUpdate; @Property(surroundWithTag = false) - @AbstractCollection(surroundWithTag = false, elementTag = "module") + @XCollection(elementName = "module") public List modules = new ArrayList<>(); } diff --git a/platform/projectModel-impl/src/com/intellij/openapi/module/impl/UnloadedModulesListStorage.java b/platform/projectModel-impl/src/com/intellij/openapi/module/impl/UnloadedModulesListStorage.java index ad1e21b51669..962816a3a5fe 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/module/impl/UnloadedModulesListStorage.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/module/impl/UnloadedModulesListStorage.java @@ -1,25 +1,13 @@ /* - * 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-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. */ package com.intellij.openapi.module.impl; import com.intellij.openapi.components.*; import com.intellij.openapi.project.Project; import com.intellij.util.xmlb.XmlSerializerUtil; -import com.intellij.util.xmlb.annotations.AbstractCollection; import com.intellij.util.xmlb.annotations.Property; +import com.intellij.util.xmlb.annotations.XCollection; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -38,7 +26,7 @@ public class UnloadedModulesListStorage implements PersistentStateComponent getUnloadedModuleNames() { return myModuleNames; } diff --git a/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/clientLibrary/ClientLibraryManagerImpl.java b/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/clientLibrary/ClientLibraryManagerImpl.java index 233a25d2b271..11dde04c61c6 100644 --- a/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/clientLibrary/ClientLibraryManagerImpl.java +++ b/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/clientLibrary/ClientLibraryManagerImpl.java @@ -19,8 +19,10 @@ import com.intellij.remoteServer.runtime.clientLibrary.ClientLibraryDescription; import com.intellij.remoteServer.runtime.clientLibrary.ClientLibraryManager; import com.intellij.util.EventDispatcher; import com.intellij.util.download.*; -import com.intellij.util.xmlb.annotations.AbstractCollection; -import com.intellij.util.xmlb.annotations.*; +import com.intellij.util.xmlb.annotations.Attribute; +import com.intellij.util.xmlb.annotations.Property; +import com.intellij.util.xmlb.annotations.Tag; +import com.intellij.util.xmlb.annotations.XCollection; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -172,7 +174,7 @@ public class ClientLibraryManagerImpl extends ClientLibraryManager implements Pe public String myId; @Property(surroundWithTag = false) - @AbstractCollection(surroundWithTag = false, elementTag = "file", elementValueAttribute = "path") + @XCollection(elementName = "file", valueAttributeName = "path") public List myPaths = new ArrayList<>(); } diff --git a/platform/util/src/com/intellij/util/xmlb/annotations/AbstractCollection.java b/platform/util/src/com/intellij/util/xmlb/annotations/AbstractCollection.java index b4ec8971c45a..5011cda12997 100644 --- a/platform/util/src/com/intellij/util/xmlb/annotations/AbstractCollection.java +++ b/platform/util/src/com/intellij/util/xmlb/annotations/AbstractCollection.java @@ -1,17 +1,5 @@ /* - * 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-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. */ package com.intellij.util.xmlb.annotations; @@ -22,6 +10,9 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * @deprecated Use {@link XCollection} + */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface AbstractCollection { diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsConfiguration.java b/platform/vcs-api/src/com/intellij/openapi/vcs/VcsConfiguration.java index 74ace4355bf9..40a05ae9d7e5 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsConfiguration.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/VcsConfiguration.java @@ -13,7 +13,10 @@ import com.intellij.openapi.vcs.versionBrowser.ChangeBrowserSettings; import com.intellij.util.PlatformUtils; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.xmlb.XmlSerializerUtil; -import com.intellij.util.xmlb.annotations.*; +import com.intellij.util.xmlb.annotations.OptionTag; +import com.intellij.util.xmlb.annotations.Property; +import com.intellij.util.xmlb.annotations.Transient; +import com.intellij.util.xmlb.annotations.XCollection; import gnu.trove.THashMap; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -111,7 +114,7 @@ public final class VcsConfiguration implements PersistentStateComponent myLastCommitMessages = new ArrayList<>(); public String LAST_COMMIT_MESSAGE = null; public boolean MAKE_NEW_CHANGELIST_ACTIVE = false; diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogBigRepositoriesList.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogBigRepositoriesList.java index 619c79989ec0..85687ead9b1c 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogBigRepositoriesList.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogBigRepositoriesList.java @@ -1,4 +1,6 @@ -// 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-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. + */ package com.intellij.vcs.log.data.index; import com.intellij.openapi.components.PersistentStateComponent; @@ -7,7 +9,7 @@ import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.containers.ContainerUtil; -import com.intellij.util.xmlb.annotations.AbstractCollection; +import com.intellij.util.xmlb.annotations.XCollection; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -63,7 +65,7 @@ public class VcsLogBigRepositoriesList implements PersistentStateComponent REPOSITORIES = ContainerUtil.newTreeSet(); public State() { diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointsDialogState.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointsDialogState.java index 6b71e1dab6a2..82705abfd5a8 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointsDialogState.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointsDialogState.java @@ -1,24 +1,12 @@ /* - * 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-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. */ package com.intellij.xdebugger.impl.breakpoints; import com.intellij.ide.util.treeView.TreeState; -import com.intellij.util.xmlb.annotations.AbstractCollection; import com.intellij.util.xmlb.annotations.Tag; import com.intellij.util.xmlb.annotations.Transient; +import com.intellij.util.xmlb.annotations.XCollection; import java.util.HashSet; import java.util.Set; @@ -33,8 +21,7 @@ public class XBreakpointsDialogState { @Transient // Not saved for now private TreeState myTreeState = null; - @Tag("selected-grouping-rules") - @AbstractCollection(surroundWithTag = false, elementTag = "grouping-rule", elementValueAttribute = "id") + @XCollection(propertyElementName = "selected-grouping-rules", elementName = "grouping-rule", valueAttributeName = "id") public Set getSelectedGroupingRules() { return mySelectedGroupingRules; } diff --git a/plugins/google-app-engine/jps-plugin/src/org/jetbrains/jps/appengine/model/impl/AppEngineModuleExtensionProperties.java b/plugins/google-app-engine/jps-plugin/src/org/jetbrains/jps/appengine/model/impl/AppEngineModuleExtensionProperties.java index 36d4c6b13608..af6b53a51141 100644 --- a/plugins/google-app-engine/jps-plugin/src/org/jetbrains/jps/appengine/model/impl/AppEngineModuleExtensionProperties.java +++ b/plugins/google-app-engine/jps-plugin/src/org/jetbrains/jps/appengine/model/impl/AppEngineModuleExtensionProperties.java @@ -1,22 +1,10 @@ /* - * Copyright 2000-2013 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-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. */ package org.jetbrains.jps.appengine.model.impl; -import com.intellij.util.xmlb.annotations.AbstractCollection; import com.intellij.util.xmlb.annotations.Tag; +import com.intellij.util.xmlb.annotations.XCollection; import org.jetbrains.jps.appengine.model.PersistenceApi; import java.util.ArrayList; @@ -32,8 +20,7 @@ public class AppEngineModuleExtensionProperties { @Tag("run-enhancer-on-make") public boolean myRunEnhancerOnMake = false; - @Tag("files-to-enhance") - @AbstractCollection(surroundWithTag = false, elementTag = "file", elementValueAttribute = "path") + @XCollection(propertyElementName = "files-to-enhance", elementName = "file", valueAttributeName = "path") public List myFilesToEnhance = new ArrayList<>(); @Tag("persistence-api") diff --git a/plugins/tasks/tasks-core/src/com/intellij/tasks/generic/GenericRepository.java b/plugins/tasks/tasks-core/src/com/intellij/tasks/generic/GenericRepository.java index 93f74053e69c..549ba74f212e 100644 --- a/plugins/tasks/tasks-core/src/com/intellij/tasks/generic/GenericRepository.java +++ b/plugins/tasks/tasks-core/src/com/intellij/tasks/generic/GenericRepository.java @@ -1,17 +1,5 @@ /* - * Copyright 2000-2014 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-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. */ package com.intellij.tasks.generic; @@ -25,8 +13,8 @@ import com.intellij.tasks.TaskRepositoryType; import com.intellij.tasks.impl.BaseRepositoryImpl; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.net.HTTPMethod; -import com.intellij.util.xmlb.annotations.AbstractCollection; import com.intellij.util.xmlb.annotations.Tag; +import com.intellij.util.xmlb.annotations.XCollection; import org.apache.commons.httpclient.Header; import org.apache.commons.httpclient.HttpMethod; import org.apache.commons.httpclient.HttpStatus; @@ -363,13 +351,12 @@ public class GenericRepository extends BaseRepositoryImpl { return myResponseHandlersMap.get(myResponseType); } - @AbstractCollection( + @XCollection( elementTypes = { XPathResponseHandler.class, JsonPathResponseHandler.class, RegExResponseHandler.class - }, - surroundWithTag = false + } ) public List getResponseHandlers() { Collection handlers = myResponseHandlersMap.values(); diff --git a/spellchecker/src/com/intellij/spellchecker/state/DictionaryState.java b/spellchecker/src/com/intellij/spellchecker/state/DictionaryState.java index a509240adf5c..67adc19449b3 100644 --- a/spellchecker/src/com/intellij/spellchecker/state/DictionaryState.java +++ b/spellchecker/src/com/intellij/spellchecker/state/DictionaryState.java @@ -1,27 +1,15 @@ /* - * 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-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. */ package com.intellij.spellchecker.state; import com.intellij.openapi.components.PersistentStateComponent; import com.intellij.spellchecker.dictionary.EditableDictionary; import com.intellij.spellchecker.dictionary.UserDictionary; -import com.intellij.util.xmlb.annotations.AbstractCollection; import com.intellij.util.xmlb.annotations.Attribute; import com.intellij.util.xmlb.annotations.Tag; import com.intellij.util.xmlb.annotations.Transient; +import com.intellij.util.xmlb.annotations.XCollection; import gnu.trove.THashSet; import org.jetbrains.annotations.NotNull; @@ -31,7 +19,7 @@ import java.util.Set; public class DictionaryState implements PersistentStateComponent { public static final String NAME_ATTRIBUTE = "name"; - @Tag("words") @AbstractCollection(surroundWithTag = false, elementTag = "w", elementValueAttribute = "") + @XCollection(style = XCollection.Style.v2, elementName = "w", valueAttributeName = "") public Set words = new THashSet<>(); @Attribute(NAME_ATTRIBUTE) diff --git a/spellchecker/src/com/intellij/spellchecker/state/ProjectDictionaryState.java b/spellchecker/src/com/intellij/spellchecker/state/ProjectDictionaryState.java index 7b320e70ee94..3a83f967609a 100644 --- a/spellchecker/src/com/intellij/spellchecker/state/ProjectDictionaryState.java +++ b/spellchecker/src/com/intellij/spellchecker/state/ProjectDictionaryState.java @@ -1,17 +1,5 @@ /* - * 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-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. */ package com.intellij.spellchecker.state; @@ -21,9 +9,9 @@ import com.intellij.openapi.components.Storage; import com.intellij.spellchecker.dictionary.EditableDictionary; import com.intellij.spellchecker.dictionary.ProjectDictionary; import com.intellij.util.EventDispatcher; -import com.intellij.util.xmlb.annotations.AbstractCollection; import com.intellij.util.xmlb.annotations.Property; import com.intellij.util.xmlb.annotations.Transient; +import com.intellij.util.xmlb.annotations.XCollection; import gnu.trove.THashSet; import java.util.ArrayList; @@ -32,7 +20,8 @@ import java.util.Set; @State(name = "ProjectDictionaryState", storages = @Storage(value = "dictionaries", stateSplitter = ProjectDictionarySplitter.class)) public class ProjectDictionaryState implements PersistentStateComponent { - @Property(surroundWithTag = false) @AbstractCollection(surroundWithTag = false, elementTypes = DictionaryState.class) + @Property(surroundWithTag = false) + @XCollection(elementTypes = DictionaryState.class) public List dictionaryStates = new ArrayList<>(); private ProjectDictionary projectDictionary;