[jbosstools-commits] JBoss Tools SVN: r41043 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed May 16 04:49:20 EDT 2012


Author: rob.stryker at jboss.com
Date: 2012-05-16 04:49:19 -0400 (Wed, 16 May 2012)
New Revision: 41043

Modified:
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-11254 

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java	2012-05-16 08:43:04 UTC (rev 41042)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java	2012-05-16 08:49:19 UTC (rev 41043)
@@ -136,18 +136,22 @@
 			IResource[] resource = new IResource[]{changedResource};
 			
 			if( deltaKind == ServerBehaviourDelegate.REMOVED) {
-				changedResource.delete(false, monitor);
+				changedResource.delete(false, monitor); // uses resource api
 			} else {
-				IStatus status = util.publishModule(behaviour.getServer(), dest.toString(), module, publishType, delta, monitor);
+				monitor.beginTask("Moving module to " + destFolder.getName(), 100);
+				IStatus status = util.publishModule(behaviour.getServer(), dest.toString(), module, publishType, delta, 
+						new SubProgressMonitor(monitor,20));
+				// util used file api, so a folder refresh is required
+				destFolder.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor,20));
 				final AddToIndexOperation operation = new AddToIndexOperation(resource);
 				try {
-					operation.execute(monitor);
+					operation.execute(new SubProgressMonitor(monitor,60));
 				} catch (CoreException e) {
 					OpenShiftUIActivator.log(e.getStatus());
 				}
 			}
 		} catch( Exception e ) {
-			e.printStackTrace();
+			OpenShiftUIActivator.log(new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,e.getMessage(), e));
 		}
 		return IServer.PUBLISH_STATE_NONE;
 	}



More information about the jbosstools-commits mailing list