[jbosstools-commits] JBoss Tools SVN: r39283 - branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Mar 5 08:33:03 EST 2012


Author: adietish
Date: 2012-03-05 08:33:01 -0500 (Mon, 05 Mar 2012)
New Revision: 39283

Modified:
   branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java
Log:
[JBIDE-10511] removed check for existing server adapter (was: checking for existing server adapter, creating a new server adapter if none was found. Comparison is erroneous & blocks advanced use cases, have to always create new server adapter)

Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java	2012-03-05 13:15:08 UTC (rev 39282)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java	2012-03-05 13:33:01 UTC (rev 39283)
@@ -16,7 +16,6 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
 import org.eclipse.wst.server.core.IServerType;
 import org.eclipse.wst.server.core.ServerCore;
 import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
@@ -83,28 +82,9 @@
 						, getRemoteName()
 						, getRepositoryFile())
 						.execute(monitor);
-		String appName = getApplication().getName();
-		String host = getApplication().getApplicationUrl();
-		IServer found = findServer(appName, host);
-		if( found == null )
-			createServerAdapter(monitor, importedProjects);
-		else {
-			new ServerAdapterFactory().addModules(found, importedProjects, monitor);
-		}
+		createServerAdapter(monitor, importedProjects);
 	}
 	
-	private IServer findServer(String appName, String host) {
-		IServer[] all = ServerCore.getServers();
-		for( int i = 0; i < all.length; i++ ) {
-			String host1 = all[i].getHost();
-			String app1 = ExpressServerUtils.getExpressApplicationName(all[i]);
-			if( (host.endsWith("/" + host1 + "/") || (host.endsWith("/" + host1)))
-					&& appName.equals(app1))
-					return all[i];
-		}
-		return null;
-	}
-
 	/**
 	 * Enables the user chosen, unshared project to be used on the chosen
 	 * OpenShift application. Clones the application git repository, copies the



More information about the jbosstools-commits mailing list