Community
Participate
Working Groups
Assume I have one output folder and two source folders like this: modules/foo/classes modules/foo/src/java modules/foo/src/unittest If I rename the module foo to bar then the changes should automatically be reflected in the Java build path. Current behavior is that the build path still points to the old folders and the output folder is recreated.
Time permitted for 3.0.
*** Bug 131494 has been marked as a duplicate of this bug. ***
*** Bug 85799 has been marked as a duplicate of this bug. ***
*** Bug 158932 has been marked as a duplicate of this bug. ***
*** Bug 196743 has been marked as a duplicate of this bug. ***
From bug 131494: There's no java model representation for the IFolder to be renamed, so we just rename the resource. To update the build path, jdt.core would have to listen to IFolder renames and then update the classpath "behind the scenes". Since we don't have that style of automatic updates anywhere else, I guess UI has to do it. However, this is not trivial, since we would have to - check for all folder moves/renames whether there's a nested source folder - see how we can use IPackageFragmentRoot#move(..) to move the source folders (this updates references in classpaths of referring projects). The problem here is that the source folder is a child of the renamed folder, and thus we would have to do some manual dance to make sure that source and target are both available for the move. This can become arbitrarily complex in the general case, so I guess it would be easier to just update the classpath manually in this case (if we want to support it at all).