fix: rename updates references across multi-module workspace (#15) #17
No reviewers
Labels
No labels
bug
build
enhancement
headless
P1-critical
P2-high
P3-medium
P4-low
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ai-tools/jdt-mcp-server!17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/15-rename-cross-module-references"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes #15 —
jdt_rename_elementnow correctly updates references across multi-module Maven workspaces.Root Cause
JDT's
RefactoringScopeFactoryusesIProject.getReferencingProjects()(Eclipse project references from.project) to determine the rename search scope — not the classpath entries. Without Eclipse project references, the rename processor only modified the declaration file, reportingSUCCESSwithchildCount: 0.Changes
JavaCore.newProjectEntry()— for classpath resolution (type lookup, compilation)IProjectDescription.setReferencedProjects()— for refactoring scope (rename, move)WARNINGstatus when rename produces no reference updates (childCount == 0) instead of misleadingSUCCESSperform()for accurate reportingTests
New
tests/multi-module-test.shwith 5 integration tests:All 14 tests pass (9 smoke + 5 multi-module).