diff --git a/java/compiler/openapi/src/com/intellij/compiler/ModuleCompilerUtil.java b/java/compiler/openapi/src/com/intellij/compiler/ModuleCompilerUtil.java index 1a5a202569df..5b25dacc7311 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ModuleCompilerUtil.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ModuleCompilerUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. @@ -25,7 +25,7 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.ModifiableRootModel; import com.intellij.openapi.roots.ModuleRootManager; import com.intellij.openapi.roots.ModuleRootModel; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import com.intellij.util.Chunk; import com.intellij.util.Processor; import com.intellij.util.containers.ContainerUtil; @@ -136,7 +136,7 @@ public final class ModuleCompilerUtil { * @return pair of modules which become circular after adding dependency, or null if all remains OK */ @Nullable - public static Pair addingDependencyFormsCircularity(final Module currentModule, Module toDependOn) { + public static Couple addingDependencyFormsCircularity(final Module currentModule, Module toDependOn) { assert currentModule != toDependOn; // whatsa lotsa of @&#^%$ codes-a! @@ -159,7 +159,7 @@ public final class ModuleCompilerUtil { for (Chunk chunk : nodesAfter) { if (chunk.containsNode(toDependOnModel) && chunk.containsNode(currentModel)) { Iterator nodes = chunk.getNodes().iterator(); - return Pair.create(nodes.next().getModule(), nodes.next().getModule()); + return Couple.newOne(nodes.next().getModule(), nodes.next().getModule()); } } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/Tag.java b/java/compiler/openapi/src/com/intellij/compiler/ant/Tag.java index 4811a94b75a3..b3b88a586de5 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/Tag.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/Tag.java @@ -16,6 +16,7 @@ package com.intellij.compiler.ant; +import com.intellij.openapi.util.Couple; import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.text.StringUtil; import org.jetbrains.annotations.NonNls; @@ -78,10 +79,10 @@ public class Tag extends CompositeGenerator { } @Nullable - protected static Pair pair(@NonNls String v1, @Nullable @NonNls String v2) { + protected static Couple pair(@NonNls String v1, @Nullable @NonNls String v2) { if (v2 == null) { return null; } - return Pair.create(v1, v2); + return Couple.newOne(v1, v2); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/AntCall.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/AntCall.java index d2a8ef900b75..46f1c7514d9a 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/AntCall.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/AntCall.java @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; /** * @author Eugene Zhuravlev @@ -27,6 +27,6 @@ import com.intellij.openapi.util.Pair; public class AntCall extends Tag{ public AntCall(final String target) { - super("antcall", new Pair[] {Pair.create("target", target)}); + super("antcall", Couple.newOne("target", target)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/AntProject.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/AntProject.java index 911f880800ec..0dae45967b2c 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/AntProject.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/AntProject.java @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -27,6 +27,6 @@ import org.jetbrains.annotations.NonNls; public class AntProject extends Tag { public AntProject(@NonNls String name, @NonNls String defaultTarget) { //noinspection HardCodedStringLiteral - super("project", new Pair[]{Pair.create("name", name), Pair.create("default", defaultTarget)}); + super("project", Couple.newOne("name", name), Couple.newOne("default", defaultTarget)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Attribute.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Attribute.java index d6098db254da..821ced469c63 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Attribute.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Attribute.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -27,6 +27,6 @@ import org.jetbrains.annotations.NonNls; public class Attribute extends Tag{ public Attribute(@NonNls String name, String value) { //noinspection HardCodedStringLiteral - super("attribute", new Pair[] {Pair.create("name", name),Pair.create("value", value)}); + super("attribute", Couple.newOne("name", name), Couple.newOne("value", value)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Copy.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Copy.java index e10f81c6980e..d7f0b5b08dcf 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Copy.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Copy.java @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -27,10 +27,10 @@ import org.jetbrains.annotations.NonNls; public class Copy extends Tag { public Copy(@NonNls String toDir) { //noinspection HardCodedStringLiteral - super("copy", new Pair[] {Pair.create("todir", toDir)}); + super("copy", Couple.newOne("todir", toDir)); } public Copy(@NonNls String file, @NonNls String toFile) { //noinspection HardCodedStringLiteral - super("copy", new Pair[] {Pair.create("file", file), Pair.create("tofile", toFile)}); + super("copy", Couple.newOne("file", file), Couple.newOne("tofile", toFile)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Delete.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Delete.java index 2dfe0d3f972d..14b96cc981ed 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Delete.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Delete.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -27,6 +27,6 @@ import org.jetbrains.annotations.NonNls; public class Delete extends Tag{ public Delete(@NonNls String dir) { //noinspection HardCodedStringLiteral - super("delete", new Pair[] {Pair.create("dir", dir)}); + super("delete", Couple.newOne("dir", dir)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/DirSet.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/DirSet.java index 1476f8b8f7e4..ab56f1713e6b 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/DirSet.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/DirSet.java @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -28,6 +28,6 @@ public class DirSet extends Tag{ public DirSet(@NonNls final String dir) { //noinspection HardCodedStringLiteral - super("dirset", new Pair[] {Pair.create("dir", dir)}); + super("dirset", Couple.newOne("dir", dir)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Dirname.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Dirname.java index 7be6755361bd..e68b07d25626 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Dirname.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Dirname.java @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -27,6 +27,6 @@ import org.jetbrains.annotations.NonNls; public class Dirname extends Tag{ public Dirname(@NonNls String property, @NonNls String file) { //noinspection HardCodedStringLiteral - super("dirname", new Pair[] {Pair.create("property", property), Pair.create("file", file)}); + super("dirname", Couple.newOne("property", property), Couple.newOne("file", file)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Exclude.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Exclude.java index 6b9e1ff16ae7..7b00eac9b22c 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Exclude.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Exclude.java @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -28,7 +28,7 @@ public class Exclude extends Tag { public Exclude(@NonNls final String name) { //noinspection HardCodedStringLiteral - super("exclude", new Pair[] {Pair.create("name", name)}); + super("exclude", Couple.newOne("name", name)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Import.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Import.java index 611b6344cf16..111e6084c23d 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Import.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Import.java @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -27,11 +27,11 @@ import org.jetbrains.annotations.NonNls; public class Import extends Tag{ public Import(@NonNls String file, boolean optional) { //noinspection HardCodedStringLiteral - super("import", new Pair[] {Pair.create("file", file), Pair.create("optional", optional ? "true" : "false")}); + super("import", Couple.newOne("file", file), Couple.newOne("optional", optional ? "true" : "false")); } public Import(@NonNls String file) { //noinspection HardCodedStringLiteral - super("import", new Pair[] {Pair.create("file", file)}); + super("import", Couple.newOne("file", file)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Manifest.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Manifest.java index da0ac1cd787d..505779d07794 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Manifest.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Manifest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. @@ -18,10 +18,12 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; import com.intellij.openapi.compiler.make.ManifestBuilder; -import com.intellij.openapi.util.Pair; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; import java.util.jar.Attributes; -import java.util.*; /** * @author Eugene Zhuravlev @@ -29,7 +31,7 @@ import java.util.*; */ public class Manifest extends Tag{ public Manifest() { - super("manifest", new Pair[] {}); + super("manifest"); } public void applyAttributes(final java.util.jar.Manifest manifest) { diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Mkdir.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Mkdir.java index 4c2bff8aafeb..db18fb743afc 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Mkdir.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Mkdir.java @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -27,6 +27,6 @@ import org.jetbrains.annotations.NonNls; public class Mkdir extends Tag { public Mkdir(@NonNls String directory) { //noinspection HardCodedStringLiteral - super("mkdir", new Pair[] {Pair.create("dir", directory)}); + super("mkdir", Couple.newOne("dir", directory)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Param.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Param.java index 5eaa4856b669..305a956d7dc2 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Param.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Param.java @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -27,10 +27,7 @@ import org.jetbrains.annotations.NonNls; public class Param extends Tag { public Param(@NonNls final String name, final String value) { //noinspection HardCodedStringLiteral - super("param", new Pair[] { - Pair.create("name", name), - Pair.create("value", value) - }); + super("param", Couple.newOne("name", name), Couple.newOne("value", value)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/PathRef.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/PathRef.java index 1f8d658d5d7b..6bc552b69151 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/PathRef.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/PathRef.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. @@ -17,7 +17,6 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; import org.jetbrains.annotations.NonNls; /** @@ -27,7 +26,7 @@ import org.jetbrains.annotations.NonNls; public class PathRef extends Tag{ public PathRef(@NonNls final String refid) { - super("path", new Pair[] {pair("refid", refid)}); + super("path", pair("refid", refid)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/PatternSetRef.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/PatternSetRef.java index 6a30765b48ad..0bd2e0caef03 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/PatternSetRef.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/PatternSetRef.java @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -27,6 +27,6 @@ import org.jetbrains.annotations.NonNls; public class PatternSetRef extends Tag{ public PatternSetRef(@NonNls final String refid) { //noinspection HardCodedStringLiteral - super("patternset", new Pair[] {Pair.create("refid", refid)}); + super("patternset", Couple.newOne("refid", refid)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Property.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Property.java index 2c2f16ad8095..b666e1ec872b 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Property.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Property.java @@ -17,7 +17,7 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; /** @@ -28,17 +28,12 @@ public class Property extends Tag { public Property(@NonNls final String name, final String value) { //noinspection HardCodedStringLiteral - super("property", new Pair[] { - Pair.create("name", name), - Pair.create("value", value) - }); + super("property", Couple.newOne("name", name), Couple.newOne("value", value)); } public Property(@NonNls final String filePath) { //noinspection HardCodedStringLiteral - super("property", new Pair[] { - Pair.create("file", filePath), - }); + super("property", Couple.newOne("file", filePath)); } } diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Zip.java b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Zip.java index a79ee965c080..33cfedef5221 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Zip.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/taskdefs/Zip.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. @@ -21,12 +21,12 @@ package com.intellij.compiler.ant.taskdefs; import com.intellij.compiler.ant.Tag; -import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.Couple; import org.jetbrains.annotations.NonNls; public class Zip extends Tag { public Zip(@NonNls final String destFile) { //noinspection HardCodedStringLiteral - super("zip", new Pair[] {Pair.create("destfile", destFile)}); + super("zip", Couple.newOne("destfile", destFile)); } } \ No newline at end of file