-
Notifications
You must be signed in to change notification settings - Fork 1
IntelliJ Rust Plugin
Sewen Thy edited this page Oct 2, 2022
·
2 revisions
Most general cases:
1. Initialize config = ConfigFrom(file, startSelected, endSelected)
2. Initialize extractedFunction = config.functionText()
3. config.currentFunction.addAfter("\n\n")
4. config.currentFunction.addAfter(extractedFunction)
5. Initialize functionCallStatement = ""
6. If config.hasReturnVariable() then
7. functionCallStatement.append("let " + config.returnVariable + " = ")
8. endIf
8. If config.hasQualifier() then
9. functionCallStatement.append(config.qualifier + ".")
10. endIf
11. functionCallStatement.append(config.extractedFunctionName + "(" + config.extractedFunctionParametersText + ")")
13. config.selectedElements = functionCallStatement
14. renameFunctionParameters(extractedFunction, config.parameters)