fix: workspace discovers projects in subdirectories (#9) #10
No reviewers
Labels
No labels
bug
build
enhancement
headless
P1-critical
P2-high
P3-medium
P4-low
refactoring
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ai-tools/jdt-mcp-server!10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/9-workspace-project-discovery"
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 #9 —
jdt_list_projectsreturns 0 projects when the working directory is a workspace containing multiple projects as subdirectories.Root Causes
ProjectImporteronly checked the root directory for.project/pom.xml— workspace directories with subprojects were not scannedjdt_refresh_project(workspace-wide) only didrefreshLocal()but never discovered new projectsChanges
ProjectImporter.java— NewscanSubdirectories()method: when root has neither.projectnorpom.xml, scans immediate subdirectories for projects. New publicimportFromPath()for external callers.ProjectInfoTools.java— Workspace-level refresh now also runsProjectImporter.importFromPath(). New tools:jdt_import_project(import from any path) andjdt_remove_project(remove from workspace).McpServerManager.java— Registers both new tools (44 → 46 tools).Workflow After Fix
jdt_refresh_project(no params) additionally discovers new projectsjdt_import_projectallows targeted import of any directoryjdt_remove_projectallows cleanup of unwanted projects