Project: JDT
Bug 37954 Copying source folders deletes target folders [reorg] [ccp]
Reported: 2003-05-22 02:28:17 | Status: resolved fixed

I have to Java projects, which I wanted to merge into one Java project. Both have the same source folder for Java source (project/src). - Right click on the Java source folder of the source project and select copy. - Right click on the target project and select paste The is a warning displayed "Target already has a folder 'src'. Overwrite?" and the option Yes/No/Cancel. When clicking Yes, a progress monitor is displayed that shows "deleting 'src'" The displayed warning doesn't they anything about that a target folder will be cleared before copying the new folder. This is NOT EXPECTED and WRONG BEHAVIOR. When copying a folder in the Windows Explorer and the target folder already exists, than Windows Explorer doesn't delete the target before copying. It simply adds the new files to the target folder. This is default behavior on every OS and on every File Manager. I expect Eclipse to behave the same way and not to delete the target folder before copying!!!

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/reorg/MockReorgQueries.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/IReorgQueries.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/OverwriteHelper.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgQueries.java