Rename: Fix Find Usages/Rename for parameter references in XML files

#KT-11967 Fixed
This commit is contained in:
Alexey Sedunov
2016-04-20 17:25:42 +03:00
parent 6a1387b9b9
commit d456aa6ba8
18 changed files with 114 additions and 5 deletions
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean class="a.FactoryObject" factory-method="buildObject" name="fmKotlin">
<constructor-arg name="param2" value="1"/>
</bean>
</beans>
@@ -0,0 +1,6 @@
package a
class Construction(param: Int)
object FactoryObject {
@JvmStatic fun buildObject(param2: Int) = Construction(param2)
}
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean class="a.FactoryObject" factory-method="buildObject" name="fmKotlin">
<constructor-arg name="param" value="1"/>
</bean>
</beans>
@@ -0,0 +1,6 @@
package a
class Construction(param: Int)
object FactoryObject {
@JvmStatic fun buildObject(/*rename*/param: Int) = Construction(param)
}
@@ -0,0 +1,8 @@
{
"fixtureClasses": ["org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension"],
"type": "MARKED_ELEMENT",
"mainFile": "test.kt",
"springFileSet": ["spring-config.xml"],
"newName": "param2",
"withRuntime": "true"
}
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean class="a.FactoryObject" factory-method="buildObject" name="fmKotlin">
<constructor-arg name="param2" value="1"/>
</bean>
</beans>
@@ -0,0 +1,6 @@
package a
class Construction(param: Int)
object FactoryObject {
@JvmStatic fun buildObject(param2: Int) = Construction(param2)
}
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean class="a.FactoryObject" factory-method="buildObject" name="fmKotlin">
<constructor-arg name="/*rename*/param" value="1"/>
</bean>
</beans>
@@ -0,0 +1,6 @@
package a
class Construction(param: Int)
object FactoryObject {
@JvmStatic fun buildObject(param: Int) = Construction(param)
}
@@ -0,0 +1,9 @@
{
"fixtureClasses": ["org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension"],
"type": "MARKED_ELEMENT",
"mainFile": "spring-config.xml",
"springFileSet": ["spring-config.xml"],
"newName": "param2",
"byRef": "true",
"withRuntime": "true"
}
@@ -47,6 +47,18 @@ public class SpringRenameTestGenerated extends AbstractSpringRenameTest {
doTest(fileName);
}
@TestMetadata("factoryMethodParam/factoryMethodParam.test")
public void testFactoryMethodParam_FactoryMethodParam() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/factoryMethodParam/factoryMethodParam.test");
doTest(fileName);
}
@TestMetadata("factoryMethodParamByXmlRef/factoryMethodParamByXmlRef.test")
public void testFactoryMethodParamByXmlRef_FactoryMethodParamByXmlRef() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/factoryMethodParamByXmlRef/factoryMethodParamByXmlRef.test");
doTest(fileName);
}
@TestMetadata("isPropertyWithXmlRefsBySpelRef/isPropertyWithXmlRefBySpelRef.test")
public void testIsPropertyWithXmlRefsBySpelRef_IsPropertyWithXmlRefBySpelRef() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/isPropertyWithXmlRefsBySpelRef/isPropertyWithXmlRefBySpelRef.test");