mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 09:12:22 +07:00
QD-4986 Id of group is same as name but with "/" replaced by "_"
GitOrigin-RevId: 1263c2846bf1ee46dbcdb42db61c2ac74a1d01af
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b1b266d0de
commit
1edf614aff
@@ -16,7 +16,7 @@ class InspectionCategoryGroupProvider : InspectionGroupProvider {
|
||||
|
||||
override fun includesInspection(tool: InspectionToolWrapper<*, *>): Boolean {
|
||||
return try {
|
||||
tool.groupPath.escapeToolGroupPath().joinToString("/").startsWith(category)
|
||||
tool.groupPath.makeCategoryId().startsWith(category)
|
||||
}
|
||||
catch (e: AssertionError) {
|
||||
false
|
||||
@@ -26,12 +26,11 @@ class InspectionCategoryGroupProvider : InspectionGroupProvider {
|
||||
}
|
||||
}
|
||||
|
||||
fun Array<String>.escapeToolGroupPath(): List<String> {
|
||||
return map { escapeToolGroupPathElement(it) }
|
||||
fun Array<String>.makeCategoryId(): String {
|
||||
return map { escapeToolGroupPathElement(it) }.joinToString("/")
|
||||
}
|
||||
|
||||
private fun escapeToolGroupPathElement(path: String): String {
|
||||
fun escapeToolGroupPathElement(path: String): String {
|
||||
return path
|
||||
.replace("""\""", """\\""")
|
||||
.replace("""/""", """\/""")
|
||||
.replace("/", "_")
|
||||
}
|
||||
Reference in New Issue
Block a user