Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-team-dev] Refresh project.


If refactoring is leaving resources out of sync, then it is a bug in the refactoring (or underlying core methods called by refactoring). You should not be compensating for out of sync files by doing a "free" refreshLocal from within the move/delete hook. If files are out of sync, and force==false, then the spec says move and delete should fail. You have to carefully obey the spec if you are reimplementing core methods.  Here is the relevant passage from IResource.move javadoc:

         * The <code>FORCE</code> update flag controls how this method deals with cases
         * where the workspace is not completely in sync with the local file system. If
         * <code>FORCE</code> is not specified, the method will only attempt to move
         * resources that are in sync with the corresponding files and directories in
         * the local file system; it will fail if it encounters a resource that is out
         * of sync with the file system. However, if <code>FORCE</code> is specified,
         * the method moves all corresponding files and directories from the local file
         * system, including ones that have been recently updated or created. Note that
         * in both settings of the <code>FORCE</code> flag, the operation fails if the
         * newly created resources in the workspace would be out of sync with the local
         * file system; this ensures files in the file system cannot be accidentally
         * overwritten.


platform-team-dev-admin@xxxxxxxxxxx wrote on 05/07/2004 09:25:54 AM:

> Michael,

> In WSAD 5.1.1 , I am getting out of sync errors if i try to perform
> refactoring on a file after refactoring has failed the first time.
> Refreshing the project seems to correct this problem.

>  
> Thanks for your response.

Back to the top