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.
1. Create a new project using New Project --> Standard --> Java Application 2. In Files Window rename src directory in newly created project 3. Cancel dialog "Refactor Code for Moved Class" 4. Build project Result: The build fails The problem is already solved for Web projects (issue #47179). Attached diff can be helpful. The inner class FileWatch can be used for Java projects after some modifications.
Created attachment 17963 [details] Related solution for Web projects
We have no particular plans to support changing the project source location from the GUI, at least not at the moment. If the user wants to do this, the user is advised to close the project, make the move on disk with another tool, and change project.properties manually.
> no particular plans to support changing the project source > location from the GUI As described in steps to reproduce, changing the source location from GUI is already supported; or appears to be supported, but does not work.
Even if we don't plan to support changing the project source location from GUI, the renaming source directory either should not cause exception or it should be disabled.
"changing the source location from GUI is already supported; or appears to be supported, but does not work." - it is not supported and will not be supported for 4.0. Certainly no plans to disable renaming of anything in the Files tab.
The problem is that if you do Rename on "src" folder the refactoring rename is called. This is probably a bug. Next problem is that the project.properties is not updated. We can fix it by listening on the "src" FileObject and updating the project.properties file. But this will need a listener on the FileSystem, ugly.
"The problem is that if you do Rename on "src" folder the refactoring rename is called. This is probably a bug." - that is definitely a bug in the refactoring module. I filed issue #49903. Re. listening on the src file object - I know, it is not easy. Inside ant/project there is a FileChangeSupport which makes this easier, but I do not want to expose this API as it belongs in the Filesystems API. See issue #33162.
Should possibly be made dupe of issue #48484.
It would be very helpful if the issue #33162 will be fixed, the code for listenning on subtrees is used also in ClassPath.
This issue is very marginal. User is nearly unable to do it. It can not be solved nicely in NB 4.0. Will be solved in promo E.
Resolving all issues with milestone "future" as LATER. If you feel strongly that it should be implemented please reopen and set the target milestone to "next".
NetBeans.org Migration: changing resolution from LATER to WONTFIX