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.
I have a project with two source code directories: path/Src and path/Test. Both directory contain Java code with similar package stucture. The path/Src has application code and path/Test has the unit tests. Using the refactor menu, moving and renaming Java classes is fine the in path/Src directory. The problem is with the 2nd directory, path/Test. If I move or rename a class in path/Test, the file is moved to path/Src with the same directory and file name. For example: directory structure of path/Src path/Src/com/exmple/ExcitingLogic.java path/Src/com/exmple/code/LessExcitingLogic.java directory structure of path/Test: path/Test/com/example/ExcitingLogicTest.java path/Test/com/exmple/code/LessExcitingLogicTest.java If I move ExcitingLogicTest.java in the path/Test/com/example to the path/Test/com/exmple/code directory, the ExcitingLogicTest.java would really be moved to path/Src/com/exmple/code directory! Eeeek. The resulting file structure would be: directory structure of path/Src (note the LessExcitingLogicTest.java was incorrectly moved) path/Src/com/exmple/ExcitingLogic.java path/Src/com/exmple/code/LessExcitingLogic.java path/Src/com/exmple/code/LessExcitingLogicTest.java directory structure of path/Test (note the missing ExcitingLogicTest.java): path/Test/com/example/ExcitingLogicTest.java Product Version: NetBeans IDE 4.0 (Build200412081800) IDE Versioning: IDE/ spec=4.50.1 impl=20041208100 OS: Windows XP version 5.1 running on x86 Java 1.4.2_05 VML Java HotSpot client VM 1.4.2_05-b04
Reassigning for eval.
I saw it as well, but unfortunately only once. Do you have reproducible scenario? Can you describe it step by step? (I mean e.g. Select ExcitingLogic.java and drag it into "Test Sources | com.example" node) Thanks!
While I swear I had a problem from the right-click menu->refactor->rename, I can not reproduce it. The problem with right-click->refactor->move, the 'Move Class' refactor dialogue only has the Location for one of the source directories, Java, instead of both, Java _and_ Java-Test. I will attach a screen shot with the right-click->refactor->move. In the screen shot, I have two sources directories, Devel/Src/Java and Devel/Src/Java-Test (the Java-Test is expanded). I am trying to move the test class SRC/Java-Test/<package directory>/RefactorTest4, but am only given the option to move it to the SRC/Java/<package directory>/RefactorTest4 directory in the 'Move Class' dialogue.
Created attachment 21393 [details] screen shot snippet of incorrect 'Move Class' dialog
And if you want to create a new Java Class: right-click menu-> New -> Java Class - do you see both source directories in Location combo?
This one was probably fixed together with other issues regarding DnD. If you can still reproduce it in latest builds, please reopen this issue.
*** Issue 57968 has been marked as a duplicate of this issue. ***