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"
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2010-2016 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.kotlin.idea.spring.tests.findUsages
|
||||
|
||||
import org.jetbrains.kotlin.findUsages.AbstractFindUsagesTest
|
||||
import org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
import org.jetbrains.kotlin.idea.spring.tests.loadConfigByMainFilePath
|
||||
import org.jetbrains.kotlin.idea.test.TestFixtureExtension
|
||||
|
||||
abstract class AbstractSpringFindUsagesTest : AbstractFindUsagesTest() {
|
||||
override fun extraConfig(path: String) {
|
||||
TestFixtureExtension.getFixture<SpringTestFixtureExtension>()!!.loadConfigByMainFilePath(path, myFixture)
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2010-2016 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.kotlin.idea.spring.tests.findUsages;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("ultimate/testData/spring/core/findUsages")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class SpringFindUsagesTestGenerated extends AbstractSpringFindUsagesTest {
|
||||
public void testAllFilesPresentInFindUsages() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("ultimate/testData/spring/core/findUsages"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("classXml.kt")
|
||||
public void testClassXml() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/findUsages/classXml.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("primaryConstructorArgXml.kt")
|
||||
public void testPrimaryConstructorArgXml() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/findUsages/primaryConstructorArgXml.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("propertyXml.kt")
|
||||
public void testPropertyXml() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/findUsages/propertyXml.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("setterFunXml.kt")
|
||||
public void testSetterFunXml() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/findUsages/setterFunXml.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
+54
@@ -35,6 +35,18 @@ public class SpringRenameTestGenerated extends AbstractSpringRenameTest {
|
||||
KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("ultimate/testData/spring/core/rename"), Pattern.compile("^(.+)\\.test$"));
|
||||
}
|
||||
|
||||
@TestMetadata("classWithXmlRefs/classWithXmlRef.test")
|
||||
public void testClassWithXmlRefs_ClassWithXmlRef() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/classWithXmlRefs/classWithXmlRef.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classWithXmlRefsByRef/classWithXmlRefByRef.test")
|
||||
public void testClassWithXmlRefsByRef_ClassWithXmlRefByRef() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/classWithXmlRefsByRef/classWithXmlRefByRef.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("javaSpelRefToJava/javaSpelRefToJava.test")
|
||||
public void testJavaSpelRefToJava_JavaSpelRefToJava() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/javaSpelRefToJava/javaSpelRefToJava.test");
|
||||
@@ -82,4 +94,46 @@ public class SpringRenameTestGenerated extends AbstractSpringRenameTest {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/ktSpelRefToKtAnnotated/ktSpelRefToKtAnnotated.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("primaryConstructorArgWithXmlRefs/primaryConstructorArgWithXmlRef.test")
|
||||
public void testPrimaryConstructorArgWithXmlRefs_PrimaryConstructorArgWithXmlRef() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/primaryConstructorArgWithXmlRefs/primaryConstructorArgWithXmlRef.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("primaryConstructorArgWithXmlRefsByRef1/primaryConstructorArgWithXmlRefByRef1.test")
|
||||
public void testPrimaryConstructorArgWithXmlRefsByRef1_PrimaryConstructorArgWithXmlRefByRef1() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/primaryConstructorArgWithXmlRefsByRef1/primaryConstructorArgWithXmlRefByRef1.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("primaryConstructorArgWithXmlRefsByRef2/primaryConstructorArgWithXmlRefByRef2.test")
|
||||
public void testPrimaryConstructorArgWithXmlRefsByRef2_PrimaryConstructorArgWithXmlRefByRef2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/primaryConstructorArgWithXmlRefsByRef2/primaryConstructorArgWithXmlRefByRef2.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("propertyWithXmlRefs/propertyWithXmlRef.test")
|
||||
public void testPropertyWithXmlRefs_PropertyWithXmlRef() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/propertyWithXmlRefs/propertyWithXmlRef.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("propertyWithXmlRefsByRef/propertyWithXmlRefByRef.test")
|
||||
public void testPropertyWithXmlRefsByRef_PropertyWithXmlRefByRef() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/propertyWithXmlRefsByRef/propertyWithXmlRefByRef.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("setterFunWithXmlRefs/setterFunWithXmlRef.test")
|
||||
public void testSetterFunWithXmlRefs_SetterFunWithXmlRef() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/setterFunWithXmlRefs/setterFunWithXmlRef.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("setterFunWithXmlRefsByRef/setterFunWithXmlRefByRef.test")
|
||||
public void testSetterFunWithXmlRefsByRef_SetterFunWithXmlRefByRef() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/setterFunWithXmlRefsByRef/setterFunWithXmlRefByRef.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.tests
|
||||
import org.jetbrains.kotlin.generators.tests.testGroup
|
||||
import org.jetbrains.kotlin.idea.codeInsight.AbstractInspectionTest
|
||||
import org.jetbrains.kotlin.idea.quickfix.AbstractQuickFixTest
|
||||
import org.jetbrains.kotlin.idea.spring.tests.findUsages.AbstractSpringFindUsagesTest
|
||||
import org.jetbrains.kotlin.idea.spring.tests.generate.AbstractGenerateSpringDependencyActionTest
|
||||
import org.jetbrains.kotlin.idea.spring.tests.gutter.AbstractSpringClassAnnotatorTest
|
||||
import org.jetbrains.kotlin.idea.spring.tests.references.AbstractSpringReferenceCompletionHandlerTest
|
||||
@@ -61,5 +62,9 @@ fun main(args: Array<String>) {
|
||||
testClass<AbstractSpringRenameTest>() {
|
||||
model("spring/core/rename", extension = "test", singleClass = true)
|
||||
}
|
||||
|
||||
testClass<AbstractSpringFindUsagesTest>() {
|
||||
model("spring/core/findUsages", pattern = """^(.+)\.kt$""")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user