mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
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:
@@ -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, "")}\``;
|
||||
|
||||
Reference in New Issue
Block a user