Project: JDT
Bug 140901 Deletion of source-controlled file now considered a refactor, causing interactive checkout prompts
Reported: 2006-05-09 15:21:47 | Status: verified fixed

Using Eclipse 3.2 RC3, the act of deleting a source controlled file using our source control plugin now causes a validateEdit event to be fired as if the deletion it is necessary to check out the file in our "pessimistic filesystem" team plugin. Our source control provider does not need (indeed does not WANT) to have the file readable, as it only needs to check out the containing folder. This is counter to prior behavior. The behavior for Eclipse up to and including 3.2M5a has been to go straight to MoveDeleteHook's deleteFile method. You now get there only after having to go thru validateEdit... this alas, isn't an edit, strictly speaking. This behavior seems to have come with the release 3.2M6. In Eclipse 3.1, the SCM Adapter would not prompt to checkout on a deletion since since the delete process never called into validateEdit in said version. If I choose to not checkout... I get an prompt that says "The Refactor failed..." Evidently deletion is an interactive refactoring as opposed to a non-interactive process... In any event, this will cause a significant usability problem for team plugins that work with a pessimistic file system and implement validateEdit, (or so it would seem) when "deleting" multiple file resources.

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/JavaRenameProcessor.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameModifications.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/MoveModifications.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/RefactoringModifications.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/participants/ResourceChangeChecker.java