mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] KTIJ-34510 Fix file level highlighting check
(cherry picked from commit 90beb591188217cb36904e85dee95f19ebf27b5f) GitOrigin-RevId: 5b8e463a80fa7a84cd2f90aae01c3ddca6140449
This commit is contained in:
committed by
intellij-monorepo-bot
parent
777d5dd826
commit
de81d39bc1
+8
-2
@@ -112,8 +112,14 @@ fun createCodeMetaInfo(obj: Any, renderConfiguration: AbstractCodeMetaInfoRender
|
||||
}
|
||||
is HighlightInfo -> {
|
||||
val codeMetaInfo: CodeMetaInfo = when(renderConfiguration) {
|
||||
is HighlightingConfiguration -> HighlightingCodeMetaInfo(renderConfiguration, obj)
|
||||
is FileLevelHighlightingConfiguration -> FileLevelHighlightingCodeMetaInfo(renderConfiguration, obj)
|
||||
is HighlightingConfiguration -> {
|
||||
if (obj.isFileLevelAnnotation) return emptyList()
|
||||
HighlightingCodeMetaInfo(renderConfiguration, obj)
|
||||
}
|
||||
is FileLevelHighlightingConfiguration -> {
|
||||
if (!obj.isFileLevelAnnotation) return emptyList()
|
||||
FileLevelHighlightingCodeMetaInfo(renderConfiguration, obj)
|
||||
}
|
||||
else -> error(errorMessage())
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<!FILE_LEVEL_HIGHLIGHTING, HIGHLIGHTING("severity='WEAK WARNING'; descr='Package directive does not match the file location'")!><!HIGHLIGHTING("severity='ERROR'; descr='Expecting a top level declaration'")!>x<!>
|
||||
<!FILE_LEVEL_HIGHLIGHTING!><!HIGHLIGHTING("severity='ERROR'; descr='Expecting a top level declaration'")!>x<!>
|
||||
// TOOL: org.jetbrains.kotlin.idea.k2.codeinsight.inspections.PackageDirectoryMismatchInspection
|
||||
// IGNORE_K1
|
||||
// IMPLICIT_PACKAGE_PREFIX: "foo"
|
||||
|
||||
Reference in New Issue
Block a user