Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 27184

Summary: [resources] IResource.copy(FORCE_OVERWRITE) required
Product: [Eclipse Project] Platform Reporter: Kevin McGuire <Kevin_McGuire>
Component: ResourcesAssignee: DJ Houghton <dj.houghton>
Status: RESOLVED WONTFIX QA Contact:
Severity: major    
Priority: P2 CC: jeem, n.a.edgar
Version: 2.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Bug Depends on:    
Bug Blocks: 21666    

Description Kevin McGuire CLA 2002-11-26 15:51:05 EST
We require a IResource.copy(FORCE_OVERWRITE) method so that UI can validateEdit 
properly (instead of deleting conflicts first then copying).
Comment 1 Nick Edgar CLA 2002-11-26 16:02:01 EST
Also need FORCE_OVERWRITE for IResource.move.

May want to rename the flag to just OVERWRITE, so as not to be confused with 
FORCE, which has to do with out-of-sync source files, not destination files.
Comment 2 Jim des Rivieres CLA 2002-11-26 17:46:18 EST
After further discussion with Kevin and DJ, the proposed solution is quite
different:
(a) have Eclipse UI use IFile.setContents() in the file overwrite cases,
instead of delete();copy()
(b) add a core mechanism so that a client that sets a persistent resource 
property can mark the property "DO NOT COPY/MOVE", and change IResource.copy() 
and move() to honor this request. The advantage of doing this on a individual 
property instance basis is that the info is kept with the workspace, and can 
be honored even when the owning plug-in is not installed.
Comment 3 Nick Edgar CLA 2002-11-27 09:30:22 EST
If we're using setContents, then properties will never get copied for conflict 
cases, which differs from the non-conflict cases.  In my mind, the conflict 
cases should work the same as delete/copy, but without the delete.
Comment 4 DJ Houghton CLA 2003-01-24 16:39:51 EST
#setContents should be used and it is ok that the properties are not moved.

Recommend against including a new flag for copy and move as that would require
team providers to also implement this behaviour in their move/delete hooks.
Comment 5 Tod Creasey CLA 2003-01-27 07:52:58 EST
Are we saying then that we are not going to be supporting the moving of 
properties? If so then this affects Bug 26100.