diff --git a/platform/inspect/src/com/intellij/codeInspection/inspectionProfile/InspectionCategoryGroupProvider.kt b/platform/inspect/src/com/intellij/codeInspection/inspectionProfile/InspectionCategoryGroupProvider.kt index d4d326044eed..98d23bd1c854 100644 --- a/platform/inspect/src/com/intellij/codeInspection/inspectionProfile/InspectionCategoryGroupProvider.kt +++ b/platform/inspect/src/com/intellij/codeInspection/inspectionProfile/InspectionCategoryGroupProvider.kt @@ -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.escapeToolGroupPath(): List { - return map { escapeToolGroupPathElement(it) } +fun Array.makeCategoryId(): String { + return map { escapeToolGroupPathElement(it) }.joinToString("/") } -private fun escapeToolGroupPathElement(path: String): String { +fun escapeToolGroupPathElement(path: String): String { return path - .replace("""\""", """\\""") - .replace("""/""", """\/""") + .replace("/", "_") } \ No newline at end of file