[jboss-cvs] jbosside/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers ...
Marshall Culpepper
mculpepper at jboss.com
Thu Mar 8 17:31:51 EST 2007
User: mculpepper
Date: 07/03/08 17:31:51
Modified: as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers
PackagesPublisher.java
Log:
if publish is not incremental, we now do a full copy
Revision Changes Path
1.12 +21 -28 jbosside/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PackagesPublisher.java
===================================================================
RCS file: /cvsroot/jboss/jbosside/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- PackagesPublisher.java 7 Mar 2007 22:29:59 -0000 1.11
+++ PackagesPublisher.java 8 Mar 2007 22:31:51 -0000 1.12
@@ -124,10 +124,12 @@
PackagedModuleDelegate delegate = (PackagedModuleDelegate)module[i].loadAdapter(PackagedModuleDelegate.class, new NullProgressMonitor());
IPackage pack = delegate.getPackage();
IPath sourcePath = ResourceUtil.makeAbsolute(pack.getPackageFilePath(), pack.isDestinationInWorkspace());
+ IPath destPathRoot = new Path(server.getDeployDirectory()).append(sourcePath.lastSegment());
+
+ if( incremental ) {
IPath[] removed = PackagesListener.getInstance().getRemovedFiles(pack);
IPath[] updated = PackagesListener.getInstance().getUpdatedFiles(pack);
- IPath destPathRoot = new Path(server.getDeployDirectory()).append(sourcePath.lastSegment());
IPath suffix, destPath;
for( int j = 0; j < removed.length; j++ ) {
@@ -145,19 +147,10 @@
FileUtil.fileSafeCopy(updated[j].toFile(), destPath.toFile());
}
}
-
-// if( pack.isDestinationInWorkspace()) {
-// // destination is workspace. Move it.
-// IFile file = pack.getPackageFile();
-// IPath sourcePath = file.getLocation();
-// IPath destPath = new Path(server.getDeployDirectory()).append(sourcePath.lastSegment());
-// IStatus status = FileUtil.copyFile(sourcePath.toFile(), destPath.toFile());
-// addMoveEvent(event, pack, pack.isDestinationInWorkspace(), sourcePath, destPath, status.isOK() ? SUCCESS : FAILURE, status.getException());
-// } else {
-//
-// IPath sourcePath = pack.getPackageFilePath();
-// addMoveEvent(event, pack, pack.isDestinationInWorkspace(), sourcePath, sourcePath, SUCCESS, null);
-// }
+ } else {
+ // full publish
+ FileUtil.fileSafeCopy(sourcePath.toFile(), destPathRoot.toFile());
+ }
}
}
protected void addMoveEvent(PublishEvent parent, IPackage pack, boolean inWorkspace,
More information about the jboss-cvs-commits
mailing list