|
Lines 15-35
Link Here
|
| 15 |
* 20060529 141422 kathy@ca.ibm.com - Kathy Chan |
15 |
* 20060529 141422 kathy@ca.ibm.com - Kathy Chan |
| 16 |
* 20070123 167487 makandre@ca.ibm.com - Andrew Mak |
16 |
* 20070123 167487 makandre@ca.ibm.com - Andrew Mak |
| 17 |
* 20070403 173654 kathy@ca.ibm.com - Kathy Chan |
17 |
* 20070403 173654 kathy@ca.ibm.com - Kathy Chan |
|
|
18 |
* 20071212 200193 gilberta@ca.ibm.com - Gilbert Andrews |
| 18 |
*******************************************************************************/ |
19 |
*******************************************************************************/ |
| 19 |
|
20 |
|
| 20 |
package org.eclipse.jst.ws.internal.creation.ui.extension; |
21 |
package org.eclipse.jst.ws.internal.creation.ui.extension; |
| 21 |
|
22 |
|
|
|
23 |
import java.io.IOException; |
| 24 |
|
| 22 |
import org.eclipse.core.resources.IProject; |
25 |
import org.eclipse.core.resources.IProject; |
| 23 |
import org.eclipse.core.resources.ResourcesPlugin; |
26 |
import org.eclipse.core.resources.ResourcesPlugin; |
|
|
27 |
import org.eclipse.core.runtime.CoreException; |
| 24 |
import org.eclipse.core.runtime.IAdaptable; |
28 |
import org.eclipse.core.runtime.IAdaptable; |
| 25 |
import org.eclipse.core.runtime.IProgressMonitor; |
29 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 26 |
import org.eclipse.core.runtime.IStatus; |
30 |
import org.eclipse.core.runtime.IStatus; |
| 27 |
import org.eclipse.core.runtime.Status; |
31 |
import org.eclipse.core.runtime.Status; |
|
|
32 |
import org.eclipse.jdt.core.JavaModelException; |
| 28 |
import org.eclipse.jst.ws.internal.consumption.command.common.CreateFacetedProjectCommand; |
33 |
import org.eclipse.jst.ws.internal.consumption.command.common.CreateFacetedProjectCommand; |
| 29 |
import org.eclipse.jst.ws.internal.consumption.common.FacetUtils; |
34 |
import org.eclipse.jst.ws.internal.consumption.common.FacetUtils; |
| 30 |
import org.eclipse.jst.ws.internal.consumption.common.RequiredFacetVersion; |
35 |
import org.eclipse.jst.ws.internal.consumption.common.RequiredFacetVersion; |
|
|
36 |
import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages; |
| 37 |
import org.eclipse.jst.ws.internal.consumption.ui.widgets.test.wssample.AddModuleDependenciesCommand; |
| 31 |
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2; |
38 |
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2; |
| 32 |
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer; |
39 |
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer; |
|
|
40 |
import org.eclipse.osgi.util.NLS; |
| 41 |
import org.eclipse.wst.command.internal.env.core.common.StatusUtils; |
| 33 |
import org.eclipse.wst.command.internal.env.core.context.ResourceContext; |
42 |
import org.eclipse.wst.command.internal.env.core.context.ResourceContext; |
| 34 |
import org.eclipse.wst.common.environment.IEnvironment; |
43 |
import org.eclipse.wst.common.environment.IEnvironment; |
| 35 |
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; |
44 |
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; |
|
Lines 39-44
Link Here
|
| 39 |
import org.eclipse.wst.ws.internal.wsrt.IWebService; |
48 |
import org.eclipse.wst.ws.internal.wsrt.IWebService; |
| 40 |
import org.eclipse.wst.ws.internal.wsrt.IWebServiceRuntime; |
49 |
import org.eclipse.wst.ws.internal.wsrt.IWebServiceRuntime; |
| 41 |
import org.eclipse.wst.ws.internal.wsrt.SimpleContext; |
50 |
import org.eclipse.wst.ws.internal.wsrt.SimpleContext; |
|
|
51 |
import org.eclipse.wst.ws.internal.wsrt.TestInfo; |
| 42 |
import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo; |
52 |
import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo; |
| 43 |
import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario; |
53 |
import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario; |
| 44 |
import org.eclipse.wst.ws.internal.wsrt.WebServiceState; |
54 |
import org.eclipse.wst.ws.internal.wsrt.WebServiceState; |
|
Lines 54-59
Link Here
|
| 54 |
private String moduleType_; |
64 |
private String moduleType_; |
| 55 |
private String earProject_; |
65 |
private String earProject_; |
| 56 |
private String ear_; |
66 |
private String ear_; |
|
|
67 |
private IProject initialProject_; |
| 57 |
|
68 |
|
| 58 |
private IWebService webService_; |
69 |
private IWebService webService_; |
| 59 |
private String j2eeLevel_; |
70 |
private String j2eeLevel_; |
|
Lines 159-164
Link Here
|
| 159 |
} |
170 |
} |
| 160 |
} |
171 |
} |
| 161 |
} |
172 |
} |
|
|
173 |
|
| 174 |
// add the module dependency if the initial project is Java project |
| 175 |
if(FacetUtils.isJavaProject(initialProject_)){ |
| 176 |
AddModuleDependenciesCommand addMod = new AddModuleDependenciesCommand(); |
| 177 |
// Should not call AddModuleDependenciesCommand execute() method here since the |
| 178 |
// necessary testInfo is not set up. We are just using some methods here. |
| 179 |
addMod.addJavaProjectAsUtilityJar(initialProject_, project, monitor); |
| 180 |
try |
| 181 |
{ |
| 182 |
String uri = initialProject_.getName() + ".jar"; |
| 183 |
addMod.addJAROrModuleDependency(project, uri); |
| 184 |
} catch (CoreException ce) |
| 185 |
{ |
| 186 |
String errorMessage = NLS.bind(ConsumptionUIMessages.MSG_ERROR_MODULE_DEPENDENCY, new String[]{project.getName(), initialProject_.getName()}); |
| 187 |
IStatus errorStatus = StatusUtils.errorStatus(errorMessage); |
| 188 |
environment.getStatusHandler().reportError(errorStatus); |
| 189 |
} catch (IOException ioe) |
| 190 |
{ |
| 191 |
String errorMessage = NLS.bind(ConsumptionUIMessages.MSG_ERROR_MODULE_DEPENDENCY, new String[]{project.getName(), initialProject_.getName()}); |
| 192 |
IStatus errorStatus = StatusUtils.errorStatus(errorMessage); |
| 193 |
environment.getStatusHandler().reportError(errorStatus); |
| 194 |
} |
| 195 |
} |
| 162 |
} |
196 |
} |
| 163 |
return status; |
197 |
return status; |
| 164 |
|
198 |
|
|
Lines 280-285
Link Here
|
| 280 |
{ |
314 |
{ |
| 281 |
client_ = genProxy; |
315 |
client_ = genProxy; |
| 282 |
} |
316 |
} |
|
|
317 |
|
| 318 |
public void setInitialProject(IProject initialProject) |
| 319 |
{ |
| 320 |
initialProject_ = initialProject; |
| 321 |
} |
| 322 |
|
| 323 |
public IProject getInitialProject() |
| 324 |
{ |
| 325 |
return initialProject_; |
| 326 |
} |
| 283 |
|
327 |
|
| 284 |
|
328 |
|
| 285 |
} |
329 |
} |