This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When following the instructions to "Inspect and Transform" --> "Organize Imports" found at https://netbeans.org/kb/docs/java/editor-inspect-transform.html#organize , several such errors may populate in the results: [Error: this occurrence is in a read-only file and cannot be refactored.]Organize imports This occurs because Microsoft Team Foundation Server version-control sets all files as read-only unless checked out. However when selecting *only* the checked-out files (non-read-only), the above error happens again on a file that is not selected -- this error prevents any changes from being made. Netbeans seems to be including all files in the results, whether selected or not. Selecting *none* of the checkboxes produces the same error. Possible workarounds are to: - "Organize Imports" for each checked-out file individually - check out all files in TFS for the scope of this "Inspect and Transform" - in Windows Explorer, select all files in the package(s) for the scop of this refactoring, right-click, select "Properties" then deselect "Read-only" ...but these options are not so user-friendly.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss