Author: xcoulon
Date: 2012-04-23 17:16:46 -0400 (Mon, 23 Apr 2012)
New Revision: 40425
Modified:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/internal/launcher/WSTesterClientDelegate.java
Log:
Fixed - JBIDE-11337 -
https://issues.jboss.org/browse/JBIDE-11337
Web Service Tester: wrong URL initialization after selecting "Run on Server"
(and make it work on Windows, too)
Modified:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/internal/launcher/WSTesterClientDelegate.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/internal/launcher/WSTesterClientDelegate.java 2012-04-23
20:28:54 UTC (rev 40424)
+++
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/internal/launcher/WSTesterClientDelegate.java 2012-04-23
21:16:46 UTC (rev 40425)
@@ -10,9 +10,7 @@
import java.lang.reflect.Method;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.ui.IViewPart;
@@ -93,17 +91,16 @@
* @return
*/
private String computeEndpointURI(final IModule module, final IJaxrsEndpoint endpoint)
{
- String uriPathTemplate = endpoint.getUriPathTemplate();
- IPath path = new Path(module.getName()).append(uriPathTemplate);
+ String uriPathTemplate = module.getName() + "/" +
endpoint.getUriPathTemplate();
// check to see if this project has been deployed...
IServer[] servers = ServerUtil.getServersByModule(module, null);
if (servers == null || servers.length == 0) {
- return "http://[domain]:[port]/" + path.toPortableString(); //$NON-NLS-1$
+ return "http://[domain]:[port]/" + uriPathTemplate; //$NON-NLS-1$
}
// if it's been deployed, we can grab the domain and web port
String domain = servers[0].getHost();
String webport =
servers[0].getAttribute("org.jboss.ide.eclipse.as.core.server.webPort",
"8080");//$NON-NLS-1$ //$NON-NLS-2$
- return "http://" + domain + ':' + webport + "/" +
path.toString(); //$NON-NLS-1$
+ return "http://" + domain + ':' + webport + "/" +
uriPathTemplate; //$NON-NLS-1$
}
}