Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4575

Renaming an unsaved file causes incorrect warning and destroys edits

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 12.0
    • 12.2
    • cnd - Editor
    • None
    • Windows 10

    Description

      Steps to reproduce:

      1. Create or open a file in a project
      2. Make some edits in the file
      3. Rename the file in the Projects window

      Result:

      2 warnings will appear. The first will say "This object cannot be renamed fromĀ  [name] to [new name]" . The second will open, obscuring the first, and will say "FileĀ [name] was changed to read-only! All changes will be discarded". The first warning turns out to be incorrect, as the file will be renamed as required, but any edits made will be lost. This also highlights a problem with the second warning - there is no option to tell the program to keep the edits or to cancel the rename.

      Issues

      1. This appears to be bugged behaviour, as 2 warnings should not appear at once, one above the other.
      2. This can destroy work done, as the renamed file will now only contain the content since last edited or created
      3. This is not how Netbeans behaved in previous versions. Previously renaming files worked perfectly regardless of whether any edits were made.

      Comments:

      The functionality of previous versions of Netbeans was very valuable and is highly desirable. Being able to rename a file without concern. If that cannot be re-instated, some way to keep the work done seems required.

      Attachments

        Activity

          People

            Unassigned Unassigned
            EpF Eoin Flood
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: