Author: adietish
Date: 2011-10-17 09:47:28 -0400 (Mon, 17 Oct 2011)
New Revision: 35718
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java
Log:
[JBIDE-9793] now correcting the web context root to "/" (was: project name)
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-17
13:45:31 UTC (rev 35717)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-17
13:47:28 UTC (rev 35718)
@@ -24,7 +24,8 @@
org.jboss.ide.eclipse.as.ui;bundle-version="[2.3.0,3.0.0)",
org.eclipse.wst.server.ui;bundle-version="[1.1.3,2.0.0)",
org.eclipse.ui.ide;bundle-version="3.7.0",
- org.eclipse.m2e.core.ui;bundle-version="1.0.0"
+ org.eclipse.m2e.core.ui;bundle-version="1.0.0",
+ org.eclipse.wst.common.modulecore;bundle-version="1.2.101"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.jboss.tools.common.databinding,
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java 2011-10-17
13:45:31 UTC (rev 35717)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java 2011-10-17
13:47:28 UTC (rev 35718)
@@ -35,6 +35,7 @@
import org.eclipse.jgit.transport.JschConfigSessionFactory;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServer;
@@ -230,17 +231,28 @@
Boolean b = (Boolean)getProperty(AdapterWizardPageModel.CREATE_SERVER);
if( b != null && b.booleanValue() ) {
try {
+ renameWebContextRoot(importedProjects);
IServer server = createServerAdapter();
addModules(getModules(importedProjects), server, monitor);
} catch(CoreException ce) {
OpenshiftUIActivator.getDefault().getLog().log(ce.getStatus());
- } catch( OpenshiftException ose) {
+ } catch(OpenshiftException ose) {
IStatus s = new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID, "Cannot
create openshift server adapter", ose);
OpenshiftUIActivator.getDefault().getLog().log(s);
}
}
}
+ private void renameWebContextRoot(List<IProject> importedProjects) {
+ for (IProject project : importedProjects) {
+ renameWebContextRoot(project);
+ }
+ }
+
+ private void renameWebContextRoot(IProject project) {
+ ComponentUtilities.setServerContextRoot(project, "/");
+ }
+
private IServer createServerAdapter() throws CoreException,
OpenshiftException {
IServerType type = (IServerType)getProperty(AdapterWizardPageModel.SERVER_TYPE);
@@ -250,7 +262,7 @@
IServer server = ExpressServerUtils.createServer(rt, type, "Openshift
Server1");
ExpressServerUtils.fillServerWithOpenshiftDetails(server,
getApplication().getApplicationUrl(),
getUser().getRhlogin(), getUser().getPassword(),
- getUser().getDomain().getRhcDomain(), getApplication().getName(), mode);
+ getUser().getDomain().getNamespace(), getApplication().getName(), mode);
return server;
}
Show replies by date