Spring Support: Support Find Usages/Rename (on both declarations and
references) of Kotlin declarations referenced in the XML config #KT-11719 Fixed #KT-11652 Fixed
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?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.KotlinSpringBean" name="xmlKotlinBean"/>
|
||||
</beans>
|
||||
@@ -0,0 +1,6 @@
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages
|
||||
package a
|
||||
|
||||
class <caret>KotlinSpringBean
|
||||
@@ -0,0 +1 @@
|
||||
Usage in XML descriptor 5 <bean class="a.KotlinSpringBean" name="xmlKotlinBean"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<constructor-arg name="value" value="2"/>
|
||||
<property name="value"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,6 @@
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
package a
|
||||
|
||||
class KotlinSpringBean(var <caret>value: Int)
|
||||
@@ -0,0 +1,2 @@
|
||||
Usage in XML descriptor 6 <constructor-arg name="value" value="2"/>
|
||||
Usage in XML descriptor 7 <property name="value"/>
|
||||
@@ -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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<property name="foo"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,8 @@
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
package a
|
||||
|
||||
class KotlinSpringBean {
|
||||
var <caret>foo: Int = 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Usage in XML descriptor 6 <property name="foo"/>
|
||||
@@ -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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<property name="bar"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,10 @@
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
package a
|
||||
|
||||
class KotlinSpringBean {
|
||||
fun <caret>setBar(value: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Usage in XML descriptor 6 <property name="bar"/>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?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.KotlinSpringBean2" name="xmlKotlinBean"/>
|
||||
</beans>
|
||||
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean2
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<?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.KotlinSpringBean" name="xmlKotlinBean"/>
|
||||
</beans>
|
||||
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
class /*rename*/KotlinSpringBean
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"fixtureClasses": ["org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension"],
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "test.kt",
|
||||
"springFileSet": ["spring-config.xml"],
|
||||
"newName": "KotlinSpringBean2",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<?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.KotlinSpringBean2" name="xmlKotlinBean"/>
|
||||
</beans>
|
||||
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean2
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<?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./*rename*/KotlinSpringBean" name="xmlKotlinBean"/>
|
||||
</beans>
|
||||
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"fixtureClasses": ["org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension"],
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "spring-config.xml",
|
||||
"springFileSet": ["spring-config.xml"],
|
||||
"newName": "KotlinSpringBean2",
|
||||
"byRef": "true",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
<?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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<constructor-arg name="value2" value="2"/>
|
||||
<property name="value2"/>
|
||||
</bean>
|
||||
</beans>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean(var value2: Int)
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
<?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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<constructor-arg name="value" value="2"/>
|
||||
<property name="value"/>
|
||||
</bean>
|
||||
</beans>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean(var /*rename*/value: Int)
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"fixtureClasses": ["org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension"],
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "test.kt",
|
||||
"springFileSet": ["spring-config.xml"],
|
||||
"newName": "value2",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
<?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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<constructor-arg name="value2" value="2"/>
|
||||
<property name="value2"/>
|
||||
</bean>
|
||||
</beans>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean(var value2: Int)
|
||||
ultimate/testData/spring/core/rename/primaryConstructorArgWithXmlRefsByRef1/before/spring-config.xml
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
<?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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<constructor-arg name="/*rename*/value" value="2"/>
|
||||
<property name="value"/>
|
||||
</bean>
|
||||
</beans>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean(var value: Int)
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"fixtureClasses": ["org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension"],
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "spring-config.xml",
|
||||
"springFileSet": ["spring-config.xml"],
|
||||
"newName": "value2",
|
||||
"byRef": "true",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
<?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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<constructor-arg name="value2" value="2"/>
|
||||
<property name="value2"/>
|
||||
</bean>
|
||||
</beans>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean(var value2: Int)
|
||||
ultimate/testData/spring/core/rename/primaryConstructorArgWithXmlRefsByRef2/before/spring-config.xml
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
<?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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<constructor-arg name="value" value="2"/>
|
||||
<property name="/*rename*/value"/>
|
||||
</bean>
|
||||
</beans>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean(var value: Int)
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"fixtureClasses": ["org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension"],
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "spring-config.xml",
|
||||
"springFileSet": ["spring-config.xml"],
|
||||
"newName": "value2",
|
||||
"byRef": "true",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
+8
@@ -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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<property name="foo2"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,5 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean {
|
||||
var foo2: Int = 1
|
||||
}
|
||||
+8
@@ -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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<property name="foo"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,5 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean {
|
||||
var /*rename*/foo: Int = 1
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"fixtureClasses": ["org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension"],
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "test.kt",
|
||||
"springFileSet": ["spring-config.xml"],
|
||||
"newName": "foo2",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
+8
@@ -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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<property name="foo2"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,5 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean {
|
||||
var foo2: Int = 1
|
||||
}
|
||||
+8
@@ -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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<property name="/*rename*/foo"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,5 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean {
|
||||
var foo: Int = 1
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"fixtureClasses": ["org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension"],
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "spring-config.xml",
|
||||
"springFileSet": ["spring-config.xml"],
|
||||
"newName": "foo2",
|
||||
"byRef": "true",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
+8
@@ -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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<property name="bar2"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,7 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean {
|
||||
fun setBar2(value: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+8
@@ -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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<property name="bar"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,7 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean {
|
||||
fun /*rename*/setBar(value: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"fixtureClasses": ["org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension"],
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "test.kt",
|
||||
"springFileSet": ["spring-config.xml"],
|
||||
"newName": "setBar2",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
+8
@@ -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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<property name="bar2"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,7 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean {
|
||||
fun setBar2(value: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+8
@@ -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.KotlinSpringBean" name="xmlKotlinBean">
|
||||
<property name="/*rename*/bar"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,7 @@
|
||||
package a
|
||||
|
||||
class KotlinSpringBean {
|
||||
fun setBar(value: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"fixtureClasses": ["org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension"],
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "spring-config.xml",
|
||||
"springFileSet": ["spring-config.xml"],
|
||||
"newName": "setBar2",
|
||||
"byRef": "true",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Reference in New Issue
Block a user