RubyMine 2024.1 Help

Safe delete

RubyMine lets you use the Safe Delete refactoring to remove files and symbols from the source code safely. Before RubyMine deletes a file or a symbol, it searches for usages and if they are found, RubyMine lets you check them to make necessary adjustments.

Safe delete

  1. Select an item you want to delete.

  2. Select Refactor | Safe Delete from the main or context menu or press Alt+Delete.

  3. In the dialog that opens, select necessary options and click OK.

    The available options are:

    • Search in comments and strings :If this checkbox is selected, RubyMine will look for occurrences within comments and string literals in your source code files.

    • Search for text occurrences :If this checkbox is selected, RubyMine will look for occurrences in files that don't contain source code. These may be the text files, properties files, HTML files, documentation files, and so on.

  4. If RubyMine encountered potential problems, it displays the Usages Detected dialog. Proceed with the appropriate action.

Last modified: 25 March 2024