mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
revert groovy 2.2.1
This commit is contained in:
Generated
+36
-37
@@ -1,46 +1,45 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Groovy">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/lib/groovy-all-2.2.1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/groovy-all-2.0.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/src/tck/src" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/src/main" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/src/test" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/src/examples" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/src/test-resources" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/buildSrc/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/benchmark/bench" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-ant/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-ant/src/test/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-ant/src/test-resources" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-bsf/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-bsf/src/test/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-jmx/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-jmx/src/test/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-jmx/src/test/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-sql/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-xml/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-xml/src/test/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-json/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-json/src/main/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-test/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-test/src/test/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-swing/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-swing/src/main/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-swing/src/test/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-jsr223/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-jsr223/src/test/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-testng/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-console/src/main/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-servlet/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-servlet/src/test/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-groovysh/src/main/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-groovydoc/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-groovydoc/src/test/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-templates/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.2.1.zip!/groovy-2.2.1/subprojects/groovy-templates/src/test/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-json/src/main/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-json/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-test/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-xml/src/test/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-xml/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-servlet/src/test/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-servlet/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-console/src/main/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-bsf/src/test/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-bsf/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-groovysh/src/main/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-templates/src/test/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-templates/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-sql/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-swing/src/test/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-swing/src/main/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-swing/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-groovydoc/src/test/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-groovydoc/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-testng/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-jsr223/src/test/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-jsr223/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-jmx/src/test/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-jmx/src/test/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-jmx/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-ant/src/test/groovy" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-ant/src/test-resources" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/subprojects/groovy-ant/src/main/java" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/benchmark/bench" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/src/tck/src" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/src/test" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/src/test-resources/stubgenerator/propertyUsageFromJava" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/src/test-resources/stubgenerator/circularLanguageReference" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/src/examples" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/src/groovy-src-2.0.6.zip!/groovy-2.0.6/src/main" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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<String> openapiModules = [platformApiModules,
|
||||
"compiler-openapi",
|
||||
"debugger-openapi",
|
||||
@@ -63,6 +64,7 @@ def layoutFull(String home, String targetDirectory, String patchedDescriptorDir
|
||||
"testFramework-java",
|
||||
].flatten()
|
||||
|
||||
//noinspection GroovyAssignabilityCheck
|
||||
List<String> 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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
Binary file not shown.
@@ -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
|
||||
|
||||
Binary file not shown.
+76
-2
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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)
|
||||
}
|
||||
|
||||
-47
@@ -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;
|
||||
}
|
||||
}
|
||||
-40
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
-56
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user