mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[devkit] Introduce method
GitOrigin-RevId: 41cbe7fd2a449d58e459e713c1322d461a9a23d6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1a5d419d00
commit
266ff1b037
+1
-1
@@ -79,7 +79,7 @@ internal class MismatchedLightServiceLevelAndCtorInspection : DevKitJvmInspectio
|
||||
private fun registerProblemProjectLevelRequired(annotation: JvmAnnotation,
|
||||
elementToReport: PsiJavaCodeReferenceElement,
|
||||
file: PsiFile) {
|
||||
val projectLevelFqn = "${Service.Level::class.java.canonicalName}.${Service.Level.PROJECT}"
|
||||
val projectLevelFqn = getProjectLevelFQN()
|
||||
val request = constantAttribute(DEFAULT_REFERENCED_METHOD_NAME, projectLevelFqn)
|
||||
val text = DevKitBundle.message("inspection.mismatched.light.service.level.and.ctor.specify.project.level.fix")
|
||||
val actions = createChangeAnnotationAttributeActions(annotation, 0, request, text, text)
|
||||
|
||||
@@ -137,4 +137,6 @@ fun toLevel(name: String): Service.Level? {
|
||||
|
||||
internal fun isLightService(uClass: UClass): Boolean {
|
||||
return uClass.findAnnotation(Service::class.java.canonicalName) != null
|
||||
}
|
||||
}
|
||||
|
||||
fun getProjectLevelFQN(): String = "${Service.Level::class.java.canonicalName}.${Service.Level.PROJECT}"
|
||||
Reference in New Issue
Block a user