diff --git a/.idea/libraries/Groovy.xml b/.idea/libraries/Groovy.xml index e396e496812e..d8e0e9e43904 100644 --- a/.idea/libraries/Groovy.xml +++ b/.idea/libraries/Groovy.xml @@ -1,46 +1,45 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/lib/gant/bin/startGroovy b/build/lib/gant/bin/startGroovy index 9e9ccf35b11b..f9e62511cd2a 100755 --- a/build/lib/gant/bin/startGroovy +++ b/build/lib/gant/bin/startGroovy @@ -127,7 +127,7 @@ fi if [ -z "$GROOVY_CONF" ] ; then GROOVY_CONF="$GROOVY_HOME/conf/groovy-starter.conf" fi -STARTER_CLASSPATH="$GROOVY_HOME/lib/groovy-all-2.2.1.jar" +STARTER_CLASSPATH="$GROOVY_HOME/lib/groovy-all-2.0.6.jar" # Create the final classpath. Setting a classpath using the -cp or -classpath option means not to use the # global classpath. Groovy behaves then the same as the java interpreter diff --git a/build/lib/gant/bin/startGroovy.bat b/build/lib/gant/bin/startGroovy.bat index d2b1436b0bed..e7c34766d90e 100755 --- a/build/lib/gant/bin/startGroovy.bat +++ b/build/lib/gant/bin/startGroovy.bat @@ -203,7 +203,7 @@ set CMD_LINE_ARGS=%$ :execute @rem Setup the command line -set STARTER_CLASSPATH=%GROOVY_HOME%\%JARSPATH%\groovy-all-2.2.1.jar;%STARTER_CLASSPATH% +set STARTER_CLASSPATH=%GROOVY_HOME%\%JARSPATH%\groovy-all-2.0.6.jar;%STARTER_CLASSPATH% if exist "%USERPROFILE%/.groovy/init.bat" call "%USERPROFILE%/.groovy/init.bat" diff --git a/build/lib/gant/gant_groovy2.1-1.9.10-sources.jar b/build/lib/gant/gant_groovy2.1-1.9.10-sources.jar deleted file mode 100644 index 776f88897d0b..000000000000 Binary files a/build/lib/gant/gant_groovy2.1-1.9.10-sources.jar and /dev/null differ diff --git a/build/lib/gant/lib/gant_groovy2.0-1.9.8.jar b/build/lib/gant/lib/gant_groovy2.0-1.9.8.jar new file mode 100644 index 000000000000..3d0d1ca0a526 Binary files /dev/null and b/build/lib/gant/lib/gant_groovy2.0-1.9.8.jar differ diff --git a/build/lib/gant/lib/gant_groovy2.1-1.9.10.jar b/build/lib/gant/lib/gant_groovy2.1-1.9.10.jar deleted file mode 100644 index 8f8fc1e009f2..000000000000 Binary files a/build/lib/gant/lib/gant_groovy2.1-1.9.10.jar and /dev/null differ diff --git a/build/lib/gant/src.zip b/build/lib/gant/src.zip new file mode 100644 index 000000000000..147e7406f01e Binary files /dev/null and b/build/lib/gant/src.zip differ diff --git a/build/scripts/layouts.gant b/build/scripts/layouts.gant index 4dcaaa88d961..9eb96faf7cf7 100644 --- a/build/scripts/layouts.gant +++ b/build/scripts/layouts.gant @@ -47,6 +47,7 @@ String patchAppDescriptor(String targetDirectory) { def layoutFull(String home, String targetDirectory, String patchedDescriptorDir = null) { projectBuilder.stage("layout to $targetDirectory") + //noinspection GroovyAssignabilityCheck List openapiModules = [platformApiModules, "compiler-openapi", "debugger-openapi", @@ -63,6 +64,7 @@ def layoutFull(String home, String targetDirectory, String patchedDescriptorDir "testFramework-java", ].flatten() + //noinspection GroovyAssignabilityCheck List implementationModules = [platformImplementationModules, "compiler-impl", "debugger-impl", @@ -110,6 +112,12 @@ def layoutFull(String home, String targetDirectory, String patchedDescriptorDir fileset(dir: "${home}/lib/rt", includesfile: "${home}/lib/rt/required_for_dist.txt") } + dir("groovy") { + dir("lib") { + fileset(dir:"$home/lib/groovy/lib") + } + } + dir("libpty") { fileset(dir: "$home/lib/libpty") { exclude(name: "readme.txt") diff --git a/build/scripts/libLicenses.gant b/build/scripts/libLicenses.gant index cdb11c219eef..399687079380 100644 --- a/build/scripts/libLicenses.gant +++ b/build/scripts/libLicenses.gant @@ -185,7 +185,7 @@ libraryLicense(name: "Antlr", libraryName: "antlr.jar", version: "3.1.3", licens licenseUrl: "http://www.antlr.org/license.html") libraryLicense(name: "Guava", version: "14.0.1", license: "Apache 2.0", url: "http://code.google.com/p/guava-libraries/", licenseUrl: "http://ant.apache.org/license.html") libraryLicense(name: "Guava", libraryName: "guava-tools", version: "14.0.1", license: "Apache 2.0", url: "http://code.google.com/p/guava-libraries/", licenseUrl: "http://ant.apache.org/license.html") -libraryLicense(name: "Groovy", version: "2.2.1", license: "Apache 2.0", url: "http://groovy.codehaus.org/") +libraryLicense(name: "Groovy", version: "1.7.3", license: "Apache 2.0", url: "http://groovy.codehaus.org/") libraryLicense(name: "Gson", libraryName: "gson", license: "Apache 2.0", url: "http://code.google.com/p/google-gson/") libraryLicense(name: "ini4j", libraryName: "ini4j-0.5.2-patched", version: "0.5.2 (with a patch by JetBrains)", license: "Apache 2.0", url: "http://ini4j.sourceforge.net/", attachedTo: "git4idea") libraryLicense(name: "ISO RELAX", libraryName: "isorelax.jar", license: "MIT License", url: "http://sourceforge.net/projects/iso-relax/", licenseUrl: "http://www.opensource.org/licenses/mit-license.html") diff --git a/lib/groovy-all-2.2.1.jar b/lib/groovy-all-2.0.6.jar similarity index 59% rename from lib/groovy-all-2.2.1.jar rename to lib/groovy-all-2.0.6.jar index 8d151271695d..ed8e33ae660f 100644 Binary files a/lib/groovy-all-2.2.1.jar and b/lib/groovy-all-2.0.6.jar differ diff --git a/lib/required_for_dist.txt b/lib/required_for_dist.txt index f7301b4f8840..b37a4a152352 100644 --- a/lib/required_for_dist.txt +++ b/lib/required_for_dist.txt @@ -9,7 +9,7 @@ commons-httpclient-3.1-patched.jar commons-logging-1.1.3.jar commons-net-3.1.jar ecj-4.2.1.jar -groovy-all-2.2.1.jar +groovy-all-2.0.6.jar gson-2.2.3.jar guava-14.0.1.jar jaxen-1.1.3.jar diff --git a/lib/src/groovy-src-2.0.6.zip b/lib/src/groovy-src-2.0.6.zip new file mode 100644 index 000000000000..acdd4bd16284 Binary files /dev/null and b/lib/src/groovy-src-2.0.6.zip differ diff --git a/lib/src/groovy-src-2.2.1.zip b/lib/src/groovy-src-2.2.1.zip deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/IntroduceLocalVariableTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/IntroduceLocalVariableTest.groovy index 4d4c8380c193..63e5a759e505 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/IntroduceLocalVariableTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/IntroduceLocalVariableTest.groovy @@ -14,17 +14,21 @@ * limitations under the License. */ package org.jetbrains.plugins.groovy.refactoring.introduceVariable - import com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement +import com.intellij.psi.PsiType import com.intellij.util.IncorrectOperationException import org.jetbrains.annotations.NotNull import org.jetbrains.plugins.groovy.intentions.GrIntentionTestCase import org.jetbrains.plugins.groovy.intentions.declaration.GrIntroduceLocalVariableIntention +import org.jetbrains.plugins.groovy.refactoring.introduce.GrIntroduceContext +import org.jetbrains.plugins.groovy.refactoring.introduce.variable.GrIntroduceVariableHandler +import org.jetbrains.plugins.groovy.refactoring.introduce.variable.GroovyIntroduceVariableDialog +import org.jetbrains.plugins.groovy.refactoring.introduce.variable.GroovyIntroduceVariableSettings +import org.jetbrains.plugins.groovy.refactoring.introduce.variable.GroovyVariableValidator import org.jetbrains.plugins.groovy.util.TestUtils - /** * @author siosio */ @@ -64,4 +68,74 @@ public class IntroduceLocalVariableTest extends GrIntentionTestCase { new MockGrIntroduceVariableHandler(settings).invoke(project, editor, element.containingFile, null); } } + + static class MockGrIntroduceVariableHandler extends GrIntroduceVariableHandler { + private final MockSettings mySettings + + MockGrIntroduceVariableHandler(MockSettings settings) { + mySettings = settings + } + + @NotNull + @Override + protected GroovyIntroduceVariableDialog getDialog(@NotNull GrIntroduceContext context) { + new MockGrIntroduceVariableDialog(context, new GroovyVariableValidator(context), mySettings) + } + } + + static class MockGrIntroduceVariableDialog extends GroovyIntroduceVariableDialog { + private final MockSettings mySettings + + MockGrIntroduceVariableDialog(GrIntroduceContext context, GroovyVariableValidator validator, MockSettings settings) { + super(context, validator) + mySettings = settings + } + + @Override + void show() { + close(0) + } + + @Override + MockSettings getSettings() { mySettings } + + @Override + boolean isOK() { + true + } + } + + static class MockSettings implements GroovyIntroduceVariableSettings { + private final boolean myFinal + private final String myName + private final boolean myAllOccurrences + private final PsiType myType + + MockSettings(final boolean isFinal, final String name, PsiType type, boolean allOccurrences) { + myFinal = isFinal + myName = name + myType = type + myAllOccurrences = allOccurrences + } + + @Override + boolean isDeclareFinal() { + return myFinal + } + + @Override + String getName() { + myName + } + + @Override + boolean replaceAllOccurrences() { + return myAllOccurrences + } + + @Override + PsiType getSelectedType() { + return myType + } + } } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/IntroduceVariableTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/IntroduceVariableTest.groovy index 1dac71192e12..60a96ef055d6 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/IntroduceVariableTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/IntroduceVariableTest.groovy @@ -126,8 +126,8 @@ def foo() { PsiType type = inferType(explicitType) - final MockSettings settings = new MockSettings(false, "preved", type, replaceAllOccurrences) - final GrIntroduceVariableHandler introduceVariableHandler = new MockGrIntroduceVariableHandler(settings) + final IntroduceLocalVariableTest.MockSettings settings = new IntroduceLocalVariableTest.MockSettings(false, "preved", type, replaceAllOccurrences) + final GrIntroduceVariableHandler introduceVariableHandler = new IntroduceLocalVariableTest.MockGrIntroduceVariableHandler(settings) introduceVariableHandler.invoke(myFixture.project, myFixture.editor, myFixture.file, null) } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockGrIntroduceVariableDialog.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockGrIntroduceVariableDialog.java deleted file mode 100644 index a6113b7cf1f9..000000000000 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockGrIntroduceVariableDialog.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -package org.jetbrains.plugins.groovy.refactoring.introduceVariable; - -import org.jetbrains.plugins.groovy.refactoring.introduce.GrIntroduceContext; -import org.jetbrains.plugins.groovy.refactoring.introduce.variable.GroovyIntroduceVariableDialog; -import org.jetbrains.plugins.groovy.refactoring.introduce.variable.GroovyVariableValidator; - -/** - * Created by Max Medvedev on 12/1/13 - */ -public class MockGrIntroduceVariableDialog extends GroovyIntroduceVariableDialog { - private final MockSettings mySettings; - - public MockGrIntroduceVariableDialog(GrIntroduceContext context, GroovyVariableValidator validator, MockSettings settings) { - super(context, validator); - mySettings = settings; - } - - @Override - public void show() { - close(0); - } - - @Override - public MockSettings getSettings() { - return mySettings; - } - - @Override - public boolean isOK() { - return true; - } -} diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockGrIntroduceVariableHandler.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockGrIntroduceVariableHandler.java deleted file mode 100644 index 64166c53c3f4..000000000000 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockGrIntroduceVariableHandler.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ -package org.jetbrains.plugins.groovy.refactoring.introduceVariable; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.plugins.groovy.refactoring.introduce.GrIntroduceContext; -import org.jetbrains.plugins.groovy.refactoring.introduce.variable.GrIntroduceVariableHandler; -import org.jetbrains.plugins.groovy.refactoring.introduce.variable.GroovyIntroduceVariableDialog; -import org.jetbrains.plugins.groovy.refactoring.introduce.variable.GroovyVariableValidator; - -/** - * Created by Max Medvedev on 12/1/13 - */ -public class MockGrIntroduceVariableHandler extends GrIntroduceVariableHandler { - private final MockSettings mySettings; - - public MockGrIntroduceVariableHandler(MockSettings settings) { - mySettings = settings; - } - - @NotNull - @Override - protected GroovyIntroduceVariableDialog getDialog(@NotNull GrIntroduceContext context) { - return new MockGrIntroduceVariableDialog(context, new GroovyVariableValidator(context), mySettings); - } - -} diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockSettings.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockSettings.java deleted file mode 100644 index 36d32ed14ed3..000000000000 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockSettings.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ -package org.jetbrains.plugins.groovy.refactoring.introduceVariable; - -import com.intellij.psi.PsiType; -import org.jetbrains.plugins.groovy.refactoring.introduce.variable.GroovyIntroduceVariableSettings; - -/** - * Created by Max Medvedev on 12/1/13 - */ -public class MockSettings implements GroovyIntroduceVariableSettings { - private final boolean myFinal; - private final String myName; - private final boolean myAllOccurrences; - private final PsiType myType; - - public MockSettings(final boolean isFinal, final String name, PsiType type, boolean allOccurrences) { - myFinal = isFinal; - myName = name; - myType = type; - myAllOccurrences = allOccurrences; - } - - @Override - public boolean isDeclareFinal() { - return myFinal; - } - - @Override - public String getName() { - return myName; - } - - @Override - public boolean replaceAllOccurrences() { - return myAllOccurrences; - } - - @Override - public PsiType getSelectedType() { - return myType; - } -}