woproject/projects/wolips/plugins/org.objectstyle.wolips.projectbuild/java/org/objectstyle/wolips/projectbuild/util ResourceUtilities.java,1.3,1.4
[email protected] Wed, 5 Apr 2006 07:22:09 -0700 (PDT)
| Newsgroups | gmane.comp.web.webobjects.woproject.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.projectbuild/java/org/objectstyle/wolips/projectbuild/util
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28576/org.objectstyle.wolips.projectbuild/java/org/objectstyle/wolips/projectbuild/util
Modified Files:
ResourceUtilities.java
Log Message:
moves non-deletable folder to build/.trash, fixes .svn copies in build products, no longer copies *.eomodel~ artifacts
Index: ResourceUtilities.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.projectbuild/java/org/objectstyle/wolips/projectbuild/util/ResourceUtilities.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ResourceUtilities.java 11 Dec 2004 10:26:44 -0000 1.3
+++ ResourceUtilities.java 5 Apr 2006 14:21:11 -0000 1.4
@@ -56,7 +56,6 @@
package org.objectstyle.wolips.projectbuild.util;
-import java.io.File;
import java.util.HashMap;
import java.util.Map;
@@ -173,20 +172,20 @@
res.delete(true, m);
// } catch (org.eclipse.core.internal.resources.ResourceException e) {
} catch (CoreException ce) {
- ce.printStackTrace();
-
-// IPath trashFolder = res.getProject().getFullPath().append("build/.trash");
-// IPath trashPath = trashFolder.append(res.getName()+(_uniqifier++));
-// checkDir (trashFolder, m);
-// res.move(trashPath, true, null);
-
- IPath newName = res.getLocation().removeLastSegments(1);
- newName = newName.append(res.getName()+_getUniqifier());
- File resFile = res.getLocation().toFile();
- if (!resFile.renameTo(newName.toFile())) {
- throw ce;
- }
- }
+ ce.printStackTrace();
+ // NOTE AK: this code was commented out, I re-instated it as I think it's
+ // better to have the non-deletable files in one place, instead of messing the build directory
+ IPath trashFolder = res.getProject().getFullPath().append("build/.trash");
+ IPath trashPath = trashFolder.append(res.getName()+(_getUniqifier()));
+ checkDir (trashFolder, m);
+ res.move(trashPath, true, null);
+/* IPath newName = res.getLocation().removeLastSegments(1);
+ newName = newName.append(res.getName()+_getUniqifier());
+ File resFile = res.getLocation().toFile();
+ if (!resFile.renameTo(newName.toFile())) {
+ throw ce;
+ }
+*/ }
//res.refreshLocal(IResource.DEPTH_ONE, m);
}
return res;
@@ -207,7 +206,7 @@
public static void copyDerivedOld(IResource res, IPath dest, IProgressMonitor m)
throws CoreException
{
- if (res.isTeamPrivateMember ())
+ if (res.isTeamPrivateMember() || res.getName().equals(".svn"))
return;
IResource rdest = checkDestination (dest, m);
@@ -227,7 +226,7 @@
public static void copyDerived(IResource res, IPath dest, IProgressMonitor m)
throws CoreException
{
- if (res.isTeamPrivateMember ())
+ if (res.isTeamPrivateMember () || res.getName().equals(".svn"))
return;
if (res instanceof IFolder) {
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642