mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
deprecate AbstractCollection in favour of XCollection
This commit is contained in:
@@ -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<ImageTagManager
|
||||
@Tag("files")
|
||||
public static class Files {
|
||||
@Property(surroundWithTag = false)
|
||||
@AbstractCollection(surroundWithTag = false, elementTag = "file", elementValueAttribute = "path")
|
||||
@XCollection(elementName = "file", valueAttributeName = "path")
|
||||
public final Set<String> myFiles = new LinkedHashSet<>();
|
||||
|
||||
public void remove(String path) {
|
||||
|
||||
+3
-17
@@ -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<Arti
|
||||
}
|
||||
|
||||
public static class ArtifactsWorkspaceSettingsState {
|
||||
@Tag("artifacts-to-build")
|
||||
@AbstractCollection(surroundWithTag = false, elementTag = "artifact", elementValueAttribute = "name")
|
||||
@XCollection(propertyElementName = "artifacts-to-build", elementName = "artifact", valueAttributeName = "name")
|
||||
public List<String> myArtifactsToBuild = new ArrayList<>();
|
||||
|
||||
}
|
||||
|
||||
+6
-18
@@ -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<String, TrackingType> classes =
|
||||
new ConcurrentHashMap<>();
|
||||
@XCollection(elementTypes = {Map.Entry.class})
|
||||
final Map<String, TrackingType> classes = new ConcurrentHashMap<>();
|
||||
|
||||
MyState() {
|
||||
}
|
||||
|
||||
+3
-16
@@ -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<Artifact
|
||||
public static class ArtifactEditorSettingsState {
|
||||
@Tag("show-sorted")
|
||||
public boolean mySortElements = true;
|
||||
@Tag("show-content")
|
||||
@AbstractCollection(surroundWithTag = false, elementTag = "type", elementValueAttribute = "id")
|
||||
@XCollection(elementName = "type", valueAttributeName = "id", propertyElementName = "show-content")
|
||||
public List<String> myTypesToShowContentIds = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
+3
-17
@@ -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<ProjectStructureProblemsSettingsBase> {
|
||||
@AbstractCollection(surroundWithTag = false, elementTag = "problem", elementValueAttribute = "id")
|
||||
@Tag("ignored-problems")
|
||||
@XCollection(propertyElementName = "ignored-problems", elementName = "problem", valueAttributeName = "id")
|
||||
public List<String> myIgnoredProblems = new SortedList<>(String.CASE_INSENSITIVE_ORDER);
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -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<String> CUSTOM_HEADERS = new THashSet<>(CaseInsensitiveStringHashingStrategy.INSTANCE);
|
||||
|
||||
private final HeaderParserRepository myRepository;
|
||||
|
||||
+3
-17
@@ -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<String> myOrder = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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, "<BeanWithPublicFields>\n" + " <option name=\"INT_V\" value=\"1\" />\n" + "</BeanWithPublicFields>", SerializationFilter { accessor, bean -> accessor.name.startsWith("I") })
|
||||
assertSerializer(bean, "<BeanWithPublicFields>\n" + " <option name=\"INT_V\" value=\"1\" />\n" + "</BeanWithPublicFields>", 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
|
||||
}
|
||||
|
||||
@@ -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<String> modules = new ArrayList<>();
|
||||
}
|
||||
|
||||
+3
-15
@@ -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<Unlo
|
||||
}
|
||||
|
||||
@Property(surroundWithTag = false)
|
||||
@AbstractCollection(surroundWithTag = false, elementTag = "module", elementValueAttribute = "name")
|
||||
@XCollection(elementName = "module", valueAttributeName = "name")
|
||||
public List<String> getUnloadedModuleNames() {
|
||||
return myModuleNames;
|
||||
}
|
||||
|
||||
+5
-3
@@ -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<String> myPaths = new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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<VcsConfi
|
||||
public boolean CLEAR_INITIAL_COMMIT_MESSAGE = false;
|
||||
|
||||
@Property(surroundWithTag = false)
|
||||
@AbstractCollection(elementTag = "MESSAGE", surroundWithTag = false)
|
||||
@XCollection(elementName = "MESSAGE")
|
||||
public List<String> myLastCommitMessages = new ArrayList<>();
|
||||
public String LAST_COMMIT_MESSAGE = null;
|
||||
public boolean MAKE_NEW_CHANGELIST_ACTIVE = false;
|
||||
|
||||
+5
-3
@@ -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<VcsLo
|
||||
}
|
||||
|
||||
public static class State {
|
||||
@AbstractCollection(surroundWithTag = false, elementTag = "repository", elementValueAttribute = "path")
|
||||
@XCollection(elementName = "repository", valueAttributeName = "path")
|
||||
public SortedSet<String> REPOSITORIES = ContainerUtil.newTreeSet();
|
||||
|
||||
public State() {
|
||||
|
||||
+3
-16
@@ -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<String> getSelectedGroupingRules() {
|
||||
return mySelectedGroupingRules;
|
||||
}
|
||||
|
||||
+3
-16
@@ -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<String> myFilesToEnhance = new ArrayList<>();
|
||||
|
||||
@Tag("persistence-api")
|
||||
|
||||
@@ -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<ResponseHandler> getResponseHandlers() {
|
||||
Collection<ResponseHandler> handlers = myResponseHandlersMap.values();
|
||||
|
||||
@@ -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<DictionaryState> {
|
||||
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<String> words = new THashSet<>();
|
||||
|
||||
@Attribute(NAME_ATTRIBUTE)
|
||||
|
||||
@@ -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<ProjectDictionaryState> {
|
||||
@Property(surroundWithTag = false) @AbstractCollection(surroundWithTag = false, elementTypes = DictionaryState.class)
|
||||
@Property(surroundWithTag = false)
|
||||
@XCollection(elementTypes = DictionaryState.class)
|
||||
public List<DictionaryState> dictionaryStates = new ArrayList<>();
|
||||
|
||||
private ProjectDictionary projectDictionary;
|
||||
|
||||
Reference in New Issue
Block a user