[jbosstools-commits] JBoss Tools SVN: r43121 - in branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core: util/internal and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Aug 21 05:30:33 EDT 2012


Author: rob.stryker at jboss.com
Date: 2012-08-21 05:30:33 -0400 (Tue, 21 Aug 2012)
New Revision: 43121

Modified:
   branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
   branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
Log:
JBIDE-12280 to 3.3.x

Modified: branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
===================================================================
--- branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java	2012-08-21 09:30:10 UTC (rev 43120)
+++ branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java	2012-08-21 09:30:33 UTC (rev 43121)
@@ -314,7 +314,7 @@
 			for( int j = 0; j < matchingFilesets.length; j++ ) {
 				IStatus[] errors2 = ModelTruezipBridge.deleteFiles(
 						matchingFilesets[j], matchingFilesets[j].getMatches(globalPath),
-						new NullProgressMonitor(), true);
+						new NullProgressMonitor(), false);
 				errors.addAll(Arrays.asList(errors2));
 				if( !seen.contains(matchingFilesets[j])) {
 					seen.add(matchingFilesets[j]);
@@ -343,7 +343,7 @@
 				}
 				IStatus[] errors2 = ModelTruezipBridge.copyFiles(matchingFilesets[j],
 						matchingFilesets[j].getMatches(globalPath),
-						new NullProgressMonitor(), true, true);
+						new NullProgressMonitor(), true, false);
 				errors.addAll(Arrays.asList(errors2));
 			}
 			EventManager.fileUpdated(path, matchingFilesets);
@@ -351,6 +351,7 @@
 		}
 
 
+		// NOW do the synch
 		TrueZipUtil.sync();
 		Comparator c = new Comparator() {
 			public int compare(Object o1, Object o2) {
@@ -363,7 +364,8 @@
 		while(i2.hasNext()) {
 			try {
 				IArchive changed = i2.next();
-				changedPaths.add(changed.getArchiveFilePath());
+				if( !addedChanged.contains(changed.getArchiveFilePath()))
+					changedPaths.add(changed.getArchiveFilePath());
 				EventManager.finishedBuildingArchive(changed);
 			} catch( ClassCastException cce ) {
 				cce.printStackTrace();  

Modified: branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
===================================================================
--- branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java	2012-08-21 09:30:10 UTC (rev 43120)
+++ branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java	2012-08-21 09:30:33 UTC (rev 43121)
@@ -141,9 +141,11 @@
 	public static boolean updateParentTimestamps(IPath path) {
 		return updateParentTimestamps(getFile(path));
 	}
+	
+	// Update only the PARENT timestamps. 
 	public static boolean updateParentTimestamps(de.schlichtherle.io.File file) {
 		long time = System.currentTimeMillis();
-		de.schlichtherle.io.File parent = file;
+		de.schlichtherle.io.File parent = (de.schlichtherle.io.File)file.getParentFile();
 		boolean b = true;
 		while( parent != null ) {
 			b &= parent.setLastModified(time);



More information about the jbosstools-commits mailing list