Project: JDT
Bug 239347 Drag and drop any none java file doesn't refactor
Reported: 2008-07-02 16:21:22 | Status: verified fixed

Build ID: I20080516-1333 Steps To Reproduce: 1-Create general project, file file.a , and folder X on the project 2-Select file.a drag and drop into folder X. in the code, you'll find that this is handled by JavaDropAdaptorAssistant (I thought this only should do java files, and any other will be done by the resource adaptor). And in ReorgPolicyFactory.getModifications, update reference will be set to false. means refactoring file.a will not happen. More information: JavaDropAdaptorAssistant is intercepting all the Drag and Drop for any resource. the move is done properly, in ReorgPolicyFactory.getModifications, it checks if canUodateReferences and if the file is not a java, updateReferences will not be enabled. So refactorying any file type rather than Java is broken. Icluding our part. Was expecting, either Java handle all resource move but leave the update reference enabled. or just not provide the none-java resources. so other providers will handle it and propably will set the updateReferences normally.

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ccp/MoveTest.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/JDTRefactoringDescriptorComment.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringCoreMessages.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameCompilationUnitProcessor.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameFieldProcessor.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameJavaProjectProcessor.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameLocalVariableProcessor.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameMethodProcessor.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamePackageProcessor.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeParameterProcessor.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeProcessor.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/IReorgPolicy.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/JavaMoveProcessor.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/tagging/IReferenceUpdating.java org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameInputWizardPage.java org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMoveWizard.java