extract_superclass
Extract a new superclass by moving a selected member to a parent class, updating the source class to extend it.
Instructions
Extract a new superclass from a class: the member at the position moves up into a newly created superclass, and the class extends it.
USAGE: Position on the member to extract; provide the new superclass name. OUTPUT: createdFiles carries the new superclass file content; editsByFile carries the source class's edits. Nothing is written - create the file and apply the edits yourself.
IMPORTANT: Uses ZERO-BASED coordinates.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to source file containing the member | |
| line | Yes | Zero-based line number of the member declaration | |
| column | Yes | Zero-based column number (on the member name) | |
| superclassName | Yes | Name for the new superclass |