feat(maven): add POM artifact and managed-version navigation (#4699)

Go to Declaration on a dependency, plugin or <parent> in a POM opens the artifact's own POM (a workspace module with matching coordinates first, then the local repository), and unversioned dependencies and plugins get a gutter icon that opens the management entry supplying their version, through active profiles (including JDK-activated ones), parent POMs, imported BOMs and plugin management. Maven element values are underlined whole, and contributed definition/hover providers that decline a position let the next one answer. Review fix: a BOM import without a version no longer ends the management search.

Co-authored-by: kradme <17811095+kradme@users.noreply.github.com>
This commit is contained in:
langxp
2026-11-20 13:45:47 +08:00
committed by GitHub
co-authored by kradme
parent 96f3818bf2
commit c0b243f020
18 changed files with 1536 additions and 141 deletions
+4 -1
View File
@@ -108,7 +108,7 @@ function inspections(path: string, sql: SqlText): Extension {
}
function definition(path: string, sql: SqlText): ContributedDefinition {
return (view, pos) => {
const handle: ContributedDefinition = (view, pos) => {
if (sql.at && !sql.at(view.state, pos)) return false;
const r = resolver(path, view.state, sql).resolveAt(pos);
const sym = r?.symbol;
@@ -143,6 +143,9 @@ function definition(path: string, sql: SqlText): ContributedDefinition {
return true;
}
};
const at = sql.at;
if (at) handle.canHandle = (state, pos) => at(state, pos);
return handle;
}
const code = (s: string) => `\`${s.replace(/`/g, "")}\``;