organize_imports
Organize Java file imports by removing unused statements and sorting remaining ones alphabetically to maintain clean, readable code structure.
Instructions
Organize imports in a Java file.
Removes unused imports and sorts remaining imports alphabetically. Returns the organized import block that should replace the existing imports.
USAGE: organize_imports(filePath="path/to/File.java") OUTPUT: Organized import statements and list of changes
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to source file |