diff --git a/.idea/libraries/Groovy.xml b/.idea/libraries/Groovy.xml
index d8e0e9e43904..e396e496812e 100644
--- a/.idea/libraries/Groovy.xml
+++ b/.idea/libraries/Groovy.xml
@@ -1,45 +1,46 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/lib/gant/bin/startGroovy b/build/lib/gant/bin/startGroovy
index f9e62511cd2a..9e9ccf35b11b 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.0.6.jar"
+STARTER_CLASSPATH="$GROOVY_HOME/lib/groovy-all-2.2.1.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 e7c34766d90e..d2b1436b0bed 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.0.6.jar;%STARTER_CLASSPATH%
+set STARTER_CLASSPATH=%GROOVY_HOME%\%JARSPATH%\groovy-all-2.2.1.jar;%STARTER_CLASSPATH%
if exist "%USERPROFILE%/.groovy/init.bat" call "%USERPROFILE%/.groovy/init.bat"
diff --git a/build/scripts/layouts.gant b/build/scripts/layouts.gant
index 9eb96faf7cf7..4dcaaa88d961 100644
--- a/build/scripts/layouts.gant
+++ b/build/scripts/layouts.gant
@@ -47,7 +47,6 @@ 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",
@@ -64,7 +63,6 @@ def layoutFull(String home, String targetDirectory, String patchedDescriptorDir
"testFramework-java",
].flatten()
- //noinspection GroovyAssignabilityCheck
List implementationModules = [platformImplementationModules,
"compiler-impl",
"debugger-impl",
@@ -112,12 +110,6 @@ 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/lib/groovy-all-2.0.6.jar b/lib/groovy-all-2.2.1.jar
similarity index 59%
rename from lib/groovy-all-2.0.6.jar
rename to lib/groovy-all-2.2.1.jar
index ed8e33ae660f..8d151271695d 100644
Binary files a/lib/groovy-all-2.0.6.jar and b/lib/groovy-all-2.2.1.jar differ
diff --git a/lib/required_for_dist.txt b/lib/required_for_dist.txt
index b37a4a152352..f7301b4f8840 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.0.6.jar
+groovy-all-2.2.1.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
deleted file mode 100644
index acdd4bd16284..000000000000
Binary files a/lib/src/groovy-src-2.0.6.zip and /dev/null differ
diff --git a/lib/src/groovy-src-2.2.1.zip b/lib/src/groovy-src-2.2.1.zip
new file mode 100644
index 000000000000..e69de29bb2d1
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 63e5a759e505..4d4c8380c193 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,21 +14,17 @@
* 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
*/
@@ -68,74 +64,4 @@ 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 60a96ef055d6..1dac71192e12 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 IntroduceLocalVariableTest.MockSettings settings = new IntroduceLocalVariableTest.MockSettings(false, "preved", type, replaceAllOccurrences)
- final GrIntroduceVariableHandler introduceVariableHandler = new IntroduceLocalVariableTest.MockGrIntroduceVariableHandler(settings)
+ final MockSettings settings = new MockSettings(false, "preved", type, replaceAllOccurrences)
+ final GrIntroduceVariableHandler introduceVariableHandler = new 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
new file mode 100644
index 000000000000..a6113b7cf1f9
--- /dev/null
+++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockGrIntroduceVariableDialog.java
@@ -0,0 +1,47 @@
+/*
+ * 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
new file mode 100644
index 000000000000..64166c53c3f4
--- /dev/null
+++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockGrIntroduceVariableHandler.java
@@ -0,0 +1,40 @@
+/*
+ * 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
new file mode 100644
index 000000000000..36d32ed14ed3
--- /dev/null
+++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceVariable/MockSettings.java
@@ -0,0 +1,56 @@
+/*
+ * 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;
+ }
+}