4 ms·
I'm right there with you - prefer classic, deterministic tools wherever possible - but there's a limit. E.g. it's easy to rename a single getter from classic en
by rustyminnow 4mo ago
I'm right there with you - prefer classic, deterministic tools wherever possible - but there's a limit. E.g. it's easy to rename a single getter from classic enterprise java `Foo getFoo() {..}` to a modern style `Foo foo() {..}` ... but to rename dozens of getters/setters across hundreds of classes is still tedious.
Even harder would be to update your setters from `void setFoo(Foo f) { this.foo = f; }` to fluent-style `Parent foo(Foo f) { this.foo = f; return this; }` - I'd be surprised if there's an LSP action for that at all. (I'd love to be proven wrong though)
- teraflop 4mo agoNot sure about LSP, but IntelliJ has had a "structural search and replace" feature for many years, and it can easily handle changes like the one in your second paragraph. It's conceptually like a regex search, but it matches language-specific AST subtrees instead of character sequences.
- yonaguska 4mo agoI've found that for super large but simple refactors, codex and Claude struggle and will just quietly stop doing what you asked it if it's a long running task. I actually had better luck asking codex to write temporary sed scripts based on the requirements then apply them.