thoni56 / c-xrefactory

A refactoring tool for C/Yacc and Emacs. The first tool to cross Refactory Rubicon. Initial work, and released under GPL in 2009, by Marián Vittek.
https://thoni56.github.io/c-xrefactory/
GNU General Public License v2.0
23 stars 4 forks source link

Feature request: Extract / Inline variable refactorings #72

Closed shanemd closed 1 year ago

shanemd commented 1 year ago

If would be nice to support extracting and inlining variables.

References: https://www.refactoring.com/catalog/extractVariable.html https://www.refactoring.com/catalog/inlineVariable.html

thoni56 commented 1 year ago

I just added a crude "Extract variable" refactoring. Thanks for prompting me to actually try to enhance functionality, and it turned out that I have now enough knowledge to actually do that.

As there can never be an "Inline " (opposite of Extract) due to the way c-xrefactory does its magic, I'm closing this issue.