Suggested enhancements for LibreOffice Basic IDE for macro editing is "Re-factoring facilities" (Renaming affects dependencies/Extract Method/Extract interface etc.). Thank you
Thanks Óvári - I set this as enhancement
Hi Óvári, hmm, could you give some more explanation - I seem to miss the clue now ;)
Hi Cor, 1. Thank you for your kind request. Perhaps my understanding of the definition of refactoring is incorrect. Hopefully the explicit examples below will help in what I was trying to suggest. 2. Refactoring is "the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure," according to Martin Fowler, the "father" of refactoring. cf. http://refactoring.com/. 3. [https://help.libreoffice.org/Basic/Using_Variables#Naming_Conventions_for_Variable_Identifiers Naming Conventions for Variable Identifiers] states that “In LibreOffice Basic variable identifiers are not case-sensitive”. a) Once a variable is defined (eg with Dim statement), typing the variable later in the code will refactor (automatically change) to the variable case in the Dim statement. Having the statement: Dim myIntegerVariable As Integer And typing the following line myintegervariable = myintegervariable + 5 Would change to myIntegerVariable = myIntegerVariable + 5 b) If the variable case is changed in the Dim statement, all references to the variable in the code will automatically refactor (update). In example shown in 3a, if the Dim statement is changed to: Dim MYiNTEGERvARIABLE As Integer the statements with that variable will automatically refactor: MYiNTEGERvARIABLE = MYiNTEGERvARIABLE + 5 4. Refactoring should also apply to constant names (eg Const statement). 5. Reserved words should also automatically refactor so writing the line: dim i as integer should automatically refactored to: Dim i As Integer 6. Refactoring should also apply to functions/methods/procedures. 7. Refactoring could also apply to code layout a) code indenting b) removable of multiple consecutive whitespaces 8. Please note that this is not an extensive explanation of refactoring, just some more explanation that you asked for. Should you require any additional information, please advise. Thank you
Thanks Óvári for the extended explanation. I must have been smoking strong stuff when setting this to new So problem one is that (reserved) names does not respect and enforce cases. This looks as a enhancement request. Wrt indents, I tend to think that it's more up to the habits of the scripter? Removing tailing spaces/tabs could be a nice tool, indeed. .. Since we appreciate one issue for each problem, request/if you feel clear on the other two, it would be my request to create them into separate issues and then limit this issue (including the description/summary) to the handling of case in names? Cheers - Cor
Thank you Cor for your comment. As you requested, separate issues have been created. You have been attached to the CC list. I have updated the status on this bug to resolved invalid. If this is incorrect, feel free to change it to the appropriate status. Please advise if there is anything else that you require. Thank you