Remove 173 bunch files
This commit is contained in:
@@ -1,219 +0,0 @@
|
||||
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import org.gradle.jvm.tasks.Jar
|
||||
|
||||
description = "Kotlin IDEA Ultimate plugin"
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
}
|
||||
|
||||
val ideaProjectResources = project(":idea").mainSourceSet.output.resourcesDir
|
||||
|
||||
evaluationDependsOn(":prepare:idea-plugin")
|
||||
|
||||
val intellijUltimateEnabled : Boolean by rootProject.extra
|
||||
|
||||
val springClasspath by configurations.creating
|
||||
|
||||
dependencies {
|
||||
if (intellijUltimateEnabled) {
|
||||
testRuntime(intellijUltimateDep())
|
||||
}
|
||||
|
||||
compileOnly(project(":kotlin-reflect-api"))
|
||||
compile(project(":kotlin-stdlib"))
|
||||
compile(project(":core:descriptors")) { isTransitive = false }
|
||||
compile(project(":compiler:psi")) { isTransitive = false }
|
||||
compile(project(":core:descriptors.jvm")) { isTransitive = false }
|
||||
compile(project(":core:util.runtime")) { isTransitive = false }
|
||||
compile(project(":compiler:light-classes")) { isTransitive = false }
|
||||
compile(project(":compiler:frontend")) { isTransitive = false }
|
||||
compile(project(":compiler:frontend.common")) { isTransitive = false }
|
||||
compile(project(":compiler:frontend.java")) { isTransitive = false }
|
||||
compile(project(":js:js.frontend")) { isTransitive = false }
|
||||
compile(projectClasses(":idea"))
|
||||
compile(project(":idea:idea-jvm")) { isTransitive = false }
|
||||
compile(project(":idea:idea-core")) { isTransitive = false }
|
||||
compile(project(":idea:ide-common")) { isTransitive = false }
|
||||
compile(project(":idea:idea-gradle")) { isTransitive = false }
|
||||
compile(project(":compiler:util")) { isTransitive = false }
|
||||
compile(project(":idea:idea-jps-common")) { isTransitive = false }
|
||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||
|
||||
if (intellijUltimateEnabled) {
|
||||
compileOnly(intellijUltimatePluginDep("NodeJS"))
|
||||
compileOnly(intellijUltimateDep()) { includeJars("annotations", "trove4j", "openapi", "idea", "util", "jdom") }
|
||||
compileOnly(intellijUltimatePluginDep("CSS"))
|
||||
compileOnly(intellijUltimatePluginDep("DatabaseTools"))
|
||||
compileOnly(intellijUltimatePluginDep("JavaEE"))
|
||||
compileOnly(intellijUltimatePluginDep("jsp"))
|
||||
compileOnly(intellijUltimatePluginDep("PersistenceSupport"))
|
||||
compileOnly(intellijUltimatePluginDep("Spring"))
|
||||
compileOnly(intellijUltimatePluginDep("properties"))
|
||||
compileOnly(intellijUltimatePluginDep("java-i18n"))
|
||||
compileOnly(intellijUltimatePluginDep("gradle"))
|
||||
compileOnly(intellijUltimatePluginDep("Groovy"))
|
||||
compileOnly(intellijUltimatePluginDep("junit"))
|
||||
compileOnly(intellijUltimatePluginDep("uml"))
|
||||
compileOnly(intellijUltimatePluginDep("JavaScriptLanguage"))
|
||||
compileOnly(intellijUltimatePluginDep("JavaScriptDebugger"))
|
||||
}
|
||||
|
||||
testCompile(project(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false }
|
||||
testCompile(project(":plugins:lint")) { isTransitive = false }
|
||||
testCompile(project(":idea:idea-jvm")) { isTransitive = false }
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(projectTests(":idea")) { isTransitive = false }
|
||||
testCompile(projectTests(":generators:test-generator"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
|
||||
testCompile(project(":idea:idea-native")) { isTransitive = false }
|
||||
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
|
||||
testRuntime(project(":kotlin-native:kotlin-native-library-reader")) { isTransitive = false }
|
||||
testRuntime(project(":kotlin-native:kotlin-native-utils")) { isTransitive = false }
|
||||
|
||||
if (intellijUltimateEnabled) {
|
||||
testCompileOnly(intellijUltimateDep()) { includeJars("gson", "annotations", "trove4j", "openapi", "idea", "util", "jdom", rootProject = rootProject) }
|
||||
}
|
||||
testCompile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||
|
||||
testRuntime(project(":kotlin-reflect"))
|
||||
testRuntime(project(":kotlin-script-runtime"))
|
||||
testRuntimeOnly(projectRuntimeJar(":kotlin-compiler"))
|
||||
testRuntime(project(":plugins:android-extensions-ide")) { isTransitive = false }
|
||||
testRuntime(project(":plugins:android-extensions-compiler")) { isTransitive = false }
|
||||
testRuntime(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false }
|
||||
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
||||
testRuntime(project(":idea:idea-maven")) { isTransitive = false }
|
||||
testRuntime(project(":idea:idea-jps-common")) { isTransitive = false }
|
||||
testRuntime(project(":idea:formatter")) { isTransitive = false }
|
||||
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":kotlin-sam-with-receiver-compiler-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":noarg-ide-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":kotlin-noarg-compiler-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":allopen-ide-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
||||
testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false }
|
||||
testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":kotlinx-serialization-ide-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
||||
testRuntime(project(":plugins:uast-kotlin"))
|
||||
testRuntime(project(":plugins:uast-kotlin-idea"))
|
||||
|
||||
if (intellijUltimateEnabled) {
|
||||
testCompile(intellijUltimatePluginDep("CSS"))
|
||||
testCompile(intellijUltimatePluginDep("DatabaseTools"))
|
||||
testCompile(intellijUltimatePluginDep("JavaEE"))
|
||||
testCompile(intellijUltimatePluginDep("jsp"))
|
||||
testCompile(intellijUltimatePluginDep("PersistenceSupport"))
|
||||
testCompile(intellijUltimatePluginDep("Spring"))
|
||||
testCompile(intellijUltimatePluginDep("uml"))
|
||||
testCompile(intellijUltimatePluginDep("JavaScriptLanguage"))
|
||||
testCompile(intellijUltimatePluginDep("JavaScriptDebugger"))
|
||||
testCompile(intellijUltimatePluginDep("NodeJS"))
|
||||
testCompile(intellijUltimatePluginDep("properties"))
|
||||
testCompile(intellijUltimatePluginDep("java-i18n"))
|
||||
testCompile(intellijUltimatePluginDep("gradle"))
|
||||
testCompile(intellijUltimatePluginDep("Groovy"))
|
||||
testCompile(intellijUltimatePluginDep("junit"))
|
||||
testRuntime(intellijUltimatePluginDep("coverage"))
|
||||
testRuntime(intellijUltimatePluginDep("maven"))
|
||||
testRuntime(intellijUltimatePluginDep("android"))
|
||||
testRuntime(intellijUltimatePluginDep("testng"))
|
||||
testRuntime(intellijUltimatePluginDep("IntelliLang"))
|
||||
testRuntime(intellijUltimatePluginDep("copyright"))
|
||||
testRuntime(intellijUltimatePluginDep("java-decompiler"))
|
||||
}
|
||||
|
||||
testRuntime(files("${System.getProperty("java.home")}/../lib/tools.jar"))
|
||||
|
||||
springClasspath(commonDep("org.springframework", "spring-core"))
|
||||
springClasspath(commonDep("org.springframework", "spring-beans"))
|
||||
springClasspath(commonDep("org.springframework", "spring-context"))
|
||||
springClasspath(commonDep("org.springframework", "spring-tx"))
|
||||
springClasspath(commonDep("org.springframework", "spring-web"))
|
||||
}
|
||||
|
||||
val preparedResources = File(buildDir, "prepResources")
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {
|
||||
projectDefault()
|
||||
resources.srcDir(preparedResources)
|
||||
}
|
||||
}
|
||||
|
||||
val ultimatePluginXmlContent: String by lazy {
|
||||
val sectRex = Regex("""^\s*</?idea-plugin>\s*$""")
|
||||
File(projectDir, "resources/META-INF/ultimate-plugin.xml")
|
||||
.readLines()
|
||||
.filterNot { it.matches(sectRex) }
|
||||
.joinToString("\n")
|
||||
}
|
||||
|
||||
val prepareResources by task<Copy> {
|
||||
dependsOn(":idea:assemble")
|
||||
from(ideaProjectResources, {
|
||||
exclude("META-INF/plugin.xml")
|
||||
})
|
||||
into(preparedResources)
|
||||
}
|
||||
|
||||
val preparePluginXml by task<Copy> {
|
||||
dependsOn(":idea:assemble")
|
||||
from(ideaProjectResources, { include("META-INF/plugin.xml") })
|
||||
into(preparedResources)
|
||||
filter {
|
||||
it?.replace("<!-- ULTIMATE-PLUGIN-PLACEHOLDER -->", ultimatePluginXmlContent)
|
||||
}
|
||||
}
|
||||
|
||||
val communityPluginProject = ":prepare:idea-plugin"
|
||||
|
||||
val jar = runtimeJar(task<ShadowJar>("shadowJar")) {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
dependsOn(preparePluginXml)
|
||||
dependsOn("$communityPluginProject:shadowJar")
|
||||
val communityPluginJar = project(communityPluginProject).configurations["runtimeJar"].artifacts.files.singleFile
|
||||
from(zipTree(communityPluginJar), { exclude("META-INF/plugin.xml") })
|
||||
from(preparedResources, { include("META-INF/plugin.xml") })
|
||||
from(mainSourceSet.output)
|
||||
archiveName = "kotlin-plugin.jar"
|
||||
}
|
||||
|
||||
val ideaPluginDir: File by rootProject.extra
|
||||
val ideaUltimatePluginDir: File by rootProject.extra
|
||||
|
||||
task<Copy>("ideaUltimatePlugin") {
|
||||
dependsOn(":ideaPlugin")
|
||||
into(ideaUltimatePluginDir)
|
||||
from(ideaPluginDir) { exclude("lib/kotlin-plugin.jar") }
|
||||
from(jar, { into("lib") })
|
||||
}
|
||||
|
||||
task("idea-ultimate-plugin") {
|
||||
dependsOn("ideaUltimatePlugin")
|
||||
doFirst { logger.warn("'$name' task is deprecated, use '${dependsOn.last()}' instead") }
|
||||
}
|
||||
|
||||
task("ideaUltimatePluginTest") {
|
||||
dependsOn("check")
|
||||
}
|
||||
|
||||
projectTest {
|
||||
dependsOn(prepareResources)
|
||||
dependsOn(preparePluginXml)
|
||||
workingDir = rootDir
|
||||
doFirst {
|
||||
if (intellijUltimateEnabled) {
|
||||
systemProperty("idea.home.path", intellijUltimateRootDir().canonicalPath)
|
||||
}
|
||||
systemProperty("spring.classpath", springClasspath.asPath)
|
||||
}
|
||||
}
|
||||
|
||||
val generateTests by generator("org.jetbrains.kotlin.tests.GenerateUltimateTestsKt")
|
||||
@@ -1,69 +0,0 @@
|
||||
<idea-plugin>
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
|
||||
<multiHostInjector implementation="org.jetbrains.kotlin.idea.spring.el.KotlinSpringELInjector"/>
|
||||
|
||||
<codeInsight.lineMarkerProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.spring.lineMarking.KotlinSpringClassAnnotator"/>
|
||||
<codeInsight.lineMarkerProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.spring.lineMarking.KotlinSpringModelDependenciesLineMarkerProvider"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.spring.inspections.KotlinFinalClassOrFunSpringInspection"
|
||||
displayName="Final Kotlin class or function with Spring annotation"
|
||||
groupBundle="resources.messages.SpringBundle"
|
||||
groupKey="inspection.group.code"
|
||||
groupPath="Spring,Spring Core"
|
||||
enabledByDefault="false"
|
||||
level="WARNING"/>
|
||||
<localInspection language="kotlin"
|
||||
displayName="Spring Facet Code Configuration (Kotlin)"
|
||||
groupBundle="resources.messages.SpringBundle"
|
||||
groupKey="inspection.group.setup"
|
||||
groupPath="Spring,Spring Core"
|
||||
enabledByDefault="true"
|
||||
level="WARNING"
|
||||
implementationClass="org.jetbrains.kotlin.idea.spring.inspections.KotlinSpringFacetCodeInspection"/>
|
||||
<localInspection language="kotlin"
|
||||
displayName="Autowired members defined in invalid Spring bean (Kotlin)"
|
||||
groupBundle="resources.messages.SpringBundle"
|
||||
groupKey="inspection.group.code"
|
||||
groupPath="Spring,Spring Core"
|
||||
enabledByDefault="true"
|
||||
level="WARNING"
|
||||
implementationClass="org.jetbrains.kotlin.idea.spring.inspections.SpringKotlinAutowiredMembersInspection"/>
|
||||
<localInspection language="kotlin"
|
||||
displayName="Autowiring for Bean Class (Kotlin)"
|
||||
groupBundle="resources.messages.SpringBundle"
|
||||
groupKey="inspection.group.code"
|
||||
groupPath="Spring,Spring Core"
|
||||
enabledByDefault="true"
|
||||
level="ERROR"
|
||||
implementationClass="org.jetbrains.kotlin.idea.spring.inspections.SpringKotlinAutowiringInspection"/>
|
||||
<localInspection language="kotlin"
|
||||
displayName="@ComponentScan setup (Kotlin)"
|
||||
groupBundle="resources.messages.SpringBundle"
|
||||
groupKey="inspection.group.code"
|
||||
groupPath="Spring,Spring Core"
|
||||
enabledByDefault="true"
|
||||
level="ERROR"
|
||||
implementationClass="org.jetbrains.kotlin.idea.spring.inspections.KotlinSpringComponentScanInspection"/>
|
||||
</extensions>
|
||||
|
||||
<actions>
|
||||
<action id="Kotlin.Spring.Beans.Generate.Setter.Dependency.Action"
|
||||
class="org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinSpringBeanXmlDependencyAction$Setter">
|
||||
<add-to-group anchor="last" group-id="GenerateGroup"/>
|
||||
</action>
|
||||
<action id="Kotlin.Spring.Beans.Generate.Constructor.Dependency.Action"
|
||||
class="org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinSpringBeanXmlDependencyAction$Constructor">
|
||||
<add-to-group anchor="last" group-id="GenerateGroup"/>
|
||||
</action>
|
||||
<action id="Kotlin.Spring.Beans.Generate.Lateinit.Property.Dependency.Action"
|
||||
class="org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinSpringBeanXmlDependencyAction$LateinitProperty">
|
||||
<add-to-group anchor="last" group-id="GenerateGroup"/>
|
||||
</action>
|
||||
|
||||
<action id="Kotlin.Spring.Beans.Generate.Autowired.Dependency.Action"
|
||||
class="org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction">
|
||||
<add-to-group anchor="last" group-id="GenerateGroup"/>
|
||||
</action>
|
||||
</actions>
|
||||
</idea-plugin>
|
||||
-111
@@ -1,111 +0,0 @@
|
||||
/*
|
||||
* 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.inspections
|
||||
|
||||
import com.intellij.codeInsight.highlighting.HighlightUsagesDescriptionLocation
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.ElementDescriptionUtil
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import com.intellij.spring.constants.SpringAnnotationsConstants
|
||||
import com.intellij.spring.model.jam.stereotype.SpringComponent
|
||||
import com.intellij.spring.model.jam.stereotype.SpringConfiguration
|
||||
import com.intellij.spring.model.jam.transaction.SpringTransactionalComponent
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
import org.jetbrains.kotlin.asJava.toLightMethods
|
||||
import org.jetbrains.kotlin.descriptors.MemberDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptorIfAny
|
||||
import org.jetbrains.kotlin.idea.core.isInheritable
|
||||
import org.jetbrains.kotlin.idea.core.isOverridable
|
||||
import org.jetbrains.kotlin.idea.inspections.AbstractKotlinInspection
|
||||
import org.jetbrains.kotlin.idea.spring.isAnnotatedWith
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject
|
||||
|
||||
class KotlinFinalClassOrFunSpringInspection : AbstractKotlinInspection() {
|
||||
class QuickFix<T: KtModifierListOwner>(private val element: T) : LocalQuickFix {
|
||||
override fun getName(): String {
|
||||
return "Make ${ElementDescriptionUtil.getElementDescription(element, HighlightUsagesDescriptionLocation.INSTANCE)} open"
|
||||
}
|
||||
|
||||
override fun getFamilyName() = "Make declaration open"
|
||||
|
||||
override fun applyFix(project: Project, problemDescriptor: ProblemDescriptor) {
|
||||
(element as? KtNamedDeclaration)?.containingClassOrObject?.addModifier(KtTokens.OPEN_KEYWORD)
|
||||
element.addModifier(KtTokens.OPEN_KEYWORD)
|
||||
}
|
||||
}
|
||||
|
||||
private fun getMessage(declaration: KtNamedDeclaration): String? {
|
||||
when (declaration) {
|
||||
is KtClassOrObject -> {
|
||||
val lightClass = declaration.toLightClass() ?: return null
|
||||
val annotation = when {
|
||||
SpringConfiguration.META.getJamElement(lightClass) != null -> "@Configuration"
|
||||
SpringComponent.META.getJamElement(lightClass) != null -> "@Component"
|
||||
SpringTransactionalComponent.META.getJamElement(lightClass) != null -> "@Transactional"
|
||||
else -> return null
|
||||
}
|
||||
return if (declaration is KtClass) "$annotation class should be declared open" else "$annotation should not be applied to object declaration "
|
||||
}
|
||||
|
||||
is KtNamedFunction -> {
|
||||
val lightMethod = declaration.toLightMethods().firstOrNull() ?: return null
|
||||
when {
|
||||
lightMethod.isAnnotatedWith(SpringAnnotationsConstants.JAVA_SPRING_BEAN) -> return "@Bean function should be declared open"
|
||||
lightMethod.isAnnotatedWith(SpringAnnotationsConstants.TRANSACTIONAL) -> return "@Transactional function should be declared open"
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean): PsiElementVisitor {
|
||||
return object: KtVisitorVoid() {
|
||||
private fun KtNamedDeclaration.isOpen(): Boolean {
|
||||
when (this) {
|
||||
is KtClass -> if (isInheritable()) return true
|
||||
is KtObjectDeclaration -> return false
|
||||
is KtNamedFunction -> if (isOverridable()) return true
|
||||
else -> return true
|
||||
}
|
||||
|
||||
val descriptor = resolveToDescriptorIfAny() as? MemberDescriptor
|
||||
return descriptor?.modality != Modality.FINAL
|
||||
}
|
||||
|
||||
override fun visitNamedDeclaration(declaration: KtNamedDeclaration) {
|
||||
if (declaration.isOpen()) return
|
||||
|
||||
val message = getMessage(declaration) ?: return
|
||||
|
||||
val fixes = if (declaration !is KtObjectDeclaration) arrayOf(QuickFix(declaration)) else LocalQuickFix.EMPTY_ARRAY
|
||||
holder.registerProblem(
|
||||
declaration.nameIdentifier ?: declaration,
|
||||
message,
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
*fixes
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-199
@@ -1,199 +0,0 @@
|
||||
package org.jetbrains.kotlin.idea.spring.inspections
|
||||
|
||||
import com.intellij.codeInsight.AnnotationUtil
|
||||
import com.intellij.codeInsight.FileModificationService
|
||||
import com.intellij.codeInsight.lookup.LookupElement
|
||||
import com.intellij.codeInsight.template.*
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager
|
||||
import com.intellij.openapi.fileEditor.OpenFileDescriptor
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.*
|
||||
import com.intellij.psi.util.PropertyUtil
|
||||
import com.intellij.spring.CommonSpringModel
|
||||
import com.intellij.spring.SpringBundle
|
||||
import com.intellij.spring.model.SpringBeanPointer
|
||||
import com.intellij.spring.model.converters.SpringConverterUtil
|
||||
import com.intellij.spring.model.highlighting.autowire.SpringJavaConstructorAutowiringInspection
|
||||
import com.intellij.spring.model.highlighting.autowire.SpringUastInjectionPointsAutowiringInspection
|
||||
import com.intellij.spring.model.utils.SpringAutowireUtil
|
||||
import org.jetbrains.kotlin.asJava.elements.KtLightField
|
||||
import org.jetbrains.kotlin.asJava.elements.KtLightMethod
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
import org.jetbrains.kotlin.asJava.toLightElements
|
||||
import org.jetbrains.kotlin.asJava.toLightMethods
|
||||
import org.jetbrains.kotlin.idea.core.ShortenReferences
|
||||
import org.jetbrains.kotlin.idea.inspections.AbstractKotlinInspection
|
||||
import org.jetbrains.kotlin.idea.inspections.registerWithElementsUnwrapped
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.*
|
||||
import org.jetbrains.kotlin.utils.SmartList
|
||||
import org.jetbrains.uast.UClass
|
||||
import org.jetbrains.uast.UDeclaration
|
||||
import org.jetbrains.uast.toUElementOfType
|
||||
|
||||
class SpringKotlinAutowiringInspection : AbstractKotlinInspection() {
|
||||
// Based on SpringJavaInjectionPointsAutowiringInspection.AddSpringBeanQualifierFix
|
||||
class AddQualifierFix(
|
||||
modifierListOwner: KtModifierListOwner,
|
||||
private val beanPointers: Collection<SpringBeanPointer<*>>,
|
||||
private val annotationFqName: String
|
||||
) : LocalQuickFix {
|
||||
private val elementPointer = modifierListOwner.createSmartPointer()
|
||||
|
||||
override fun getName() = SpringBundle.message("SpringAutowiringInspection.add.qualifier.fix")
|
||||
|
||||
override fun getFamilyName() = name
|
||||
|
||||
private fun getQualifierNamesSuggestNamesExpression(expression: KtStringTemplateExpression): Expression {
|
||||
return object : Expression() {
|
||||
override fun calculateResult(context: ExpressionContext): Result? {
|
||||
PsiDocumentManager.getInstance(context.project).commitAllDocuments()
|
||||
return TextResult(expression.plainContent)
|
||||
}
|
||||
|
||||
override fun calculateQuickResult(context: ExpressionContext) = this.calculateResult(context)
|
||||
|
||||
override fun calculateLookupItems(context: ExpressionContext): Array<LookupElement>? {
|
||||
PsiDocumentManager.getInstance(context.project).commitAllDocuments()
|
||||
return beanPointers.sortedBy { it.name ?: "" }.mapNotNull { SpringConverterUtil.createCompletionVariant(it) }.toTypedArray()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun createQualifierNameTemplate(expression: KtStringTemplateExpression): Template {
|
||||
val builder = TemplateBuilderImpl(expression.containingFile)
|
||||
builder.replaceRange(
|
||||
expression.getContentRange().shiftRight(expression.startOffset),
|
||||
getQualifierNamesSuggestNamesExpression(expression)
|
||||
)
|
||||
return builder.buildInlineTemplate()
|
||||
}
|
||||
|
||||
override fun applyFix(project: Project, descriptor: ProblemDescriptor) {
|
||||
val modifierListOwner = elementPointer.element ?: return
|
||||
if (!FileModificationService.getInstance().preparePsiElementForWrite(modifierListOwner)) return
|
||||
if (beanPointers.isEmpty()) return
|
||||
|
||||
val defaultBeanName = with(beanPointers.first().name) { if (isNullOrBlank()) "Unknown" else this }
|
||||
val entry = KtPsiFactory(project).createAnnotationEntry("@$annotationFqName(\"$defaultBeanName\")")
|
||||
val addedEntry = modifierListOwner.addAnnotationEntry(entry)
|
||||
|
||||
ShortenReferences.DEFAULT.process(addedEntry)
|
||||
|
||||
val stringTemplate = addedEntry.valueArguments.first().getArgumentExpression() as? KtStringTemplateExpression ?: return
|
||||
val virtualFile = modifierListOwner.containingFile.virtualFile!!
|
||||
val editor = FileEditorManager.getInstance(project).openTextEditor(OpenFileDescriptor(project, virtualFile, 0), false)!!
|
||||
PsiDocumentManager.getInstance(project).doPostponedOperationsAndUnblockDocument(editor.document)
|
||||
TemplateManager.getInstance(project).startTemplate(editor, createQualifierNameTemplate(stringTemplate))
|
||||
}
|
||||
}
|
||||
|
||||
private val uastInspection by lazy { SpringUastInjectionPointsAutowiringInspection() }
|
||||
private val nonUastInspection by lazy { SpringJavaConstructorAutowiringInspection() }
|
||||
|
||||
override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean) = object : KtVisitorVoid() {
|
||||
// TODO: SpringJavaInjectionPointsAutowiringInspection.checkAutowiredMethod() is not accessible here
|
||||
private fun checkAutowiredMethod(psiMethod: PsiMethod, holder: ProblemsHolder, springModel: CommonSpringModel, required: Boolean) {
|
||||
val resourceAnnotation = SpringAutowireUtil.getResourceAnnotation(psiMethod)
|
||||
when {
|
||||
resourceAnnotation != null -> {
|
||||
val propertyType = PropertyUtil.getPropertyType(psiMethod) ?: return
|
||||
psiMethod.toUElementOfType<UDeclaration>()?.let { uMethod ->
|
||||
SpringUastInjectionPointsAutowiringInspection.checkInjectionPoint(uMethod, propertyType, holder, springModel, required)
|
||||
}
|
||||
}
|
||||
psiMethod.parameterList.parametersCount == 0 &&
|
||||
SpringAutowireUtil.isAutowiredByAnnotation(psiMethod) -> {
|
||||
val nameIdentifier = psiMethod.nameIdentifier ?: return
|
||||
val message = SpringBundle.message("bean.autowiring.by.type.no.parameter.for.autowired.method",
|
||||
if (psiMethod.isConstructor) "constructor" else "method")
|
||||
holder.registerProblem(nameIdentifier, message)
|
||||
}
|
||||
else -> {
|
||||
for (parameter in psiMethod.parameterList.parameters) {
|
||||
if (AnnotationUtil.isAnnotated(parameter, "org.springframework.beans.factory.annotation.Value", true)) continue
|
||||
parameter.toUElementOfType<UDeclaration>()?.let { uParameter ->
|
||||
SpringUastInjectionPointsAutowiringInspection.checkInjectionPoint(uParameter, parameter.type, holder, springModel, required)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun Array<ProblemDescriptor>.registerAdjustedProblems() {
|
||||
registerWithElementsUnwrapped(holder, isOnTheFly) { qf, element ->
|
||||
// Can't access AddSpringBeanQualifierFix class directly
|
||||
|
||||
val klass = qf.javaClass
|
||||
if (!klass.name.endsWith("AddSpringBeanQualifierFix")) return@registerWithElementsUnwrapped qf
|
||||
|
||||
try {
|
||||
val fields = klass.declaredFields
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val beanPointers = fields[1].apply { isAccessible = true }.get(qf) as Collection<SpringBeanPointer<*>>
|
||||
val annotationFqName = fields[2].apply { isAccessible = true }.get(qf) as String
|
||||
val modifierListOwner = element.getNonStrictParentOfType<KtModifierListOwner>()
|
||||
?: return@registerWithElementsUnwrapped qf
|
||||
AddQualifierFix(modifierListOwner, beanPointers, annotationFqName)
|
||||
}
|
||||
catch (e: Exception) {
|
||||
return@registerWithElementsUnwrapped null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun <T : PsiMember> T.processLightMember(
|
||||
action: T.(holder: ProblemsHolder, model: CommonSpringModel, required: Boolean) -> Unit
|
||||
) {
|
||||
val model = SpringAutowireUtil.getProcessingSpringModel(containingClass) ?: return
|
||||
val required = SpringAutowireUtil.isRequired(this)
|
||||
val tmpHolder = ProblemsHolder(holder.manager, containingFile, isOnTheFly)
|
||||
action(this, tmpHolder, model, required)
|
||||
tmpHolder.resultsArray.registerAdjustedProblems()
|
||||
}
|
||||
|
||||
private fun PsiMethod.processLightMethod() {
|
||||
if (!SpringAutowireUtil.isInjectionPoint(this)) return
|
||||
processLightMember { holder, model, required -> checkAutowiredMethod(this, holder, model, required) }
|
||||
}
|
||||
|
||||
private fun PsiField.processLightField() {
|
||||
if (!SpringAutowireUtil.isAutowiredByAnnotation(this)) return
|
||||
processLightMember { holder, model, required ->
|
||||
this.toUElementOfType<UDeclaration>()?.let { uDeclaration ->
|
||||
SpringUastInjectionPointsAutowiringInspection.checkInjectionPoint(uDeclaration, type, holder, model, required)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun PsiClass.processLightClass() {
|
||||
val reports = SmartList<ProblemDescriptor>()
|
||||
this.toUElementOfType<UClass>()?.let { uClass ->
|
||||
uastInspection.checkClass(uClass, holder.manager, isOnTheFly)?.let { reports.addAll(it) }
|
||||
}
|
||||
nonUastInspection.checkClass(this, holder.manager, isOnTheFly)?.let { reports.addAll(it) }
|
||||
reports.toTypedArray().registerAdjustedProblems()
|
||||
}
|
||||
|
||||
override fun visitNamedFunction(function: KtNamedFunction) {
|
||||
function.toLightMethods().firstOrNull()?.processLightMethod()
|
||||
}
|
||||
|
||||
override fun visitProperty(property: KtProperty) {
|
||||
if (property.name != null) // It is here because `lightElement.name` returns `<no name provided>` instead of `null` suddenly
|
||||
for (lightElement in property.toLightElements()) {
|
||||
when (lightElement) {
|
||||
is KtLightMethod -> lightElement.processLightMethod()
|
||||
is KtLightField -> lightElement.processLightField()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun visitClassOrObject(classOrObject: KtClassOrObject) {
|
||||
classOrObject.toLightClass()?.processLightClass()
|
||||
}
|
||||
}
|
||||
}
|
||||
-152
@@ -1,152 +0,0 @@
|
||||
/*
|
||||
* 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.lineMarking
|
||||
|
||||
import com.intellij.codeInsight.daemon.GutterIconNavigationHandler
|
||||
import com.intellij.codeInsight.daemon.LineMarkerInfo
|
||||
import com.intellij.codeInsight.daemon.RelatedItemLineMarkerInfo
|
||||
import com.intellij.navigation.GotoRelatedItem
|
||||
import com.intellij.openapi.editor.markup.GutterIconRenderer
|
||||
import com.intellij.openapi.util.NotNullLazyValue
|
||||
import com.intellij.psi.PsiAnnotation
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiNameIdentifierOwner
|
||||
import com.intellij.psi.impl.source.tree.LeafPsiElement
|
||||
import com.intellij.spring.gutter.SpringClassAnnotator
|
||||
import com.intellij.util.Function
|
||||
import com.intellij.util.SmartList
|
||||
import org.jetbrains.kotlin.asJava.elements.KtLightAnnotationForSourceEntry
|
||||
import org.jetbrains.kotlin.asJava.elements.KtLightElement
|
||||
import org.jetbrains.kotlin.asJava.elements.KtLightIdentifier
|
||||
import org.jetbrains.kotlin.asJava.elements.KtLightMethod
|
||||
import org.jetbrains.kotlin.asJava.toLightAnnotation
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
import org.jetbrains.kotlin.asJava.toLightElements
|
||||
import org.jetbrains.kotlin.asJava.toLightMethods
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptor
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getCallNameExpression
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getParentOfTypeAndBranch
|
||||
import org.jetbrains.kotlin.resolve.annotations.hasJvmStaticAnnotation
|
||||
import javax.swing.Icon
|
||||
|
||||
class KotlinSpringClassAnnotator : SpringClassAnnotator() {
|
||||
override fun getElementToProcess(psiElement: PsiElement): PsiElement? {
|
||||
if (psiElement is KtLightIdentifier) return psiElement.parent
|
||||
psiElement.getParentOfTypeAndBranch<KtClass> { nameIdentifier }?.let { return it.toLightClass() }
|
||||
psiElement.getParentOfTypeAndBranch<KtNamedFunction> { nameIdentifier }?.let { function ->
|
||||
val containingClassOrObject = function.containingClassOrObject
|
||||
val classForLightMethod = if (containingClassOrObject is KtObjectDeclaration
|
||||
&& containingClassOrObject.isCompanion()
|
||||
&& function.resolveToDescriptor().hasJvmStaticAnnotation()) {
|
||||
containingClassOrObject.containingClassOrObject
|
||||
}
|
||||
else {
|
||||
containingClassOrObject
|
||||
}
|
||||
return classForLightMethod?.toLightClass()?.methods?.firstOrNull { (it as? KtLightMethod)?.kotlinOrigin == function }
|
||||
}
|
||||
psiElement.getParentOfTypeAndBranch<KtConstructor<*>> { getConstructorKeyword() ?: getValueParameterList() }?.let {
|
||||
return it.toLightMethods().firstOrNull()
|
||||
}
|
||||
psiElement.getParentOfTypeAndBranch<KtProperty> { nameIdentifier }?.let { return it }
|
||||
psiElement.getParentOfTypeAndBranch<KtParameter> { nameIdentifier }?.let { if (it.valOrVarKeyword != null) return it }
|
||||
psiElement.getParentOfTypeAndBranch<KtAnnotationEntry> {
|
||||
(typeReference?.typeElement as? KtUserType)?.referenceExpression?.getReferencedNameElement()
|
||||
}?.let { return it.toLightAnnotation() }
|
||||
return null
|
||||
}
|
||||
|
||||
private fun doCollectMarkers(psiElement: PsiElement, result: MutableCollection<in RelatedItemLineMarkerInfo<PsiElement>>) {
|
||||
if (psiElement is KtProperty || psiElement is KtParameter) {
|
||||
for (it in (psiElement as KtDeclaration).toLightElements()) {
|
||||
val nameIdentifier = (it as? PsiNameIdentifierOwner)?.nameIdentifier ?: continue
|
||||
super.collectNavigationMarkers(nameIdentifier, result)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Workaround for SpringClassAnnotator
|
||||
(getElementToProcess(psiElement) as? KtLightAnnotationForSourceEntry)?.let { return super.collectNavigationMarkers(it, result) }
|
||||
|
||||
super.collectNavigationMarkers(psiElement, result)
|
||||
}
|
||||
|
||||
// TODO
|
||||
// Weak references to light elements may be reclaimed by GC after original file is modified causing line markers to misbehave
|
||||
// This workaround allows reuse of SpringClassAnnotator logic and avoids binding of line markers to light elements
|
||||
|
||||
private val toolTipProviderField by lazy { LineMarkerInfo::class.java.getDeclaredField("myTooltipProvider").apply { isAccessible = true } }
|
||||
private val iconField by lazy { LineMarkerInfo::class.java.getDeclaredField("myIcon").apply { isAccessible = true } }
|
||||
private val iconAlignmentField by lazy { LineMarkerInfo::class.java.getDeclaredField("myIconAlignment").apply { isAccessible = true } }
|
||||
private val targetsField by lazy { RelatedItemLineMarkerInfo::class.java.getDeclaredField("myTargets").apply { isAccessible = true } }
|
||||
|
||||
override fun getIdentifierLocal(annotation: PsiAnnotation): PsiElement? {
|
||||
return when (annotation) {
|
||||
is KtLightAnnotationForSourceEntry -> annotation.kotlinOrigin.getCallNameExpression()?.getIdentifier()
|
||||
else -> super.getIdentifierLocal(annotation)
|
||||
}
|
||||
}
|
||||
|
||||
override fun collectNavigationMarkers(psiElement: PsiElement, result: MutableCollection<in RelatedItemLineMarkerInfo<PsiElement>>) {
|
||||
val newItems = SmartList<RelatedItemLineMarkerInfo<PsiElement>>()
|
||||
|
||||
doCollectMarkers(psiElement, newItems)
|
||||
|
||||
newItems.mapNotNullTo(result) { item ->
|
||||
val itemElement = item.element
|
||||
val elementToAnnotate = when (itemElement) {
|
||||
is KtLightIdentifier -> itemElement.origin.let { ktElement ->
|
||||
when (ktElement) {
|
||||
is KtParameterList -> ktElement.leftParenthesis
|
||||
else -> ktElement
|
||||
}
|
||||
}
|
||||
is KtLightElement<*, *> -> itemElement.kotlinOrigin
|
||||
is LeafPsiElement -> itemElement
|
||||
else -> return@mapNotNullTo item
|
||||
}
|
||||
if (elementToAnnotate == null) return@mapNotNullTo null
|
||||
if (alreadyMarked(result, elementToAnnotate, item.navigationHandler)) return@mapNotNullTo null
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
RelatedItemLineMarkerInfo<PsiElement>(
|
||||
elementToAnnotate,
|
||||
elementToAnnotate.textRange,
|
||||
iconField.get(item) as Icon?,
|
||||
item.updatePass,
|
||||
toolTipProviderField.get(item) as Function<PsiElement, String>,
|
||||
item.navigationHandler,
|
||||
iconAlignmentField.get(item) as GutterIconRenderer.Alignment,
|
||||
targetsField.get(item) as NotNullLazyValue<Collection<GotoRelatedItem>>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun alreadyMarked(result: MutableCollection<in RelatedItemLineMarkerInfo<PsiElement>>,
|
||||
elementToAnnotate: PsiElement,
|
||||
navigationHandler: GutterIconNavigationHandler<*>?) =
|
||||
result.any {
|
||||
when (it) {
|
||||
is RelatedItemLineMarkerInfo<*> -> {
|
||||
it.element == elementToAnnotate && it.navigationHandler == navigationHandler
|
||||
}
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
}
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.spring.inspections.SpringKotlinAutowiringInspection
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// CONFIGURE_SPRING_FILE_SET
|
||||
// RUNTIME_WITH_FULL_JDK
|
||||
ultimate/testData/inspections/spring/finalSpringAnnotatedDeclaration/inspectionData/expected.xml.173
Vendored
-130
@@ -1,130 +0,0 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>22</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Configuration class should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>25</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Configuration class should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>36</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Component class should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>45</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Bean function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>48</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Bean function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>59</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Bean function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>62</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Bean function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>74</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Transactional class should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>76</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Transactional function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>79</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Transactional function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>91</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Transactional function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>94</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Transactional function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>106</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Configuration should not be applied to object declaration</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>109</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Configuration should not be applied to object declaration</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>112</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Component should not be applied to object declaration</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>115</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Transactional should not be applied to object declaration</description>
|
||||
</problem>
|
||||
</problems>
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.spring.inspections.KotlinFinalClassOrFunSpringInspection
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
-115
@@ -1,115 +0,0 @@
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.ComponentScan
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.transaction.annotation.Transactional
|
||||
|
||||
@Configuration
|
||||
annotation class MyConfiguration
|
||||
|
||||
@Bean
|
||||
annotation class MyBean
|
||||
|
||||
@Transactional
|
||||
annotation class MyTransactional
|
||||
|
||||
// @Configuration
|
||||
|
||||
@Configuration
|
||||
class Application1
|
||||
|
||||
@MyConfiguration
|
||||
class Application2
|
||||
|
||||
@Configuration
|
||||
open class Application3
|
||||
|
||||
@MyConfiguration
|
||||
open class Application4
|
||||
|
||||
// @Component
|
||||
|
||||
@Component
|
||||
class Component1
|
||||
|
||||
@Component
|
||||
open class Component2
|
||||
|
||||
// @Bean
|
||||
|
||||
class Utils1 {
|
||||
@Bean
|
||||
fun foo1() = Component1()
|
||||
|
||||
@MyBean
|
||||
fun foo2() = Component2()
|
||||
|
||||
@Bean
|
||||
open fun foo3() = Component3()
|
||||
|
||||
@MyBean
|
||||
open fun foo4() = Component4()
|
||||
}
|
||||
|
||||
open class Utils2 {
|
||||
@Bean
|
||||
fun foo1() = Component1()
|
||||
|
||||
@MyBean
|
||||
fun foo2() = Component2()
|
||||
|
||||
@Bean
|
||||
open fun foo3() = Component3()
|
||||
|
||||
@MyBean
|
||||
open fun foo4() = Component4()
|
||||
}
|
||||
|
||||
// @Transactional
|
||||
|
||||
@Transactional
|
||||
class Trans1 {
|
||||
@Transactional
|
||||
fun foo1() = Component1()
|
||||
|
||||
@MyTransactional
|
||||
fun foo2() = Component2()
|
||||
|
||||
@Transactional
|
||||
open fun foo3() = Component3()
|
||||
|
||||
@MyTransactional
|
||||
open fun foo4() = Component4()
|
||||
}
|
||||
|
||||
@Transactional
|
||||
open class Trans2 {
|
||||
@Transactional
|
||||
fun foo1() = Component1()
|
||||
|
||||
@MyTransactional
|
||||
fun foo2() = Component2()
|
||||
|
||||
@Transactional
|
||||
open fun foo3() = Component3()
|
||||
|
||||
@MyTransactional
|
||||
open fun foo4() = Component4()
|
||||
}
|
||||
|
||||
// Object declarations
|
||||
|
||||
@Configuration
|
||||
object Application5
|
||||
|
||||
@MyConfiguration
|
||||
object Application6
|
||||
|
||||
@Component
|
||||
object Component3
|
||||
|
||||
@Transactional
|
||||
object Trans3
|
||||
@@ -1 +0,0 @@
|
||||
org.jetbrains.kotlin.idea.spring.inspections.SpringKotlinAutowiringInspection
|
||||
-1
@@ -1 +0,0 @@
|
||||
org.jetbrains.kotlin.idea.spring.inspections.KotlinFinalClassOrFunSpringInspection
|
||||
ultimate/testData/quickFixes/spring/finalSpringAnnotatedDeclaration/classWithComponentRuntime.kt.173
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
// "Make class Bean open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@Component
|
||||
class <caret>Bean
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// "Make class Bean open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@Component
|
||||
open class <caret>Bean
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// "Make class Application open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
class <caret>Application
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// "Make class Application open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
open class <caret>Application
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
// "Make class Application open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
annotation class MyConfiguration
|
||||
|
||||
@MyConfiguration
|
||||
class <caret>Application
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
// "Make class Application open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
annotation class MyConfiguration
|
||||
|
||||
@MyConfiguration
|
||||
open class <caret>Application
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
class Foo {
|
||||
@Bean
|
||||
fun <caret>foo() = ""
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
open class Foo {
|
||||
@Bean
|
||||
open fun <caret>foo() = ""
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
open class Foo {
|
||||
@Bean
|
||||
fun <caret>foo() = ""
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
open class Foo {
|
||||
@Bean
|
||||
open fun <caret>foo() = ""
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
@Bean
|
||||
annotation class MyBean
|
||||
|
||||
class Foo {
|
||||
@MyBean
|
||||
fun <caret>foo() = ""
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
@Bean
|
||||
annotation class MyBean
|
||||
|
||||
open class Foo {
|
||||
@MyBean
|
||||
open fun <caret>foo() = ""
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
@Bean
|
||||
annotation class MyBean
|
||||
|
||||
open class Foo {
|
||||
@MyBean
|
||||
fun <caret>foo() = ""
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
@Bean
|
||||
annotation class MyBean
|
||||
|
||||
open class Foo {
|
||||
@MyBean
|
||||
open fun <caret>foo() = ""
|
||||
}
|
||||
-62
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 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.TargetBackend;
|
||||
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$"), TargetBackend.ANY, 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);
|
||||
}
|
||||
}
|
||||
-116
@@ -1,116 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 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.generate;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
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/generate")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class GenerateSpringDependencyActionTestGenerated extends AbstractGenerateSpringDependencyActionTest {
|
||||
public void testAllFilesPresentInGenerate() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("ultimate/testData/spring/core/generate"), Pattern.compile("^([\\w]+)\\.kt$"), TargetBackend.ANY);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredDependencies/duplicatingPropertyAnnotationConfig.kt")
|
||||
public void testAutowiredDependencies_DuplicatingPropertyAnnotationConfig() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/autowiredDependencies/duplicatingPropertyAnnotationConfig.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredDependencies/duplicatingPropertyXmlConfig.kt")
|
||||
public void testAutowiredDependencies_DuplicatingPropertyXmlConfig() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/autowiredDependencies/duplicatingPropertyXmlConfig.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredDependencies/multiplePropertiesAnnotationConfig.kt")
|
||||
public void testAutowiredDependencies_MultiplePropertiesAnnotationConfig() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/autowiredDependencies/multiplePropertiesAnnotationConfig.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredDependencies/multiplePropertiesXmlConfig.kt")
|
||||
public void testAutowiredDependencies_MultiplePropertiesXmlConfig() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/autowiredDependencies/multiplePropertiesXmlConfig.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredDependencies/propertyWithQualifierAnnotationConfig.kt")
|
||||
public void testAutowiredDependencies_PropertyWithQualifierAnnotationConfig() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/autowiredDependencies/propertyWithQualifierAnnotationConfig.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredDependencies/propertyWithQualifierXmlConfig.kt")
|
||||
public void testAutowiredDependencies_PropertyWithQualifierXmlConfig() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/autowiredDependencies/propertyWithQualifierXmlConfig.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredDependencies/singlePropertyAnnotationConfig.kt")
|
||||
public void testAutowiredDependencies_SinglePropertyAnnotationConfig() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/autowiredDependencies/singlePropertyAnnotationConfig.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredDependencies/singlePropertyXmlConfig.kt")
|
||||
public void testAutowiredDependencies_SinglePropertyXmlConfig() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/autowiredDependencies/singlePropertyXmlConfig.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("beanDependenciesByXml/firstConstructor.kt")
|
||||
public void testBeanDependenciesByXml_FirstConstructor() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/beanDependenciesByXml/firstConstructor.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("beanDependenciesByXml/primaryConstructorAddParam.kt")
|
||||
public void testBeanDependenciesByXml_PrimaryConstructorAddParam() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/beanDependenciesByXml/primaryConstructorAddParam.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("beanDependenciesByXml/property.kt")
|
||||
public void testBeanDependenciesByXml_Property() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/beanDependenciesByXml/property.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("beanDependenciesByXml/secondaryConstructorAddParam.kt")
|
||||
public void testBeanDependenciesByXml_SecondaryConstructorAddParam() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/beanDependenciesByXml/secondaryConstructorAddParam.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("beanDependenciesByXml/setter.kt")
|
||||
public void testBeanDependenciesByXml_Setter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/generate/beanDependenciesByXml/setter.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
-110
@@ -1,110 +0,0 @@
|
||||
/*
|
||||
* 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.gutter
|
||||
|
||||
import com.google.gson.JsonArray
|
||||
import com.google.gson.JsonObject
|
||||
import com.google.gson.JsonParser
|
||||
import com.intellij.codeInsight.daemon.LineMarkerProviders
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import icons.SpringApiIcons
|
||||
import junit.framework.Assert
|
||||
import junit.framework.AssertionFailedError
|
||||
import org.jetbrains.kotlin.idea.KotlinLanguage
|
||||
import org.jetbrains.kotlin.idea.jsonUtils.getString
|
||||
import org.jetbrains.kotlin.idea.spring.lineMarking.KotlinSpringClassAnnotator
|
||||
import org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.idea.test.TestFixtureExtension
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractSpringClassAnnotatorTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor() = LightCodeInsightFixtureTestCase.JAVA_LATEST
|
||||
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
TestFixtureExtension.loadFixture<SpringTestFixtureExtension>(myModule)
|
||||
Assert.assertTrue("Kotlin-ultimate service was not found, make sure that <!-- ULTIMATE-PLUGIN-PLACEHOLDER --> " +
|
||||
"is replaced in `plugin.xml` with data from `ultimate-plugin.xml`",
|
||||
LineMarkerProviders.INSTANCE.allForLanguage(KotlinLanguage.INSTANCE).any { it is KotlinSpringClassAnnotator }
|
||||
)
|
||||
}
|
||||
|
||||
protected fun doTest(path: String) {
|
||||
val configFilePath = "${KotlinTestUtils.getHomeDirectory()}/$path"
|
||||
val configFile = File(configFilePath)
|
||||
val testRoot = configFile.parentFile
|
||||
|
||||
val config = JsonParser().parse(FileUtil.loadFile(configFile, true)) as JsonObject
|
||||
|
||||
PluginTestCaseBase.addJdk(myFixture.projectDisposable, PluginTestCaseBase::mockJdk)
|
||||
|
||||
val withRuntime = config["withRuntime"]?.asBoolean ?: false
|
||||
if (withRuntime) {
|
||||
ConfigLibraryUtil.configureKotlinRuntimeAndSdk(myModule, PluginTestCaseBase.mockJdk())
|
||||
}
|
||||
|
||||
try {
|
||||
val springConfigFiles = (config["springConfig"] as JsonArray).map { it.asString }
|
||||
myFixture.testDataPath = testRoot.absolutePath
|
||||
for (file in testRoot.listFiles()) {
|
||||
val name = file.name
|
||||
if (file.isDirectory) myFixture.copyDirectoryToProject(name, name) else myFixture.configureByFile(name)
|
||||
}
|
||||
TestFixtureExtension.getFixture<SpringTestFixtureExtension>()!!.configureFileSet(myFixture, springConfigFiles)
|
||||
|
||||
val fileName = config.getString("file")
|
||||
val iconName = config.getString("icon")
|
||||
val icon = SpringApiIcons.Gutter::class.java.getField(iconName)[null]
|
||||
|
||||
val gutter = myFixture.findGutter(fileName) ?: throw AssertionError("no gutter for '$fileName'")
|
||||
val gutterMark = gutter.let {
|
||||
if (it.icon == icon) it
|
||||
else myFixture.findGuttersAtCaret().let { gutters ->
|
||||
gutters.firstOrNull() { it.icon == icon }
|
||||
?: throw AssertionFailedError("no $icon in gutters: ${gutters.map { it.icon }}")
|
||||
}
|
||||
}
|
||||
|
||||
val tooltip = config.getString("tooltip")
|
||||
Assert.assertEquals(tooltip, gutterMark.tooltipText)
|
||||
|
||||
val naming = config.getString("naming")
|
||||
val targets = (config["targets"] as JsonArray).map { it.asString }
|
||||
when (naming) {
|
||||
"bean" -> checkBeanGutterTargets(gutterMark, targets)
|
||||
"property" -> checkBeanPropertyTargets(gutterMark, targets)
|
||||
"generic" -> checkPsiElementGutterTargets(gutterMark, targets)
|
||||
else -> error("Unexpected naming: $naming")
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if (withRuntime) {
|
||||
ConfigLibraryUtil.unConfigureKotlinRuntimeAndSdk(myModule, PluginTestCaseBase.mockJdk())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun tearDown() {
|
||||
TestFixtureExtension.unloadFixture<SpringTestFixtureExtension>()
|
||||
super.tearDown()
|
||||
}
|
||||
}
|
||||
-158
@@ -1,158 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 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.gutter;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
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/gutter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class SpringClassAnnotatorTestGenerated extends AbstractSpringClassAnnotatorTest {
|
||||
public void testAllFilesPresentInGutter() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("ultimate/testData/spring/core/gutter"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredBeanCandidates/autowiredBeanCandidates.test")
|
||||
public void testAutowiredBeanCandidates_AutowiredBeanCandidates() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/autowiredBeanCandidates/autowiredBeanCandidates.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredConstructor/autowiredConstructor.test")
|
||||
public void testAutowiredConstructor_AutowiredConstructor() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/autowiredConstructor/autowiredConstructor.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredProperty/autowiredProperty.test")
|
||||
public void testAutowiredProperty_AutowiredProperty() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/autowiredProperty/autowiredProperty.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredSetter/autowiredSetter.test")
|
||||
public void testAutowiredSetter_AutowiredSetter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/autowiredSetter/autowiredSetter.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classGutter/classGutter.test")
|
||||
public void testClassGutter_ClassGutter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/classGutter/classGutter.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classGutterAbstractShowMappedInheritors/classGutterAbstractShowMappedInheritors.test")
|
||||
public void testClassGutterAbstractShowMappedInheritors_ClassGutterAbstractShowMappedInheritors() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/classGutterAbstractShowMappedInheritors/classGutterAbstractShowMappedInheritors.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("componentScan/componentScan.test")
|
||||
public void testComponentScan_ComponentScan() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/componentScan/componentScan.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("componentScanWithBasePackageClasses/componentScanWithBasePackageClasses.test")
|
||||
public void testComponentScanWithBasePackageClasses_ComponentScanWithBasePackageClasses() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/componentScanWithBasePackageClasses/componentScanWithBasePackageClasses.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("componentScanWithBasePackages/componentScanWithBasePackages.test")
|
||||
public void testComponentScanWithBasePackages_ComponentScanWithBasePackages() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/componentScanWithBasePackages/componentScanWithBasePackages.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("contextBeanInjectionPoints/contextBeanInjectionPoints.test")
|
||||
public void testContextBeanInjectionPoints_ContextBeanInjectionPoints() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/contextBeanInjectionPoints/contextBeanInjectionPoints.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("contextBeanWithQualifierInjectionPoints/contextBeanWithQualifierInjectionPoints.test")
|
||||
public void testContextBeanWithQualifierInjectionPoints_ContextBeanWithQualifierInjectionPoints() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/contextBeanWithQualifierInjectionPoints/contextBeanWithQualifierInjectionPoints.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("importConfigClasses/importConfigClasses.test")
|
||||
public void testImportConfigClasses_ImportConfigClasses() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/importConfigClasses/importConfigClasses.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("innerBean/innerBean.test")
|
||||
public void testInnerBean_InnerBean() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/innerBean/innerBean.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("methodTypeDefaultInitMethod/methodTypeDefaultInitMethod.test")
|
||||
public void testMethodTypeDefaultInitMethod_MethodTypeDefaultInitMethod() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/methodTypeDefaultInitMethod/methodTypeDefaultInitMethod.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("methodTypeFactory/methodTypeFactory.test")
|
||||
public void testMethodTypeFactory_MethodTypeFactory() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/methodTypeFactory/methodTypeFactory.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("methodTypeInitMethod/methodTypeInitMethod.test")
|
||||
public void testMethodTypeInitMethod_MethodTypeInitMethod() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/methodTypeInitMethod/methodTypeInitMethod.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("methodTypeMultiple/methodTypeMultiple.test")
|
||||
public void testMethodTypeMultiple_MethodTypeMultiple() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/methodTypeMultiple/methodTypeMultiple.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("propertyGutterForProperty/propertyGutterForProperty.test")
|
||||
public void testPropertyGutterForProperty_PropertyGutterForProperty() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/propertyGutterForProperty/propertyGutterForProperty.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("propertyGutterForSetter/propertyGutterForSetter.test")
|
||||
public void testPropertyGutterForSetter_PropertyGutterForSetter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/propertyGutterForSetter/propertyGutterForSetter.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("resourceGutter/resourceGutter.test")
|
||||
public void testResourceGutter_ResourceGutter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/resourceGutter/resourceGutter.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 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.inspections;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
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/inspections/spring")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class SpringInspectionTestGenerated extends AbstractSpringInspectionTest {
|
||||
public void testAllFilesPresentInSpring() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("ultimate/testData/inspections/spring"), Pattern.compile("^(inspections\\.test)$"), TargetBackend.ANY);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredMembersInInvalidClass/inspectionData/inspections.test")
|
||||
public void testAutowiredMembersInInvalidClass_inspectionData_Inspections_test() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/inspections/spring/autowiredMembersInInvalidClass/inspectionData/inspections.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiring/inspectionData/inspections.test")
|
||||
public void testAutowiring_inspectionData_Inspections_test() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/inspections/spring/autowiring/inspectionData/inspections.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("componentScan/inspectionData/inspections.test")
|
||||
public void testComponentScan_inspectionData_Inspections_test() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/inspections/spring/componentScan/inspectionData/inspections.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("finalSpringAnnotatedDeclaration/inspectionData/inspections.test")
|
||||
public void testFinalSpringAnnotatedDeclaration_inspectionData_Inspections_test() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/inspections/spring/finalSpringAnnotatedDeclaration/inspectionData/inspections.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("unconfiguredFacet/inspectionData/inspections.test")
|
||||
public void testUnconfiguredFacet_inspectionData_Inspections_test() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/inspections/spring/unconfiguredFacet/inspectionData/inspections.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
-104
@@ -1,104 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 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.quickfixes;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
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/quickFixes/spring")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class SpringQuickFixTestGenerated extends AbstractSpringQuickFixTest {
|
||||
public void testAllFilesPresentInSpring() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("ultimate/testData/quickFixes/spring"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ultimate/testData/quickFixes/spring/addQualifierAnnotation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class AddQualifierAnnotation extends AbstractSpringQuickFixTest {
|
||||
public void testAllFilesPresentInAddQualifierAnnotation() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("ultimate/testData/quickFixes/spring/addQualifierAnnotation"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ambiguousBean.kt")
|
||||
public void testAmbiguousBean() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/quickFixes/spring/addQualifierAnnotation/ambiguousBean.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("ultimate/testData/quickFixes/spring/finalSpringAnnotatedDeclaration")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class FinalSpringAnnotatedDeclaration extends AbstractSpringQuickFixTest {
|
||||
public void testAllFilesPresentInFinalSpringAnnotatedDeclaration() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("ultimate/testData/quickFixes/spring/finalSpringAnnotatedDeclaration"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("classWithComponentRuntime.kt")
|
||||
public void testClassWithComponentRuntime() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/quickFixes/spring/finalSpringAnnotatedDeclaration/classWithComponentRuntime.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classWithConfigurationRuntime.kt")
|
||||
public void testClassWithConfigurationRuntime() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/quickFixes/spring/finalSpringAnnotatedDeclaration/classWithConfigurationRuntime.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classWithCustomConfigurationRuntime.kt")
|
||||
public void testClassWithCustomConfigurationRuntime() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/quickFixes/spring/finalSpringAnnotatedDeclaration/classWithCustomConfigurationRuntime.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("funWithBeanFinalClassRuntime.kt")
|
||||
public void testFunWithBeanFinalClassRuntime() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/quickFixes/spring/finalSpringAnnotatedDeclaration/funWithBeanFinalClassRuntime.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("funWithBeanOpenClassRuntime.kt")
|
||||
public void testFunWithBeanOpenClassRuntime() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/quickFixes/spring/finalSpringAnnotatedDeclaration/funWithBeanOpenClassRuntime.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("funWithCustomBeanFinalClassRuntime.kt")
|
||||
public void testFunWithCustomBeanFinalClassRuntime() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/quickFixes/spring/finalSpringAnnotatedDeclaration/funWithCustomBeanFinalClassRuntime.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("funWithCustomBeanOpenClassRuntime.kt")
|
||||
public void testFunWithCustomBeanOpenClassRuntime() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/quickFixes/spring/finalSpringAnnotatedDeclaration/funWithCustomBeanOpenClassRuntime.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 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.references;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
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/references/completion/handler")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class SpringReferenceCompletionHandlerTestGenerated extends AbstractSpringReferenceCompletionHandlerTest {
|
||||
public void testAllFilesPresentInHandler() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("ultimate/testData/spring/core/references/completion/handler"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("packageReferenceEnter.kt")
|
||||
public void testPackageReferenceEnter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/handler/packageReferenceEnter.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("packageReferenceTab.kt")
|
||||
public void testPackageReferenceTab() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/handler/packageReferenceTab.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("qualifierReferenceEnter.kt")
|
||||
public void testQualifierReferenceEnter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/handler/qualifierReferenceEnter.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("qualifierReferenceTab.kt")
|
||||
public void testQualifierReferenceTab() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/handler/qualifierReferenceTab.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("scopeReference.kt")
|
||||
public void testScopeReference() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/handler/scopeReference.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("springBeanReferenceEnter.kt")
|
||||
public void testSpringBeanReferenceEnter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/handler/springBeanReferenceEnter.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("springBeanReferenceTab.kt")
|
||||
public void testSpringBeanReferenceTab() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/handler/springBeanReferenceTab.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 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.references;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
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/references/completion/variants")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class SpringReferenceCompletionTestGenerated extends AbstractSpringReferenceCompletionTest {
|
||||
public void testAllFilesPresentInVariants() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("ultimate/testData/spring/core/references/completion/variants"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("beanWithDefaultName.kt")
|
||||
public void testBeanWithDefaultName() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/variants/beanWithDefaultName.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("beanWithExplicitName.kt")
|
||||
public void testBeanWithExplicitName() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/variants/beanWithExplicitName.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("packageReference.kt")
|
||||
public void testPackageReference() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/variants/packageReference.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("qualifierReference1Xml.kt")
|
||||
public void testQualifierReference1Xml() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/variants/qualifierReference1Xml.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("qualifierReference2Xml.kt")
|
||||
public void testQualifierReference2Xml() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/variants/qualifierReference2Xml.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("scopeReferenceXml.kt")
|
||||
public void testScopeReferenceXml() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/variants/scopeReferenceXml.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("springBeanReferenceXml.kt")
|
||||
public void testSpringBeanReferenceXml() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/completion/variants/springBeanReferenceXml.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
-92
@@ -1,92 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 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.references;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
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/references/navigation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class SpringReferenceNavigationTestGenerated extends AbstractSpringReferenceNavigationTest {
|
||||
public void testAllFilesPresentInNavigation() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("ultimate/testData/spring/core/references/navigation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("fileReferenceInClasspathResource.kt")
|
||||
public void testFileReferenceInClasspathResource() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/navigation/fileReferenceInClasspathResource.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("fileReferenceInClasspathXmlContext.kt")
|
||||
public void testFileReferenceInClasspathXmlContext() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/navigation/fileReferenceInClasspathXmlContext.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("packageReferenceInComponentScan.kt")
|
||||
public void testPackageReferenceInComponentScan() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/navigation/packageReferenceInComponentScan.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("qualifierReference.kt")
|
||||
public void testQualifierReference() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/navigation/qualifierReference.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("scopeReference.kt")
|
||||
public void testScopeReference() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/navigation/scopeReference.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("springBeanRefInFactoryContainsBean.kt")
|
||||
public void testSpringBeanRefInFactoryContainsBean() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/navigation/springBeanRefInFactoryContainsBean.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("springBeanRefInFactoryGetBean.kt")
|
||||
public void testSpringBeanRefInFactoryGetBean() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/navigation/springBeanRefInFactoryGetBean.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("springBeanRefInResource.kt")
|
||||
public void testSpringBeanRefInResource() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/navigation/springBeanRefInResource.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("springFactoryBeanRefInResource.kt")
|
||||
public void testSpringFactoryBeanRefInResource() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/references/navigation/springFactoryBeanRefInResource.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
-176
@@ -1,176 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 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.rename;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
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/rename")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class SpringRenameTestGenerated extends AbstractSpringRenameTest {
|
||||
public void testAllFilesPresentInRename() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("ultimate/testData/spring/core/rename"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY);
|
||||
}
|
||||
|
||||
@TestMetadata("annotationArgBySpELRefInXMLConf/annotationArgBySpELRefInXMLConf.test")
|
||||
public void testAnnotationArgBySpELRefInXMLConf_AnnotationArgBySpELRefInXMLConf() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/annotationArgBySpELRefInXMLConf/annotationArgBySpELRefInXMLConf.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@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("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");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("javaSpelRefToJava/javaSpelRefToJava.test")
|
||||
public void testJavaSpelRefToJava_JavaSpelRefToJava() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/javaSpelRefToJava/javaSpelRefToJava.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("javaSpelRefToJavaAnnotated/javaSpelRefToJavaAnnotated.test")
|
||||
public void testJavaSpelRefToJavaAnnotated_JavaSpelRefToJavaAnnotated() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/javaSpelRefToJavaAnnotated/javaSpelRefToJavaAnnotated.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("javaSpelRefToKt/javaSpelRefToKt.test")
|
||||
public void testJavaSpelRefToKt_JavaSpelRefToKt() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/javaSpelRefToKt/javaSpelRefToKt.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("javaSpelRefToKtAnnotated/javaSpelRefToKtAnnotated.test")
|
||||
public void testJavaSpelRefToKtAnnotated_JavaSpelRefToKtAnnotated() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/javaSpelRefToKtAnnotated/javaSpelRefToKtAnnotated.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ktSpelRefToJava/ktSpelRefToJava.test")
|
||||
public void testKtSpelRefToJava_KtSpelRefToJava() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/ktSpelRefToJava/ktSpelRefToJava.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ktSpelRefToJavaAnnotated/ktSpelRefToJavaAnnotated.test")
|
||||
public void testKtSpelRefToJavaAnnotated_KtSpelRefToJavaAnnotated() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/ktSpelRefToJavaAnnotated/ktSpelRefToJavaAnnotated.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ktSpelRefToKt/ktSpelRefToKt.test")
|
||||
public void testKtSpelRefToKt_KtSpelRefToKt() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/ktSpelRefToKt/ktSpelRefToKt.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ktSpelRefToKtAnnotated/ktSpelRefToKtAnnotated.test")
|
||||
public void testKtSpelRefToKtAnnotated_KtSpelRefToKtAnnotated() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/ktSpelRefToKtAnnotated/ktSpelRefToKtAnnotated.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithXmlRefsBySpelRef/parameterWithXmlRefBySpelRef.test")
|
||||
public void testParameterWithXmlRefsBySpelRef_ParameterWithXmlRefBySpelRef() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/parameterWithXmlRefsBySpelRef/parameterWithXmlRefBySpelRef.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("propertyWithXmlRefsBySpelRef/propertyWithXmlRefBySpelRef.test")
|
||||
public void testPropertyWithXmlRefsBySpelRef_PropertyWithXmlRefBySpelRef() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/rename/propertyWithXmlRefsBySpelRef/propertyWithXmlRefBySpelRef.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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user