[jbosstools-commits] JBoss Tools SVN: r41699 - 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
Mon Jun 4 17:54:49 EDT 2012


Author: max.andersen at jboss.com
Date: 2012-06-04 17:54:47 -0400 (Mon, 04 Jun 2012)
New Revision: 41699

Modified:
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-12079 only report error if folder is not found and you need to deploy something

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-06-04 20:40:11 UTC (rev 41698)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java	2012-06-04 21:54:47 UTC (rev 41699)
@@ -62,22 +62,6 @@
 				OpenShiftUIActivator.PLUGIN_ID, 
 				NLS.bind(ExpressMessages.publishFailMissingProject, behaviour.getServer().getName(), destProjName)));
 		}
-		
-		String destinationFolder = ExpressServerUtils.getExpressDeployFolder(behaviour.getServer());
-		IContainer destFolder = "".equals(destinationFolder) ? magicProject : (IContainer)magicProject.findMember(new Path(destinationFolder));
-		if( destFolder == null || !destFolder.isAccessible()) {
-			StringBuffer missingPath = new StringBuffer("");
-			if(destFolder==null) {
-				missingPath.append(magicProject.getName());
-				missingPath.append("/");
-				missingPath.append(destinationFolder);
-			} else {
-				missingPath.append(destFolder.getName());
-			}
-			throw new CoreException(new Status(IStatus.ERROR, 
-					OpenShiftUIActivator.PLUGIN_ID, 
-					NLS.bind(ExpressMessages.publishFailMissingFolder, behaviour.getServer().getName(), missingPath)));
-		}
 	}
 
 	@Override
@@ -135,6 +119,21 @@
 		String destinationFolder = ExpressServerUtils.getExpressDeployFolder(behaviour.getServer());
 		
 		IContainer destFolder = "".equals(destinationFolder) ? destProj : (IContainer)destProj.findMember(new Path(destinationFolder));
+		
+		if( destFolder == null || !destFolder.isAccessible()) {
+			StringBuffer missingPath = new StringBuffer("");
+			if(destFolder==null) {
+				missingPath.append(destProj.getName());
+				missingPath.append("/");
+				missingPath.append(destinationFolder);
+			} else {
+				missingPath.append(destFolder.getName());
+			}
+			throw new CoreException(new Status(IStatus.ERROR, 
+					OpenShiftUIActivator.PLUGIN_ID, 
+					NLS.bind(ExpressMessages.publishFailMissingFolder, behaviour.getServer().getName(), missingPath)));
+		}
+		
 		IPath dest = destFolder.getLocation();
 		
 		if( module.length == 0 ) return IServer.PUBLISH_STATE_NONE;



More information about the jbosstools-commits mailing list