Summary: | IPackageFragmentRoot:move ignores FORCE flag | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Adam Kiezun <akiezun> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P3 | ||
Version: | 2.1 | ||
Target Milestone: | 2.1 M5 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Adam Kiezun
2003-01-29 10:35:58 EST
(same problem with copy) in IResource, FORCE means that things out of synch will be copied too so it does not mean, i think, that things will be ovewritten. which, in turn, means, that NAME_COLLISION has little to do with the FORCE flag. ISourceManipulation.copy/move had something like 'replace' - and there the NAME_COLLISION made sense. major - makes clients have to delete the conflicting resource themselves Right, I'm going to add a REPLACE flag. Otherwise for the message, are you using getMessage() or getString(). The later is deprecated. REPLACE flag added. Also improved message of JavaModelException. Added regression tests on RootModificationTests: testCopySourceFolder5() testFailCopySourceFolder1() testFailCopySourceFolder2() was this in the code you sent to us last night? (i still get the exception) although i pass REPLACE this line in CopyPackageFragmentRootOperation::verify() looks incorrect: it ignore the REPLACE flag if (foundExistingEntry && (this.updateResourceFlags & IResource.FORCE) == 0) { return new JavaModelStatus (IJavaModelStatusConstants.NAME_COLLISION, this.destination.toString()); } Sorry about that. This is fixed in HEAD. tests are on RootManipulationsTests. Verified. |