| 1131 | } |
| 1132 | |
| 1133 | function isModuleOf(pomContent: string, modulePath: string): boolean { |
| 1134 | const normalized = modulePath.replace(/\\/g, "/").replace(/\/$/, "") |
| 1135 | if (!normalized) return false |
| 1136 | const modulesBlocks = pomContent.match(/<modules>([\s\S]*?)<\/modules>/g) ?? [] |
| 1137 | for (const block of modulesBlocks) { |
| 1138 | const stripped = block.replace(/<!--[\s\S]*?-->/g, "") |
| 1139 | for (const m of stripped.matchAll(/<module>\s*([^<]+?)\s*<\/module>/g)) { |
| 1140 | const decl = m[1].replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/$/, "") |
| 1141 | if (decl === normalized) return true |
| 1142 | } |
| 1143 | } |
| 1144 | return false |
| 1145 | } |
| 1146 | |
| 1147 | export const JDTLS: Info = { |
| 1148 | id: "jdtls", |