Open dubspeed opened 2 months ago
That sounds incredibly unsafe for something that has "safe" in its name :fearful:
Good point, allow me to highlight the "safety" aspect a bit better.
Imagine one wants to remove a function called add from FlxPoint in Flixel Library. The function might be called dozens of times, however, using a simple search in codebase for add gives hundreds of results, so no easy task.
So, using the "Safe Delete" would use the information gathered during compilation to only target all usages of add towards the FlxPoint, making the operation "safe" in the sense that the result will compile.
Deleting code in a larger codebase can be hard work when concepts (like add/remove, subscribe/unsubscribe) with namings that are typically used overlap in multiple instances. The tool would make the job much, much easier, and the user can be safe to be left with a compiling codebase.
Safe Delete
Description
I would like to suggest the addition of a "Safe Delete" feature to the VSHaxe. The feature is often found in IntelliJ based IDEs. Here is what it does:
Proposed Functionality
The "Safe Delete" feature should:
Examples
Example 1: Deleting a class
When attempting to delete a class, the feature should:
Example 2: Deleting a method
When deleting a method, the feature should:
Example 3: Deleting a field
When deleting a field, the feature should:
Benefits
Implementation Considerations
We believe this feature would improve the development experience in Haxe and VSCode, and we would love to see it - or parts of it - being implemented. Thank you for considering this request!