Skip to main content

Symbol refactoring

The agent can rename symbols (classes, methods, fields, variables, and parameters) using the IDE's refactoring mechanism, the equivalent of Shift-F6.

Difference from search and replace

CLI agents use ordinary text search and replace (essentially sed), which inevitably breaks code and then spends tokens and time fixing it.

Explyt's refactoring tool correctly updates all declarations and usages of a symbol, including getters, setters, test classes, and imports, without breaking the code. Related symbols are renamed automatically as well. For example, when you rename a field, the agent updates the corresponding getters and setters.

When it's useful

  • You need to perform a large-scale refactoring that includes renaming entities in the project.
  • You need to standardize method or variable names and eliminate technical debt.