diff options
author | kchan | 2005-09-27 05:10:03 +0000 |
---|---|---|
committer | kchan | 2005-09-27 05:10:03 +0000 |
commit | 65bacb21191c479cdc697225825a9115ae9a5f18 (patch) | |
tree | ebbad20e19c1352f6abc0a1471ad4b22b9d773c4 /bundles | |
parent | e256cdef626c6ebe10909f6ed318d264f05c5f55 (diff) | |
download | webtools.webservices-65bacb21191c479cdc697225825a9115ae9a5f18.tar.gz webtools.webservices-65bacb21191c479cdc697225825a9115ae9a5f18.tar.xz webtools.webservices-65bacb21191c479cdc697225825a9115ae9a5f18.zip |
[110608] Port Axis commands to use EnvironmentalOperation.
Diffstat (limited to 'bundles')
52 files changed, 380 insertions, 1370 deletions
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.axis.consumption.core/META-INF/MANIFEST.MF index 3d0937072..8918e50b4 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.core/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.jst.ws.axis.consumption.core/META-INF/MANIFEST.MF @@ -16,4 +16,6 @@ Require-Bundle: org.apache.ant, org.eclipse.jst.ws.consumption, org.eclipse.jst.j2ee.web, org.apache.axis, - org.eclipse.wst.common.modulecore + org.eclipse.wst.common.modulecore, + org.eclipse.wst.common.frameworks, + org.eclipse.core.commands diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/AxisDeployCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/AxisDeployCommand.java index d84134d2c..7f61a13f3 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/AxisDeployCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/AxisDeployCommand.java @@ -18,8 +18,11 @@ import org.apache.axis.tools.ant.axis.AdminClientTask; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Target; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; @@ -28,7 +31,7 @@ import org.eclipse.wst.command.internal.provisional.env.core.common.Status; * Commands are executable, undoable, redoable objects. Every Command has a name and a description. */ -public class AxisDeployCommand extends SimpleCommand +public class AxisDeployCommand extends EnvironmentalOperation { protected static final String SERVICE_EXT = "/services/AdminService"; //$NON-NLS-1$ @@ -43,11 +46,11 @@ public class AxisDeployCommand extends SimpleCommand */ public AxisDeployCommand() { - super("org.eclipse.jst.ws.internal.axis.consumption.core.command.AxisDeployCommand", "org.eclipse.jst.ws.internal.axis.consumption.core.command.AxisDeployCommand"); } - public Status execute(Environment environment) + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) { + Environment environment = getEnvironment(); if (javaWSDLParam == null) { return new SimpleStatus("Java2WSDLCommand", //$NON-NLS-1$ @@ -83,11 +86,11 @@ public class AxisDeployCommand extends SimpleCommand { public DeployTask() { - project = new Project(); - project.init(); - taskType = "axis"; //$NON-NLS-1$ - taskName = "axis-admin"; //$NON-NLS-1$ - target = new Target(); + super.setProject(new Project()); + super.getProject().init(); + super.setTaskType("axis"); //$NON-NLS-1$ + super.setTaskName("axis-admin"); //$NON-NLS-1$ + super.setOwningTarget(new Target()); } } diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/GeronimoAxisDeployCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/GeronimoAxisDeployCommand.java index 99e4238e2..13eb5314e 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/GeronimoAxisDeployCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/GeronimoAxisDeployCommand.java @@ -26,12 +26,15 @@ import org.apache.tools.ant.Target; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.common.J2EEUtils; import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; @@ -42,7 +45,7 @@ import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; * Commands are executable, undoable, redoable objects. Every Command has a name and a description. */ -public class GeronimoAxisDeployCommand extends SimpleCommand +public class GeronimoAxisDeployCommand extends EnvironmentalOperation { private JavaWSDLParameter javaWSDLParam; @@ -63,14 +66,11 @@ public class GeronimoAxisDeployCommand extends SimpleCommand */ public GeronimoAxisDeployCommand(String projectName, String componentName) { - super("org.eclipse.jst.ws.internal.axis.consumption.core.command.GeronimoAxisDeployCommand", "org.eclipse.jst.ws.internal.axis.consumption.core.command.GeronimoAxisDeployCommand"); - this.projectName_ = projectName; - this.componentName_ = componentName; } - public Status execute(Environment environment) + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) { - + Environment environment = getEnvironment(); if (javaWSDLParam == null) { return new SimpleStatus("Java2WSDLCommand", //$NON-NLS-1$ @@ -111,11 +111,11 @@ public class GeronimoAxisDeployCommand extends SimpleCommand { public DeployTask() { - project = new Project(); - project.init(); - taskType = "axis"; //$NON-NLS-1$ - taskName = "axis-admin"; //$NON-NLS-1$ - target = new Target(); + super.setProject(new Project()); + super.getProject().init(); + super.setTaskType("axis"); //$NON-NLS-1$ + super.setTaskName("axis-admin"); //$NON-NLS-1$ + super.setOwningTarget(new Target()); } } diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/Java2WSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/Java2WSDLCommand.java index cdf8cf592..c886b64d0 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/Java2WSDLCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/Java2WSDLCommand.java @@ -23,43 +23,40 @@ import org.apache.axis.tools.ant.wsdl.NamespaceMapping; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Target; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.Log; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; - /** * Commands are executable, undoable, redoable objects. * Every Command has a name and a description. */ -public class Java2WSDLCommand extends SimpleCommand { +public class Java2WSDLCommand extends EnvironmentalOperation +{ private JavaWSDLParameter javaWSDLParam_; private ResourceBundle resource = ResourceBundle.getBundle("org.eclipse.jst.ws.axis.consumption.core.consumption"); //$NON-NLS-1$ - - private String LABEL = "TASK_LABEL_JAVA_WSDL_COMMAND"; - private String DESCRIPTION = "TASK_DESC_JAVA_WSDL_COMMAND"; public Java2WSDLCommand() { - super(); - setName (getMessage(LABEL)); - setDescription(getMessage(DESCRIPTION)); } /** * Constructor for Java2WSDLCommand. */ public Java2WSDLCommand(JavaWSDLParameter javaWSDLParam) { super(); - setName (getMessage(LABEL)); - setDescription(getMessage(DESCRIPTION)); this.javaWSDLParam_ = javaWSDLParam; } - public Status execute(Environment environment) { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); Status status; if (javaWSDLParam_ == null) { status = new SimpleStatus("Java2WSDLCommand", //$NON-NLS-1$ @@ -85,11 +82,11 @@ public class Java2WSDLCommand extends SimpleCommand { final class Emitter extends Java2WsdlAntTask { public Emitter() { - project = new Project(); - project.init(); - taskType = "axis"; //$NON-NLS-1$ - taskName = "axis-java2wsdl"; //$NON-NLS-1$ - target = new Target(); + super.setProject(new Project()); + super.getProject().init(); + super.setTaskType("axis"); //$NON-NLS-1$ + super.setTaskName("axis-java2wsdl"); //$NON-NLS-1$ + super.setOwningTarget(new Target()); } } diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/WSDL2JavaCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/WSDL2JavaCommand.java index a7b7abdd1..f75659e5d 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/WSDL2JavaCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/WSDL2JavaCommand.java @@ -19,15 +19,18 @@ import java.util.ResourceBundle; import org.apache.axis.wsdl.toJava.Emitter; import org.apache.axis.wsdl.toJava.GeneratedFileInfo; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.Log; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -public class WSDL2JavaCommand extends SimpleCommand { +public class WSDL2JavaCommand extends EnvironmentalOperation { private final String DEPLOY_TYPE = "deploy"; //$NON-NLS-1$ private final String UNDEPLOY_TYPE = "undeploy"; //$NON-NLS-1$ @@ -36,17 +39,14 @@ public class WSDL2JavaCommand extends SimpleCommand { private String httpBasicAuthUsername; private String httpBasicAuthPassword; private ResourceBundle resource = ResourceBundle.getBundle("org.eclipse.jst.ws.axis.consumption.core.consumption"); //$NON-NLS-1$ - private String LABEL = "TASK_LABEL_WSDL_JAVA_COMMAND"; - private String DESCRIPTION = "TASK_DESC_WSDL_JAVA_COMMAND"; public WSDL2JavaCommand() { - super(); - setName(getMessage(LABEL)); - setDescription(getMessage(DESCRIPTION)); } - public Status execute(Environment environment) { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); Status status; if (javaWSDLParam == null) { status = new SimpleStatus("WSDL2JavaCommand", //$NON-NLS-1$ diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF index be045d731..a87c44850 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF @@ -41,6 +41,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.wst.ws, org.eclipse.wst.common.modulecore, org.wsdl4j, - org.apache.axis + org.apache.axis, + org.eclipse.wst.common.frameworks Eclipse-AutoStart: true Plugin-Class: org.eclipse.jst.ws.internal.axis.consumption.ui.plugin.WebServiceAxisConsumptionUIPlugin diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.xml b/bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.xml index 9bfda1ae6..197c57ee1 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.xml +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.xml @@ -3,85 +3,6 @@ <plugin> - <!-- Web Service Client Types --> - - <extension - point="org.eclipse.jst.ws.consumption.ui.webServiceClientType"> - - <webServiceServer - factoryId="org.eclipse.jst.server.tomcat.32" - isDefault="false" - runtimeTypeIds="org.eclipse.jst.server.tomcat.32.runtime" - id="SERVER_ID_TOMCAT32_LOCAL"> - </webServiceServer> - - <webServiceServer - factoryId="org.eclipse.jst.server.tomcat.40" - isDefault="false" - runtimeTypeIds="org.eclipse.jst.server.tomcat.40.runtime" - id="SERVER_ID_TOMCAT40_LOCAL"> - </webServiceServer> - - <webServiceServer - factoryId="org.eclipse.jst.server.tomcat.41" - isDefault="false" - runtimeTypeIds="org.eclipse.jst.server.tomcat.41.runtime" - id="SERVER_ID_TOMCAT41_LOCAL"> - </webServiceServer> - - <webServiceServer - factoryId="org.eclipse.jst.server.tomcat.50" - isDefault="false" - runtimeTypeIds="org.eclipse.jst.server.tomcat.50.runtime" - id="SERVER_ID_TOMCAT50_LOCAL"> - </webServiceServer> - - <webServiceRuntime - label="%LABEL_RUNTIME_AXIS_11" - description="%DESC_RUNTIME_AXIS_11" - isDefault="false" - j2eeversion="13 14" - id="org.eclipse.jst.ws.runtime.axis11"> - </webServiceRuntime> - - <webServiceClientType - name="%WEBSERVICECLIENTTYPE_NAME_JAVA_AXIS" - runtime="org.eclipse.jst.ws.runtime.axis11" - clientType="org.eclipse.jst.ws.client.type.java" - assemblyBinding="org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client.WebServiceClientAxisType" - server="SERVER_ID_TOMCAT32_LOCAL" - id="org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client.WebServiceClientAxisType.axis11.Tomcat32Local"> - </webServiceClientType> - - <webServiceClientType - name="%WEBSERVICECLIENTTYPE_NAME_JAVA_AXIS" - runtime="org.eclipse.jst.ws.runtime.axis11" - clientType="org.eclipse.jst.ws.client.type.java" - assemblyBinding="org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client.WebServiceClientAxisType" - server="SERVER_ID_TOMCAT40_LOCAL" - id="org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client.WebServiceClientAxisType.axis11.Tomcat40Local"> - </webServiceClientType> - - <webServiceClientType - name="%WEBSERVICECLIENTTYPE_NAME_JAVA_AXIS" - runtime="org.eclipse.jst.ws.runtime.axis11" - clientType="org.eclipse.jst.ws.client.type.java" - assemblyBinding="org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client.WebServiceClientAxisType" - server="SERVER_ID_TOMCAT41_LOCAL" - id="org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client.WebServiceClientAxisType.axis11.Tomcat41Local"> - </webServiceClientType> - - <webServiceClientType - name="%WEBSERVICECLIENTTYPE_NAME_JAVA_AXIS" - runtime="org.eclipse.jst.ws.runtime.axis11" - clientType="org.eclipse.jst.ws.client.type.java" - assemblyBinding="org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client.WebServiceClientAxisType" - server="SERVER_ID_TOMCAT50_LOCAL" - id="org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client.WebServiceClientAxisType.axis11.Tomcat50Local"> - </webServiceClientType> - - </extension> - <!-- J2EE Service Reference Generator --> <extension diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AddAxisJARToBuildPathCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AddAxisJARToBuildPathCommand.java index bdb77568e..cf7da3469 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AddAxisJARToBuildPathCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AddAxisJARToBuildPathCommand.java @@ -18,16 +18,19 @@ import java.net.MalformedURLException; import java.net.URL; import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.IPluginRegistry; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; @@ -40,7 +43,7 @@ import org.eclipse.wst.command.internal.provisional.env.core.common.Status; * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ -public class AddAxisJARToBuildPathCommand extends SimpleCommand +public class AddAxisJARToBuildPathCommand extends EnvironmentalOperation { private String pluginId_ = "org.eclipse.jst.ws.axis.consumption.ui"; private MessageUtils msgUtils; @@ -50,11 +53,8 @@ public class AddAxisJARToBuildPathCommand extends SimpleCommand private IProject project; - /* (non-Javadoc) - * @see org.eclipse.wst.command.env.core.Command#execute(org.eclipse.wst.command.internal.provisional.env.core.common.Environment) - */ - public Status execute(Environment environment) - { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { msgUtils = new MessageUtils( pluginId_ + ".plugin", this ); Status status = new SimpleStatus(""); diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientDefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientDefaultingCommand.java index 0dbdba1c6..d02399d99 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientDefaultingCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientDefaultingCommand.java @@ -13,11 +13,13 @@ package org.eclipse.jst.ws.internal.axis.consumption.ui.command; import java.util.Vector; import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.common.ResourceUtils; import org.eclipse.jst.ws.internal.consumption.common.WSDLParserFactory; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; import org.eclipse.wst.server.core.IServer; @@ -29,7 +31,7 @@ import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; * AxisClientDefaultingCommand * */ -public class AxisClientDefaultingCommand extends SimpleCommand +public class AxisClientDefaultingCommand extends EnvironmentalOperation { private boolean isClientScenario_ = true; private boolean customizeMappings_ = false; @@ -54,12 +56,8 @@ public class AxisClientDefaultingCommand extends SimpleCommand moduleName_ = moduleName; } - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.command.env.core.Command#execute(org.eclipse.wst.command.internal.provisional.env.core.common.Environment) - */ - public Status execute(Environment environment) { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { Status status = new SimpleStatus(""); clientExistingServer_ = getServerFromServerLabel(); diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientGenerator.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientGenerator.java index f1d53ac8c..3d8ed02cf 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientGenerator.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientGenerator.java @@ -71,10 +71,11 @@ public class AxisClientGenerator extends WebServiceClientGenerator axisClientDefaultingCommand.setIsClientScenario(true); axisClientDefaultingCommand.setGenerateProxy(true); J2EEEnvironment j2eeEnvironment = new J2EEEnvironment(); - status = axisClientDefaultingCommand.execute(j2eeEnvironment); + axisClientDefaultingCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(axisClientDefaultingCommand.execute(null, null)); if (status.getSeverity()!=Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } // Figure out if this is a Web, EJB, or AppClient project @@ -85,10 +86,11 @@ public class AxisClientGenerator extends WebServiceClientGenerator httpCommand.setJavaWSDLParam(axisClientDefaultingCommand.getJavaWSDLParam()); httpCommand.setWsdlServiceURL(axisClientDefaultingCommand.getWsdlURL()); httpCommand.setWebServicesParser(axisClientDefaultingCommand.getWebServicesParser()); - status = httpCommand.execute(j2eeEnvironment); + httpCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(httpCommand.execute(null, null)); if (status.getSeverity()!=Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } //CopyAxisJarCommand @@ -101,30 +103,34 @@ public class AxisClientGenerator extends WebServiceClientGenerator { CopyAxisJarCommand axjCommand = new CopyAxisJarCommand(""); axjCommand.setProject(axisClientDefaultingCommand.getClientProject()); - status = axjCommand.execute(j2eeEnvironment); + axjCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(axjCommand.execute(null, null)); if (status.getSeverity()!=Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } } else { AddAxisJARToBuildPathCommand addAxisCommand = new AddAxisJARToBuildPathCommand(); addAxisCommand.setProject(axisClientDefaultingCommand.getClientProject()); - status = addAxisCommand.execute(j2eeEnvironment); + addAxisCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(addAxisCommand.execute(null, null)); if (status.getSeverity() != Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } } //AddJarsToProjectBuildPathTask AddJarsToProjectBuildPathTask addJarsCommand = new AddJarsToProjectBuildPathTask(); addJarsCommand.setProject(axisClientDefaultingCommand.getClientProject()); - status = addJarsCommand.execute(j2eeEnvironment); + addJarsCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(addJarsCommand.execute(null, null)); + if (status.getSeverity()!=Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } //DefaultsForClientJavaWSDLCommand @@ -132,49 +138,54 @@ public class AxisClientGenerator extends WebServiceClientGenerator defClientCommand.setJavaWSDLParam(axisClientDefaultingCommand.getJavaWSDLParam()); defClientCommand.setProxyProject(axisClientDefaultingCommand.getClientProject()); defClientCommand.setWSDLServiceURL(axisClientDefaultingCommand.getWsdlURL()); - status = defClientCommand.execute(j2eeEnvironment); + defClientCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(defClientCommand.execute(null, null)); if (status.getSeverity()!=Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } //ValidateWSDLCommand ValidateWSDLCommand valWSDLCommand = new ValidateWSDLCommand(); valWSDLCommand.setWsdlURI(axisClientDefaultingCommand.getWsdlURL()); valWSDLCommand.setWebServicesParser(axisClientDefaultingCommand.getWebServicesParser()); - status = valWSDLCommand.execute(j2eeEnvironment); + valWSDLCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(valWSDLCommand.execute(null, null)); if (status.getSeverity()!=Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } //WSDL2JavaCommand WSDL2JavaCommand w2jCommand = new WSDL2JavaCommand(); w2jCommand.setJavaWSDLParam(axisClientDefaultingCommand.getJavaWSDLParam()); w2jCommand.setWsdlURI(axisClientDefaultingCommand.getWsdlURL()); - status = w2jCommand.execute(j2eeEnvironment); + w2jCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(w2jCommand.execute(null, null)); if (status.getSeverity()!=Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } //RefreshProjectCommand RefreshProjectCommand refreshCommand = new RefreshProjectCommand(); refreshCommand.setProject(axisClientDefaultingCommand.getClientProject()); - status = refreshCommand.execute(j2eeEnvironment); + refreshCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(refreshCommand.execute(null, null)); if (status.getSeverity()!=Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } Stub2BeanCommand s2bCommand = new Stub2BeanCommand(); s2bCommand.setJavaWSDLParam(axisClientDefaultingCommand.getJavaWSDLParam()); s2bCommand.setWebServicesParser(axisClientDefaultingCommand.getWebServicesParser()); s2bCommand.setClientProject(axisClientDefaultingCommand.getClientProject()); - status = s2bCommand.execute(j2eeEnvironment); + s2bCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(s2bCommand.execute(null, null)); if (status.getSeverity()!=Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } //CopyClientWSDLCommand @@ -182,10 +193,11 @@ public class AxisClientGenerator extends WebServiceClientGenerator copyCommand.setWsdlURL(axisClientDefaultingCommand.getWsdlURL()); copyCommand.setClientWSDLPathName(outputWSDLFilePathName); copyCommand.setWsParser(axisClientDefaultingCommand.getWebServicesParser()); - status = copyCommand.execute(j2eeEnvironment); + copyCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(copyCommand.execute(null, null)); if (status.getSeverity()!=Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } @@ -193,10 +205,11 @@ public class AxisClientGenerator extends WebServiceClientGenerator BuildProjectCommand buildCommand = new BuildProjectCommand(); buildCommand.setProject(axisClientDefaultingCommand.getClientProject()); buildCommand.setForceBuild(true); - status = buildCommand.execute(j2eeEnvironment); + buildCommand.setEnvironment(j2eeEnvironment); + status = EnvironmentUtils.convertIStatusToStatus(buildCommand.execute(null, null)); if (status.getSeverity()!=Status.OK) { - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } //Calculate the service interface and service endpoint interface names @@ -213,7 +226,7 @@ public class AxisClientGenerator extends WebServiceClientGenerator dataModel.setServiceEndpointInterfaceNames(seiNames); dataModel.setDidGenDescriptors(false); - return EnvironmentUtils.convertStatusToIStatus(status, pluginId_); + return status; } private InterfaceNames calculateSIandSEIName(String wsdlURL, String serviceQName, WebServicesParser wsParser) diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientInputCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientInputCommand.java index dd77be000..9a3d1d83c 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientInputCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientInputCommand.java @@ -11,8 +11,11 @@ package org.eclipse.jst.ws.internal.axis.consumption.ui.command; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; @@ -23,10 +26,7 @@ import org.eclipse.wst.ws.internal.provisional.wsrt.IContext; import org.eclipse.wst.ws.internal.provisional.wsrt.IWebServiceClient; -public class AxisClientInputCommand extends SimpleCommand { - - private static String LABEL = "TASK_LABEL_AXIS_CLIENT_INPUT"; - private static String DESCRIPTION = "TASK_DESC_AXIS_CLIENT_INPUT"; +public class AxisClientInputCommand extends EnvironmentalOperation { private IWebServiceClient wsc_; private String serverProject_; @@ -52,24 +52,19 @@ public class AxisClientInputCommand extends SimpleCommand { public AxisClientInputCommand() { String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); } public AxisClientInputCommand(IWebServiceClient wsc, IContext context, String project, String module) { String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); wsc_ = wsc; context_ = context; clientProject_ = project; clientModule_ = module; } - public Status execute(Environment env) - { - + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { generateProxy_ = context_.getClient(); wsdlURL_ = wsc_.getWebServiceClientInfo().getWsdlURL(); clientServer_ = wsc_.getWebServiceClientInfo().getServerInstanceId(); diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientOutputCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientOutputCommand.java index 12b9ac1c8..00fd888ac 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientOutputCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientOutputCommand.java @@ -11,45 +11,32 @@ package org.eclipse.jst.ws.internal.axis.consumption.ui.command; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; -import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; -import org.eclipse.wst.command.internal.provisional.env.core.common.Status; import org.eclipse.wst.ws.internal.provisional.wsrt.IContext; import org.eclipse.wst.ws.internal.provisional.wsrt.IWebServiceClient; -public class AxisClientOutputCommand extends SimpleCommand { - - private static String LABEL = "TASK_LABEL_AXIS_CLIENT_OUTPUT"; - private static String DESCRIPTION = "TASK_DESC_AXIS_CLIENT_OUTPUT"; +public class AxisClientOutputCommand extends EnvironmentalOperation { private IWebServiceClient wsc_; private String proxyBean_; - - private MessageUtils msgUtils_; /** * Default CTOR */ public AxisClientOutputCommand() { - String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); } public AxisClientOutputCommand(IWebServiceClient wsc, IContext context, String module) { - String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); wsc_ = wsc; } - public Status execute(Environment env) - { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { wsc_.getWebServiceClientInfo().setImplURL(proxyBean_); return new SimpleStatus(""); } diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/CopyClientWSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/CopyClientWSDLCommand.java index 4515739c4..1d1098d9a 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/CopyClientWSDLCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/CopyClientWSDLCommand.java @@ -22,11 +22,14 @@ import javax.wsdl.Import; import javax.wsdl.xml.WSDLWriter; import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.jst.ws.internal.plugin.WebServicePlugin; import org.eclipse.wst.command.internal.env.common.FileResourceUtils; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; @@ -38,10 +41,8 @@ import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; /** * */ -public class CopyClientWSDLCommand extends SimpleCommand +public class CopyClientWSDLCommand extends EnvironmentalOperation { - private String DESCRIPTION = "TASK_DESC_COPY_CLIENT_WSDL"; - private String LABEL = "TASK_LABEL_COPY_CLIENT_WSDL"; private String pluginId_ = "org.eclipse.jst.ws.axis.consumption.ui"; private MessageUtils msgUtils_; private String wsdlURL_; @@ -50,13 +51,12 @@ public class CopyClientWSDLCommand extends SimpleCommand public CopyClientWSDLCommand() { - msgUtils_ = new MessageUtils(pluginId_ + ".plugin", this); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); + msgUtils_ = new MessageUtils(pluginId_ + ".plugin", this); } - public Status execute(Environment env) - { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment env = getEnvironment(); Status status = new SimpleStatus(""); Definition def = wsParser_.getWSDLDefinition(wsdlURL_); if(def==null) diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java index 04a24f4e3..1164101df 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java @@ -14,13 +14,16 @@ package org.eclipse.jst.ws.internal.axis.consumption.ui.command; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.axis.consumption.ui.util.PlatformUtils; import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; @@ -29,7 +32,7 @@ import org.eclipse.wst.common.componentcore.ModuleCoreNature; import org.eclipse.wst.ws.internal.datamodel.Model; -public class DefaultsForClientJavaWSDLCommand extends SimpleCommand { +public class DefaultsForClientJavaWSDLCommand extends EnvironmentalOperation { private JavaWSDLParameter javaWSDLParam_; private IProject proxyProject_; @@ -39,16 +42,10 @@ public class DefaultsForClientJavaWSDLCommand extends SimpleCommand { private MessageUtils coreMsgUtils_; private String moduleName_; - private String LABEL = "TASK_LABEL_CLIENT_JAVA_WSDL_DEFAULTS"; - private String DESCRIPTION = "TASK_DESC_CLIENT_JAVA_WSDL_DEFAULTS"; - public DefaultsForClientJavaWSDLCommand( String moduleName ) { String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); - moduleName_ = moduleName; } @@ -62,12 +59,12 @@ public class DefaultsForClientJavaWSDLCommand extends SimpleCommand { String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); this.javaWSDLParam_ = javaWSDLParam; } - public Status execute(Environment environment) { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); Status status; if (javaWSDLParam_ == null) { status = new SimpleStatus("DefaultsForClientJavaWSDLCommand", //$NON-NLS-1$ diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/AddJarsToProjectBuildPathTask.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/AddJarsToProjectBuildPathTask.java index b4eeff87e..ae4510aca 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/AddJarsToProjectBuildPathTask.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/AddJarsToProjectBuildPathTask.java @@ -20,6 +20,7 @@ import java.util.Iterator; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.IPluginRegistry; @@ -35,7 +36,7 @@ import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParamete import org.eclipse.jst.ws.internal.axis.consumption.ui.plugin.WebServiceAxisConsumptionUIPlugin; import org.eclipse.jst.ws.internal.common.J2EEUtils; import org.eclipse.wst.command.internal.env.ui.eclipse.EclipseProgressMonitor; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.ProgressMonitor; @@ -47,10 +48,7 @@ import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; import org.eclipse.wst.common.componentcore.resources.IVirtualFolder; import org.eclipse.wst.common.componentcore.resources.IVirtualResource; -public class AddJarsToProjectBuildPathTask extends SimpleCommand { - - private String DESCRIPTION = "TASK_DESC_JARS_TO_PROJECT"; - private String LABEL = "TASK_LABEL_JARS_TO_PROJECT"; +public class AddJarsToProjectBuildPathTask extends EnvironmentalOperation { private IJavaProject javaProject_; private IClasspathEntry[] oldClasspath_; @@ -66,8 +64,6 @@ public class AddJarsToProjectBuildPathTask extends SimpleCommand { { String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); module_ = J2EEUtils.getFirstWebModuleName(project); } @@ -75,15 +71,15 @@ public class AddJarsToProjectBuildPathTask extends SimpleCommand { { String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); module_ = module; } /** * Execute AddJarsToProjectBuildPathTask */ - public Status execute(Environment env) { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment env = getEnvironment(); // try { // if (project.hasNature(IWebNatureConstants.J2EE_NATURE_ID)) { // J2EEWebNatureRuntime webNatureRuntime = @@ -171,11 +167,11 @@ public class AddJarsToProjectBuildPathTask extends SimpleCommand { newClasspath_[j+i] = oldClasspath_[i]; } - ProgressMonitor monitor = env.getProgressMonitor(); + ProgressMonitor localMonitor = env.getProgressMonitor(); IProgressMonitor eclipseMonitor = null; - if (monitor instanceof EclipseProgressMonitor) + if (localMonitor instanceof EclipseProgressMonitor) { - eclipseMonitor = ((EclipseProgressMonitor)monitor).getMonitor(); + eclipseMonitor = ((EclipseProgressMonitor)localMonitor).getMonitor(); } javaProject_.setRawClasspath(newClasspath_,eclipseMonitor); } @@ -289,11 +285,11 @@ public class AddJarsToProjectBuildPathTask extends SimpleCommand { // try { - ProgressMonitor monitor = env.getProgressMonitor(); + ProgressMonitor localMonitor = env.getProgressMonitor(); IProgressMonitor eclipseMonitor = null; - if (monitor instanceof EclipseProgressMonitor) + if (localMonitor instanceof EclipseProgressMonitor) { - eclipseMonitor = ((EclipseProgressMonitor)monitor).getMonitor(); + eclipseMonitor = ((EclipseProgressMonitor)localMonitor).getMonitor(); } javaProject_.setRawClasspath(newClasspath_,eclipseMonitor); } diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CheckAxisDeploymentDescriptorsTask.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CheckAxisDeploymentDescriptorsTask.java index 7edd10a66..07023ec1e 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CheckAxisDeploymentDescriptorsTask.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CheckAxisDeploymentDescriptorsTask.java @@ -13,17 +13,20 @@ package org.eclipse.jst.ws.internal.axis.consumption.ui.task; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.common.EnvironmentUtils; import org.eclipse.jst.ws.internal.common.J2EEUtils; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; import org.eclipse.wst.command.internal.provisional.env.core.common.StatusException; -public class CheckAxisDeploymentDescriptorsTask extends SimpleCommand { +public class CheckAxisDeploymentDescriptorsTask extends EnvironmentalOperation { private MessageUtils msgUtils_; private MessageUtils coreMsgUtils_; @@ -35,13 +38,12 @@ public class CheckAxisDeploymentDescriptorsTask extends SimpleCommand { String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setDescription(msgUtils_.getMessage("CHECK_WS_DD_TASK_DESCRIPTION")); - setName(msgUtils_.getMessage("CHECK_WS_DD_TASK_LABEL")); - moduleName_ = moduleName; } - public Status execute(Environment env) { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment env = getEnvironment(); Status status = new SimpleStatus( "" ); if(EnvironmentUtils.getResourceContext(env).isOverwriteFilesEnabled()) { return status; diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java index 4e8ea5a72..fc22e73ee 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java @@ -19,6 +19,7 @@ import java.util.ArrayList; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.IPluginRegistry; @@ -36,7 +37,7 @@ import org.eclipse.jst.ws.internal.common.J2EEUtils; import org.eclipse.jst.ws.internal.common.ResourceUtils; import org.eclipse.wst.command.internal.env.common.FileResourceUtils; import org.eclipse.wst.command.internal.env.ui.eclipse.EclipseProgressMonitor; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.ProgressMonitor; @@ -47,7 +48,7 @@ import org.eclipse.wst.command.internal.provisional.env.core.context.TransientRe import org.eclipse.wst.common.componentcore.ModuleCoreNature; -public class CopyAxisJarCommand extends SimpleCommand { +public class CopyAxisJarCommand extends EnvironmentalOperation { public static String AXIS_RUNTIME_PLUGIN_ID = "org.apache.axis"; //$NON-NLS-1$ public static String[] JARLIST = new String[] { @@ -60,9 +61,6 @@ public class CopyAxisJarCommand extends SimpleCommand { }; public static String PATH_TO_JARS_IN_PLUGIN = "lib/"; - private String DESCRIPTION = "TASK_DESC_COPY_JARS_TO_PROJECT"; - private String LABEL = "TASK_LABEL_COPY_JARS_TO_PROJECT"; - private MessageUtils msgUtils_; private MessageUtils baseConMsgUtils_; private IProject project; @@ -76,16 +74,15 @@ public class CopyAxisJarCommand extends SimpleCommand { String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); baseConMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.consumption.plugin", this ); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); - moduleName_ = moduleName; } /** * Execute the command */ - public Status execute(Environment env) { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment env = getEnvironment(); Status status = new SimpleStatus(""); env.getProgressMonitor().report(msgUtils_.getMessage("PROGRESS_INFO_COPY_AXIS_CFG")); diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java index 1ffb7d090..7281252cc 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java @@ -10,14 +10,14 @@ *******************************************************************************/ package org.eclipse.jst.ws.internal.axis.consumption.ui.task; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.consumption.ui.wsil.DialogWWWAuthentication; import org.eclipse.ui.PlatformUI; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; -import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -import org.eclipse.wst.ws.internal.datamodel.Model; import org.eclipse.wst.ws.internal.parser.discovery.WebServicesParserExt; import org.eclipse.wst.ws.internal.parser.wsil.WWWAuthenticationException; import org.eclipse.wst.ws.internal.parser.wsil.WebServiceEntity; @@ -25,26 +25,19 @@ import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; -public class DefaultsForHTTPBasicAuthCommand extends SimpleCommand +public class DefaultsForHTTPBasicAuthCommand extends EnvironmentalOperation { private WebServicesParser webServicesParser; private String wsdlServiceURL; private JavaWSDLParameter javaWSDLParam; - private Model model; public DefaultsForHTTPBasicAuthCommand() { - super("org.eclipse.jst.ws.internal.axis.consumption.ui.task.DefaultsForHTTPBasicAuthCommand", "org.eclipse.jst.ws.internal.axis.consumption.ui.task.DefaultsForHTTPBasicAuthCommand"); + super(); } - public Status execute(Environment env) - { - //WebServiceElement wse = WebServiceElement.getWebServiceElement(model); - //setWebServicesParser((WebServicesParser)wse.getWSParser()); - //setWsdlServiceURL(wse.getWSDLServiceURL()); - //if (wsdlServiceURL == null || wsdlServiceURL.length() <= 0) - // setWsdlServiceURL((new Utils()).toFileSystemURI(wse.getWSDLServicePathname())); - + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { if (wsdlServiceURL != null && wsdlServiceURL.length() > 0) { if (webServicesParser == null) @@ -107,13 +100,6 @@ public class DefaultsForHTTPBasicAuthCommand extends SimpleCommand } /** - * @param model The model to set. - */ - public void setModel(Model model) { - this.model = model; - } - - /** * @param wsdlServiceURL The wsdlServiceURL to set. */ public void setWsdlServiceURL(String wsdlServiceURL) { diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/RefreshProjectCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/RefreshProjectCommand.java index ae95c0f8b..031c47308 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/RefreshProjectCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/RefreshProjectCommand.java @@ -13,9 +13,12 @@ package org.eclipse.jst.ws.internal.axis.consumption.ui.task; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jst.ws.internal.axis.consumption.ui.plugin.WebServiceAxisConsumptionUIPlugin; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; @@ -23,26 +26,22 @@ import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -public class RefreshProjectCommand extends SimpleCommand +public class RefreshProjectCommand extends EnvironmentalOperation { - private static final String LABEL = "TASK_LABEL_REFESH_PROJECT"; - private static final String DESCRIPTION = "TASK_DESC_REFESH_PROJECT"; - private IProject project; private MessageUtils msgUtils_; public RefreshProjectCommand() { msgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.ui.plugin", this ); - setName( msgUtils_.getMessage( LABEL ) ); - setDescription( msgUtils_.getMessage( DESCRIPTION )); } /** * Execute RefreshProjectTask */ - public Status execute(Environment env) + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) { + Environment env = getEnvironment(); try { if (project!=null) diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanCommand.java index 534b5325e..f68e838db 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanCommand.java @@ -28,12 +28,14 @@ import javax.xml.namespace.QName; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.axis.consumption.ui.util.WSDLUtils; -import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; @@ -42,7 +44,7 @@ import org.eclipse.wst.common.componentcore.ModuleCoreNature; import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; -public class Stub2BeanCommand extends SimpleCommand +public class Stub2BeanCommand extends EnvironmentalOperation { private WebServicesParser webServicesParser; private JavaWSDLParameter javaWSDLParam_; @@ -58,7 +60,7 @@ public class Stub2BeanCommand extends SimpleCommand public Stub2BeanCommand() { - super("org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand", "org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand"); + super(); portTypes_ = new Vector(); String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); @@ -66,7 +68,7 @@ public class Stub2BeanCommand extends SimpleCommand } public Stub2BeanCommand(String moduleName){ - super("org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand", "org.eclipse.jst.ws.was.creation.ui.task.Stub2BeanCommand"); + super(); portTypes_ = new Vector(); module_ = moduleName; String pluginId = "org.eclipse.jst.ws.axis.consumption.ui"; @@ -76,8 +78,9 @@ public class Stub2BeanCommand extends SimpleCommand /** * Execute */ - public Status execute(Environment env) - { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); String inputWsdlLocation = javaWSDLParam_.getInputWsdlLocation(); Definition def = webServicesParser.getWSDLDefinition(inputWsdlLocation); /* @@ -109,7 +112,7 @@ public class Stub2BeanCommand extends SimpleCommand if (javaProject == null) { Status status = new SimpleStatus("", msgUtils_.getMessage("MSG_WARN_NO_JAVA_NATURE"), Status.ERROR); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } } @@ -174,7 +177,7 @@ public class Stub2BeanCommand extends SimpleCommand stub2BeanInfo.addSEI(portTypePkgName, portTypeClassName, servicePkgName, serviceClassName, jndiName, port.getName()); try { - stub2BeanInfo.write( env.getProgressMonitor(), env.getStatusHandler() ); + stub2BeanInfo.write( environment.getProgressMonitor(), environment.getStatusHandler() ); if (discoveredWsdlPortElementName != null) { // The discovered port was processed. Ignore all other ports and services. diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/ValidateWSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/ValidateWSDLCommand.java index 8b973b2e3..987a97b6c 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/ValidateWSDLCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/ValidateWSDLCommand.java @@ -13,8 +13,11 @@ package org.eclipse.jst.ws.internal.axis.consumption.ui.task; import javax.wsdl.Definition; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.consumption.ui.plugin.WebServiceConsumptionUIPlugin; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; @@ -23,18 +26,18 @@ import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; -public class ValidateWSDLCommand extends SimpleCommand +public class ValidateWSDLCommand extends EnvironmentalOperation { private WebServicesParser webServicesParser; private String wsdlURI; public ValidateWSDLCommand() { - super("org.eclipse.jst.ws.internal.axis.consumption.ui.task.ValidateWSDLCommand", "org.eclipse.jst.ws.internal.axis.consumption.ui.task.ValidateWSDLCommand"); } - public Status execute(Environment env) - { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); MessageUtils msgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.ui.plugin", this ); if (wsdlURI != null && wsdlURI.length() > 0) @@ -46,7 +49,7 @@ public class ValidateWSDLCommand extends SimpleCommand if (numServices < 1) { Status status = new SimpleStatus(WebServiceConsumptionUIPlugin.ID, msgUtils_.getMessage("MSG_ERROR_WSDL_HAS_NO_SERVICE_ELEMENT", new Object[] {wsdlURI}), Status.ERROR, null); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } } diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisClientFragment.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisClientFragment.java deleted file mode 100644 index 7d5108262..000000000 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisClientFragment.java +++ /dev/null @@ -1,130 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.consumption.ui.widgets; - -import org.eclipse.jst.ws.internal.axis.consumption.core.command.WSDL2JavaCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientDefaultingCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.command.DefaultsForClientJavaWSDLCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.AddJarsToProjectBuildPathTask; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CopyAxisJarCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.DefaultsForHTTPBasicAuthCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.RefreshProjectCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.Stub2BeanCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.ValidateWSDLCommand; -import org.eclipse.jst.ws.internal.common.StringToIProjectTransformer; -import org.eclipse.jst.ws.internal.consumption.command.common.BuildProjectCommand; -import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ClientExtensionDefaultingCommand; -import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ClientExtensionOutputCommand; -import org.eclipse.wst.command.internal.env.core.fragment.BooleanFragment; -import org.eclipse.wst.command.internal.env.core.fragment.SequenceFragment; -import org.eclipse.wst.command.internal.env.core.fragment.SimpleFragment; -import org.eclipse.wst.command.internal.provisional.env.core.common.Condition; -import org.eclipse.wst.command.internal.provisional.env.core.data.DataMappingRegistry; - - -public class AxisClientFragment extends SequenceFragment -{ - - public AxisClientFragment() - { - //add(new SimpleFragment(new AxisClientDefaultingCommand(), "")); - add(new SimpleFragment("AxisClientStart")); - add(new MappingFragment()); - add(new AxisClientCommandsFragment()); - // TODO: Look into AddWSDLtoWSILCommand for the client scenario - } - - public void registerDataMappings(DataMappingRegistry registry) - { - // AxisClientDefaultingCommand - registry.addMapping(ClientExtensionDefaultingCommand.class, "ClientProject", AxisClientDefaultingCommand.class, "ClientProject", - new StringToIProjectTransformer()); - registry.addMapping(ClientExtensionDefaultingCommand.class, "ClientRuntime", AxisClientDefaultingCommand.class, "ClientRuntimeID", - null); - registry.addMapping(ClientExtensionDefaultingCommand.class, "WebServicesParser", AxisClientDefaultingCommand.class); - registry.addMapping(ClientExtensionDefaultingCommand.class, "ClientProjectEAR", AxisClientDefaultingCommand.class, - "ClientProjectEAR", new StringToIProjectTransformer()); - registry.addMapping(ClientExtensionDefaultingCommand.class, "WsdlURI", AxisClientDefaultingCommand.class, "WsdlURL", null); // URI - // to - // URL - // transformer - // req'd?? - registry.addMapping(ClientExtensionDefaultingCommand.class, "TestProxySelected", AxisClientDefaultingCommand.class, - "TestProxySelected", null); - registry.addMapping(ClientExtensionDefaultingCommand.class, "ClientServer", AxisClientDefaultingCommand.class); - registry.addMapping(ClientExtensionDefaultingCommand.class, "IsClientScenario", AxisClientDefaultingCommand.class); - registry.addMapping(ClientExtensionDefaultingCommand.class, "GenerateProxy", AxisClientDefaultingCommand.class); - // DefaultsForHTTPBasicAuthCommand() - registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", DefaultsForHTTPBasicAuthCommand.class); //OK - registry.addMapping(AxisClientDefaultingCommand.class, "WsdlURL", DefaultsForHTTPBasicAuthCommand.class, "WsdlServiceURL", null); //OK - registry.addMapping(AxisClientDefaultingCommand.class, "WebServicesParser", DefaultsForHTTPBasicAuthCommand.class); //OK - registry.addMapping(AxisClientDefaultingCommand.class, "CustomizeClientMappings", MappingFragment.class ); - - registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", CopyAxisJarCommand.class, "Project", null); - // AddJarsToProjectBuildPathTask() - registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", AddJarsToProjectBuildPathTask.class, "Project", null); - // DefaultsForClientJavaWSDLCommand() // javaParam_, model_ - registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", DefaultsForClientJavaWSDLCommand.class); - registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", DefaultsForClientJavaWSDLCommand.class, "ProxyProject", - null); - // registry.addMapping(AxisClientDefaultingCommand.class, "WsdlURL", - // DefaultsForClientJavaWSDLCommand.class,"WSDLServicePathname",null); - // // - // URL to URL?? - registry.addMapping(AxisClientDefaultingCommand.class, "WsdlURL", DefaultsForClientJavaWSDLCommand.class, "WSDLServiceURL", null); // URI - // to - // URL?? - // ValidateWSDLCommand() - registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", ValidateWSDLCommand.class); - registry.addMapping(AxisClientDefaultingCommand.class, "WsdlServiceURL", ValidateWSDLCommand.class); - registry.addMapping(AxisClientDefaultingCommand.class, "WebServicesParser", ValidateWSDLCommand.class); - // WSDL2JavaCommand() // javaParam_ - registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", WSDL2JavaCommand.class); - registry.addMapping(AxisClientDefaultingCommand.class, "WsdlURL", WSDL2JavaCommand.class, "WsdlURI", null); // URL - // to - // URI?? - // RefreshProjectCommand() - registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", RefreshProjectCommand.class, "Project", null); - // Stub2BeanCommand() - registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", Stub2BeanCommand.class); - registry.addMapping(AxisClientDefaultingCommand.class, "WebServicesParser", Stub2BeanCommand.class); - registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", Stub2BeanCommand.class); - // BuildProjectCommand() - registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", BuildProjectCommand.class, "Project", null); - registry.addMapping(AxisClientDefaultingCommand.class, "ForceBuild", BuildProjectCommand.class); - registry.addMapping(AxisClientDefaultingCommand.class, "ValidationManager", BuildProjectCommand.class); - registry.addMapping(Stub2BeanCommand.class, "ProxyBean", ClientExtensionOutputCommand.class, "ProxyBean", null); - registry.addMapping(AxisClientDefaultingCommand.class, "GenerateProxy", AxisClientCommandsFragment.class); - registry.addMapping(AxisClientDefaultingCommand.class, "GenerateProxy", ClientExtensionOutputCommand.class); - registry.addMapping(AxisClientDefaultingCommand.class, "SetEndpointMethod", ClientExtensionOutputCommand.class); - } - - public class MappingFragment extends BooleanFragment { - - private boolean showMappings_; - public MappingFragment() { - - super(); - setTrueFragment(new SimpleFragment("AxisClientBeanMapping")); - setCondition(new Condition() { - - public boolean evaluate() { - - return showMappings_; - } - }); - } - public void setCustomizeClientMappings(boolean showMappings) { - - showMappings_ = showMappings; - } - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/DefaultsForClient.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/DefaultsForClient.java deleted file mode 100644 index 05446c960..000000000 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/DefaultsForClient.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.consumption.ui.widgets; - -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; - -public class DefaultsForClient extends SimpleCommand -{ - private boolean customizeMappings_ = true; - - public boolean getCustomizeClientMappings() - { - return customizeMappings_; - } - - public void setCustomizeClientMappings( boolean value ) - { - customizeMappings_ = value; - } - - public String getProxyFolder() - { - return "/proxyproject/myfolder"; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wizard/client/WebServiceClientAxisType.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wizard/client/WebServiceClientAxisType.java index a892c8141..f7bbec920 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wizard/client/WebServiceClientAxisType.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wizard/client/WebServiceClientAxisType.java @@ -17,12 +17,12 @@ import org.eclipse.jst.ws.internal.axis.consumption.ui.task.DefaultsForHTTPBasic import org.eclipse.jst.ws.internal.axis.consumption.ui.task.Stub2BeanCommand; import org.eclipse.jst.ws.internal.axis.consumption.ui.task.ValidateWSDLCommand; import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisClientCommandsFragment; -import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisClientFragment; import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisMappingsWidget; import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisProxyWidget; import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ClientExtensionOutputCommand; import org.eclipse.wst.command.internal.env.core.fragment.CommandFragment; import org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentFactory; +import org.eclipse.wst.command.internal.env.core.fragment.SimpleFragment; import org.eclipse.wst.command.internal.env.ui.widgets.CanFinishRegistry; import org.eclipse.wst.command.internal.env.ui.widgets.CommandWidgetBinding; import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributor; @@ -53,7 +53,6 @@ public class WebServiceClientAxisType implements CommandWidgetBinding dataRegistry.addMapping( AxisClientDefaultingCommand.class, "JavaWSDLParam", AxisMappingsWidget.class, "JavaParameter", null); // AxisProxyWidget - dataRegistry.addMapping( AxisProxyWidget.class, "CustomizeClientMappings", AxisClientFragment.MappingFragment.class ); dataRegistry.addMapping( AxisProxyWidget.class, "GenerateProxy", AxisClientCommandsFragment.class ); dataRegistry.addMapping( AxisProxyWidget.class, "GenerateProxy", ClientExtensionOutputCommand.class ); @@ -107,7 +106,8 @@ public class WebServiceClientAxisType implements CommandWidgetBinding { public CommandFragment create() { - return new AxisClientFragment(); + //dead code - doesn't matter what gets returned here. + return new SimpleFragment(); } }; } diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisWebServiceClient.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisWebServiceClient.java index ad97ec2b6..b584c157d 100644 --- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisWebServiceClient.java +++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisWebServiceClient.java @@ -13,7 +13,6 @@ import org.eclipse.jst.ws.internal.axis.consumption.ui.task.RefreshProjectComman import org.eclipse.jst.ws.internal.axis.consumption.ui.task.Stub2BeanCommand; import org.eclipse.jst.ws.internal.axis.consumption.ui.task.ValidateWSDLCommand; import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisClientCommandsFragment; -import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisClientFragment.MappingFragment; import org.eclipse.jst.ws.internal.common.StringToIProjectTransformer; import org.eclipse.jst.ws.internal.consumption.command.common.BuildProjectCommand; import org.eclipse.wst.command.internal.provisional.env.core.ICommandFactory; @@ -103,8 +102,7 @@ public class AxisWebServiceClient extends AbstractWebServiceClient // DefaultsForHTTPBasicAuthCommand() registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", DefaultsForHTTPBasicAuthCommand.class); //OK registry.addMapping(AxisClientDefaultingCommand.class, "WsdlURL", DefaultsForHTTPBasicAuthCommand.class, "WsdlServiceURL", null); //OK - registry.addMapping(AxisClientDefaultingCommand.class, "WebServicesParser", DefaultsForHTTPBasicAuthCommand.class); //OK - registry.addMapping(AxisClientDefaultingCommand.class, "CustomizeClientMappings", MappingFragment.class ); + registry.addMapping(AxisClientDefaultingCommand.class, "WebServicesParser", DefaultsForHTTPBasicAuthCommand.class); //OK registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", CopyAxisJarCommand.class, "Project", null); diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.axis.creation.ui/META-INF/MANIFEST.MF index 012a82d1f..5a7661d95 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/META-INF/MANIFEST.MF @@ -39,6 +39,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.jst.j2ee.web, org.wsdl4j, org.eclipse.jst.common.frameworks, - org.eclipse.jem.util + org.eclipse.jem.util, + org.eclipse.wst.common.frameworks Eclipse-AutoStart: true Plugin-Class: org.eclipse.jst.ws.internal.axis.creation.ui.plugin.WebServiceAxisCreationUIPlugin diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/plugin.xml b/bundles/org.eclipse.jst.ws.axis.creation.ui/plugin.xml index 8d41aad90..6f820104d 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/plugin.xml +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/plugin.xml @@ -2,116 +2,7 @@ <?eclipse version="3.0"?> <plugin> - - <!-- Web Service Server Types --> - - <extension - point="org.eclipse.jst.ws.consumption.ui.webServiceServerRuntimeType"> - - <webServiceRuntime - label="%LABEL_RUNTIME_AXIS_11" - description="%DESC_RUNTIME_AXIS_11" - isDefault="false" - j2eeversion="13 14" - id="org.eclipse.jst.ws.runtime.axis11"> - </webServiceRuntime> - - <webServiceServer - factoryId="org.eclipse.jst.server.tomcat.32" - isDefault="false" - runtimeTypeIds="org.eclipse.jst.server.tomcat.32.runtime" - id="SERVER_ID_TOMCAT32_LOCAL"> - </webServiceServer> - - <webServiceServer - factoryId="org.eclipse.jst.server.tomcat.40" - isDefault="false" - runtimeTypeIds="org.eclipse.jst.server.tomcat.40.runtime" - id="SERVER_ID_TOMCAT40_LOCAL"> - </webServiceServer> - - <webServiceServer - factoryId="org.eclipse.jst.server.tomcat.41" - isDefault="false" - runtimeTypeIds="org.eclipse.jst.server.tomcat.41.runtime" - id="SERVER_ID_TOMCAT41_LOCAL"> - </webServiceServer> - - <webServiceServer - factoryId="org.eclipse.jst.server.tomcat.50" - isDefault="false" - runtimeTypeIds="org.eclipse.jst.server.tomcat.50.runtime" - id="SERVER_ID_TOMCAT50_LOCAL"> - </webServiceServer> - - <webServiceServerRuntimeType - requireEJBModule="false" - requireWebModule="true" - name="%WS_NAME_BEANAXIS" - type="org.eclipse.jst.ws.type.java" - runtime="org.eclipse.jst.ws.runtime.axis11" - assemblyBinding="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.beans.WSBeanAxisType" - server="SERVER_ID_TOMCAT50_LOCAL" - id="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.beans.WSBeanAxisType.TOMCAT50LOCAL"> - </webServiceServerRuntimeType> - - <webServiceServerRuntimeType - requireEJBModule="false" - requireWebModule="true" - name="%WS_NAME_WSDLAXIS" - type="org.eclipse.jst.ws.type.wsdl" - runtime="org.eclipse.jst.ws.runtime.axis11" - assemblyBinding="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.wsdl.WSWSDLAxisType" - server="SERVER_ID_TOMCAT50_LOCAL" - id="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.wsdl.WSWSDLAxisType.TOMCAT50LOCAL"> - </webServiceServerRuntimeType> - - <webServiceServerRuntimeType - requireEJBModule="false" - requireWebModule="true" - name="%WS_NAME_BEANAXIS" - type="org.eclipse.jst.ws.type.java" - runtime="org.eclipse.jst.ws.runtime.axis11" - assemblyBinding="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.beans.WSBeanAxisType" - server="SERVER_ID_TOMCAT41_LOCAL" - id="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.beans.WSBeanAxisType.TOMCAT41LOCAL"> - </webServiceServerRuntimeType> - - <webServiceServerRuntimeType - requireEJBModule="false" - requireWebModule="true" - name="%WS_NAME_WSDLAXIS" - type="org.eclipse.jst.ws.type.wsdl" - runtime="org.eclipse.jst.ws.runtime.axis11" - assemblyBinding="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.wsdl.WSWSDLAxisType" - server="SERVER_ID_TOMCAT41_LOCAL" - id="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.wsdl.WSWSDLAxisType.TOMCAT41LOCAL"> - </webServiceServerRuntimeType> - - <webServiceServerRuntimeType - requireEJBModule="false" - requireWebModule="true" - name="%WS_NAME_BEANAXIS" - type="org.eclipse.jst.ws.type.java" - runtime="org.eclipse.jst.ws.runtime.axis11" - assemblyBinding="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.beans.WSBeanAxisType" - server="SERVER_ID_TOMCAT40_LOCAL" - id="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.beans.WSBeanAxisType.TOMCAT40LOCAL"> - </webServiceServerRuntimeType> - - <webServiceServerRuntimeType - requireEJBModule="false" - requireWebModule="true" - name="%WS_NAME_WSDLAXIS" - type="org.eclipse.jst.ws.type.wsdl" - runtime="org.eclipse.jst.ws.runtime.axis11" - assemblyBinding="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.wsdl.WSWSDLAxisType" - server="SERVER_ID_TOMCAT40_LOCAL" - id="org.eclipse.jst.ws.internal.axis.creation.ui.wizard.wsdl.WSWSDLAxisType.TOMCAT40LOCAL"> - </webServiceServerRuntimeType> - - </extension> - + <!-- Server Defaulters --> <extension point="org.eclipse.jst.ws.consumption.serverDefaulter"> diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/axis/creation/ui/plugin.properties b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/axis/creation/ui/plugin.properties index 07b7fc5a3..667e1516c 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/axis/creation/ui/plugin.properties +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/axis/creation/ui/plugin.properties @@ -152,13 +152,6 @@ STYLE_RPC_ENCODED=RPC/ Encoded TASK_LABEL_COPY_SERVER_CONFIG_FILES=Copy server-config.wsdd from the server location to the Web Project TASK_DESC_COPY_SERVER_CONFIG_FILES=Coping server-config.wsdd from the server location to the Web Project - -# -#LiteralSupportMessageTask -# -TASK_LABEL_LITERAL_SUPPORT_MESSAGE=Axis support for Literal encoding message task -TASK_DESC_LITERAL_SUPPORT_MESSAGE=Axis support for Literal encoding message task - # #BUAxisInputCommand and BUAxisOutputCommand # diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisOutputCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisOutputCommand.java index a65876c70..98fd3a5fc 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisOutputCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisOutputCommand.java @@ -11,50 +11,36 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.command; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.axis.creation.ui.wsrt.AxisWebService; import org.eclipse.jst.ws.internal.axis.creation.ui.wsrt.AxisWebServiceInfo; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; -import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -public class AxisOutputCommand extends SimpleCommand { +public class AxisOutputCommand extends EnvironmentalOperation { - private static String LABEL = "TASK_LABEL_BU_AXIS_OUTPUT"; - private static String DESCRIPTION = "TASK_DESC_BU_AXIS_OUTPUT"; - private AxisWebService ws_; private JavaWSDLParameter javaWSDLParam_; private String wsdlURI_; - - private boolean isWebProjectStartupRequested_ = false; - - private MessageUtils msgUtils_; - + /** * Default CTOR */ public AxisOutputCommand() { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); } public AxisOutputCommand(AxisWebService ws) { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); ws_ = ws; } - public Status execute(Environment env){ - + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { Status status = new SimpleStatus(""); ws_.getWebServiceInfo().setWsdlURL(wsdlURI_); AxisWebServiceInfo axisWSInfo = new AxisWebServiceInfo(); diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisRunInputCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisRunInputCommand.java index de3a51569..8656f48ad 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisRunInputCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisRunInputCommand.java @@ -10,50 +10,31 @@ *******************************************************************************/ package org.eclipse.jst.ws.internal.axis.creation.ui.command; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.axis.creation.ui.wsrt.AxisWebService; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; -import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; -import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -public class AxisRunInputCommand extends SimpleCommand{ - - private static String LABEL = "TASK_LABEL_BU_AXIS_INPUT"; - private static String DESCRIPTION = "TASK_DESC_BU_AXIS_INPUT"; +public class AxisRunInputCommand extends EnvironmentalOperation{ private AxisWebService ws_; private JavaWSDLParameter javaWSDLParam_; private String serverProject_; - private String serverModule_; - - private MessageUtils msgUtils_; public AxisRunInputCommand() { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); } public AxisRunInputCommand(AxisWebService ws, String project, String module) { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); ws_ = ws; serverProject_ = project; - serverModule_ = module; } - public Status execute(Environment env) - { - - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - - javaWSDLParam_ = ws_.getAxisWebServiceInfo().getJavaWSDLParameter(); + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + javaWSDLParam_ = ws_.getAxisWebServiceInfo().getJavaWSDLParameter(); return new SimpleStatus(""); } diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/BUAxisInputCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/BUAxisInputCommand.java index 316fa71b5..84d622b1a 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/BUAxisInputCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/BUAxisInputCommand.java @@ -11,20 +11,17 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.command; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; -import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; -import org.eclipse.wst.command.internal.provisional.env.core.common.Status; import org.eclipse.wst.server.core.IServer; import org.eclipse.wst.server.core.ServerCore; import org.eclipse.wst.ws.internal.provisional.wsrt.IWebService; -public class BUAxisInputCommand extends SimpleCommand { - - private static String LABEL = "TASK_LABEL_BU_AXIS_INPUT"; - private static String DESCRIPTION = "TASK_DESC_BU_AXIS_INPUT"; +public class BUAxisInputCommand extends EnvironmentalOperation { private IWebService ws_; private String serverProject_; @@ -33,33 +30,20 @@ public class BUAxisInputCommand extends SimpleCommand { private String serviceServerTypeID_; - private MessageUtils msgUtils_; - /** * Default CTOR */ public BUAxisInputCommand() { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); } public BUAxisInputCommand(IWebService ws, String project, String module) { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); ws_ = ws; serverProject_ = project; serverModule_ = module; } - public Status execute(Environment env) - { - - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + String serverInstanceId = ws_.getWebServiceInfo().getServerInstanceId(); String serverFactoryId = ws_.getWebServiceInfo().getServerFactoryId(); javaBeanName_ = ws_.getWebServiceInfo().getImplURL(); diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/ComputeAxisSkeletonBeanCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/ComputeAxisSkeletonBeanCommand.java index 1007507ef..6ee554b14 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/ComputeAxisSkeletonBeanCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/ComputeAxisSkeletonBeanCommand.java @@ -13,15 +13,16 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.command; import java.util.List; import java.util.Vector; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; -import org.eclipse.wst.command.internal.provisional.env.core.common.Status; import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; -public class ComputeAxisSkeletonBeanCommand extends SimpleCommand +public class ComputeAxisSkeletonBeanCommand extends EnvironmentalOperation { private List classNames; //private String wsdlURI; @@ -32,8 +33,8 @@ public class ComputeAxisSkeletonBeanCommand extends SimpleCommand { } - public Status execute(Environment environment) - { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { classNames = new Vector(); if (javaWSDLParameter != null) { diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/CopyDeploymentFileCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/CopyDeploymentFileCommand.java index 9032a39ed..99ac35b8c 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/CopyDeploymentFileCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/CopyDeploymentFileCommand.java @@ -13,12 +13,14 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.command; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.jst.ws.internal.common.J2EEUtils; import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; import org.eclipse.wst.common.componentcore.internal.StructureEdit; @@ -31,7 +33,7 @@ import org.eclipse.wst.common.componentcore.resources.IVirtualFile; * */ -public class CopyDeploymentFileCommand extends SimpleCommand +public class CopyDeploymentFileCommand extends EnvironmentalOperation { private String projectName_; private String componentName_; @@ -43,15 +45,13 @@ public class CopyDeploymentFileCommand extends SimpleCommand * */ public CopyDeploymentFileCommand( String projectName, String componentName ) - { - super("org.eclipse.jst.ws.internal.axis.consumption.core.command.CopyDeploymentFileCommand", "org.eclipse.jst.ws.internal.axis.consumption.core.command.CopyDeploymentFileCommand"); - + { projectName_ = projectName; componentName_ = componentName; } - public Status execute(Environment environment) - { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { Status status = new SimpleStatus(""); try diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/JavaToWSDLMethodCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/JavaToWSDLMethodCommand.java index 7aa3ad24e..adbdb0b08 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/JavaToWSDLMethodCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/JavaToWSDLMethodCommand.java @@ -16,12 +16,15 @@ import java.util.Iterator; import java.util.List; import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jem.internal.plugin.JavaEMFNature; import org.eclipse.jem.java.JavaClass; import org.eclipse.jem.java.Method; import org.eclipse.jem.java.impl.JavaClassImpl; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.Log; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; @@ -29,18 +32,14 @@ import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -public class JavaToWSDLMethodCommand extends SimpleCommand { +public class JavaToWSDLMethodCommand extends EnvironmentalOperation { - private static String LABEL = "TASK_LABEL_JAVA_TO_WSDL"; - private static String DESCRIPTION = "TASK_DESC_JAVA_TO_WSDL"; private static String JAVA_EXTENSION = ".java"; //$NON-NLS-1$ private static String CLASS_EXTENSION = ".class"; //$NON-NLS-1$ private Hashtable fMethodNames; private String fClassName; - private String fBeanName; private String fbeanBaseName; - private IProject fProject; private JavaWSDLParameter javaWSDLParam_; private IProject serviceProject_; private MessageUtils msgUtils_; @@ -51,8 +50,6 @@ public class JavaToWSDLMethodCommand extends SimpleCommand { public JavaToWSDLMethodCommand() { String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); } /** * Default CTOR @@ -62,8 +59,6 @@ public class JavaToWSDLMethodCommand extends SimpleCommand { IProject serviceProject) { String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); javaWSDLParam_ = javaParameter; serviceProject_ = serviceProject; @@ -72,7 +67,10 @@ public class JavaToWSDLMethodCommand extends SimpleCommand { /** * JavaToToWSDLMethod execute */ - public Status execute(Environment environment) { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); + fbeanBaseName = javaWSDLParam_.getBeanName(); environment.getLog().log(Log.INFO, 5070, this, "execute", "beanBaseName = "+fbeanBaseName); Status status; @@ -108,7 +106,6 @@ public class JavaToWSDLMethodCommand extends SimpleCommand { // Get the qualified name fClassName = javaClass.getQualifiedName(); - fBeanName = fClassName; String beanName; if (fClassName.lastIndexOf('.') != -1) { beanName = diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/TDAxisInputCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/TDAxisInputCommand.java index 64b89753f..5639c0b29 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/TDAxisInputCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/TDAxisInputCommand.java @@ -11,18 +11,15 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.command; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; -import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; -import org.eclipse.wst.command.internal.provisional.env.core.common.Status; import org.eclipse.wst.ws.internal.provisional.wsrt.IWebService; -public class TDAxisInputCommand extends SimpleCommand { - - private static String LABEL = "TASK_LABEL_TD_AXIS_INPUT"; - private static String DESCRIPTION = "TASK_DESC_TD_AXIS_INPUT"; +public class TDAxisInputCommand extends EnvironmentalOperation { private IWebService ws_; private String serverProject_; @@ -30,35 +27,21 @@ public class TDAxisInputCommand extends SimpleCommand { private String serverServer_; private String wsdlURI_; - - private MessageUtils msgUtils_; - + /** * Default CTOR */ public TDAxisInputCommand() { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); } public TDAxisInputCommand(IWebService ws, String project, String module) { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); ws_ = ws; serverProject_ = project; serverModule_ = module; } - public Status execute(Environment env) - { - - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { serverServer_ = ws_.getWebServiceInfo().getServerInstanceId(); wsdlURI_ = ws_.getWebServiceInfo().getWsdlURL(); diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/UpdateWEBXMLCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/UpdateWEBXMLCommand.java index 8ecc02fad..59428a02e 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/UpdateWEBXMLCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/UpdateWEBXMLCommand.java @@ -17,6 +17,9 @@ import java.util.Map; import java.util.Properties; import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit; import org.eclipse.jst.j2ee.webapplication.Servlet; @@ -24,7 +27,7 @@ import org.eclipse.jst.j2ee.webapplication.ServletMapping; import org.eclipse.jst.j2ee.webapplication.ServletType; import org.eclipse.jst.j2ee.webapplication.WebApp; import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; @@ -32,10 +35,7 @@ import org.eclipse.wst.command.internal.provisional.env.core.common.Status; import org.eclipse.wst.common.componentcore.ComponentCore; import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; -public class UpdateWEBXMLCommand extends SimpleCommand { - - private String LABEL = "TASK_LABEL_UPDATE_WEB_XML"; - private String DESCRIPTION = "TASK_DESC_UPDATE_WEB_XML"; +public class UpdateWEBXMLCommand extends EnvironmentalOperation { private MessageUtils msgUtils_; private IProject serverProject; @@ -45,13 +45,12 @@ public class UpdateWEBXMLCommand extends SimpleCommand { { String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); - moduleName_ = moduleName; } - public Status execute(Environment environment) { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); if (serverProject != null) { Status status = null; status = addServlet(serverProject, moduleName_, getAxisServletDescriptor()); @@ -113,7 +112,6 @@ public class UpdateWEBXMLCommand extends SimpleCommand { String moduleName, ServletDescriptor servletDescriptor) { - Object accessorKey = new Object(); WebArtifactEdit webEdit = null; try { // diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/DefaultsForServerJavaWSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/DefaultsForServerJavaWSDLCommand.java index 9b6b3ba9b..69fa4c95b 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/DefaultsForServerJavaWSDLCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/DefaultsForServerJavaWSDLCommand.java @@ -11,13 +11,14 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.task; -import javax.wsdl.Definition; - import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; @@ -29,7 +30,7 @@ import org.eclipse.jst.ws.internal.common.J2EEUtils; import org.eclipse.jst.ws.internal.common.ResourceUtils; import org.eclipse.jst.ws.internal.common.ServerUtils; import org.eclipse.jst.ws.internal.consumption.ui.wsil.Utils; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; @@ -38,7 +39,7 @@ import org.eclipse.wst.ws.internal.datamodel.Model; import org.eclipse.wst.ws.internal.parser.discovery.WebServicesParserExt; import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; -public class DefaultsForServerJavaWSDLCommand extends SimpleCommand { +public class DefaultsForServerJavaWSDLCommand extends EnvironmentalOperation { private MessageUtils msgUtils_; private MessageUtils coreMsgUtils_; @@ -54,8 +55,6 @@ public class DefaultsForServerJavaWSDLCommand extends SimpleCommand { // rm private WebServiceElement wse_; // temporary private String moduleName_; - private String LABEL = "TASK_LABEL_SERVER_JAVA_WSDL_DEFAULTS"; - private String DESCRIPTION = "TASK_DESC_SERVER_JAVA_WSDL_DEFAULTS"; private final String WSDL_FOLDER = "wsdl"; //$NON-NLS-1$ public final String SERVICE_EXT = "/services/"; //$NON-NLS-1$ private final String WSDL_EXT = "wsdl"; //$NON-NLS-1$ @@ -69,9 +68,6 @@ public class DefaultsForServerJavaWSDLCommand extends SimpleCommand { coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); conMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.ui.plugin", this ); moduleName_ = moduleName; - - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); } @@ -83,9 +79,6 @@ public class DefaultsForServerJavaWSDLCommand extends SimpleCommand { msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setName (msgUtils_.getMessage(LABEL)); - setDescription( msgUtils_.getMessage(DESCRIPTION)); - //rm setModel(model); setJavaWSDLParam(javaWSDLParam); } @@ -93,12 +86,14 @@ public class DefaultsForServerJavaWSDLCommand extends SimpleCommand { /** * Execute DefaultsForJavaToWSDLTask */ - public Status execute( Environment env ) { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); Status status; if (javaWSDLParam_ == null) { status = new SimpleStatus( "DefaultsForServerJavaWSDLTask", coreMsgUtils_.getMessage("MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET"), Status.ERROR ); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } @@ -119,12 +114,10 @@ public class DefaultsForServerJavaWSDLCommand extends SimpleCommand { javaWSDLParam_.setClasspath(classpath); String simpleBeanName = javaBeanName_; - String beanPackageName = null; if (javaBeanName_ != null) { int index = javaBeanName_.lastIndexOf('.'); if (index != -1) { simpleBeanName = javaBeanName_.substring(index + 1); - beanPackageName = javaBeanName_.substring(0, index); } } String namespace = WSDLUtils.makeNamespace(javaWSDLParam_.getBeanName()); @@ -155,7 +148,7 @@ public class DefaultsForServerJavaWSDLCommand extends SimpleCommand { } catch (Exception e) { status = new SimpleStatus( "DefaultsForServerJavaWSDLTask", conMsgUtils_.getMessage("MSG_ERROR_DEFAULT_BEAN"), Status.ERROR, e ); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } @@ -169,7 +162,7 @@ public class DefaultsForServerJavaWSDLCommand extends SimpleCommand { } catch(CoreException e){ status = new SimpleStatus( "DefaultsForServerJavaWSDLTask", conMsgUtils_.getMessage("MSG_ERROR_WRITE_WSDL"), Status.ERROR, e ); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } @@ -189,12 +182,10 @@ public class DefaultsForServerJavaWSDLCommand extends SimpleCommand { if (res != null) wsdlURL = (new Utils()).toFileSystemURI(res); } - Definition definition = null; if (wsdlURL != null && wsdlURL.length() > 0) { if (WSParser_ == null) { WSParser_ = new WebServicesParserExt(); } - definition = WSParser_.getWSDLDefinition(wsdlURL); } } @@ -204,7 +195,7 @@ public class DefaultsForServerJavaWSDLCommand extends SimpleCommand { String projectURL = ServerUtils.getEncodedWebComponentURL(serviceProject_, moduleName_); if (projectURL == null) { status = new SimpleStatus( "DefaultsForServerJavaWSDLTask", msgUtils_.getMessage("MSG_ERROR_PROJECT_URL"), Status.ERROR); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } // else { diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/LiteralSupportMessageTask.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/LiteralSupportMessageTask.java deleted file mode 100644 index 6e44bb2eb..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/LiteralSupportMessageTask.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.task; - - - -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; -import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; -import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; -import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -import org.eclipse.wst.command.internal.provisional.env.core.common.StatusException; - - - -public class LiteralSupportMessageTask extends SimpleCommand { - - private final String LABEL = "TASK_LABEL_LITERAL_SUPPORT_MESSAGE"; - private final String DESCRIPTION = - "TASK_DESC_LITERAL_SUPPORT_MESSAGE"; - private MessageUtils msgUtils_; - private MessageUtils coreMsgUtils_; - - private JavaWSDLParameter javaWSDLParam_; - - public LiteralSupportMessageTask() { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils(pluginId+".plugin", this); - coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); - } - - public LiteralSupportMessageTask(JavaWSDLParameter javaWSDLParam) { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - msgUtils_ = new MessageUtils(pluginId+".plugin", this); - coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); - javaWSDLParam_ = javaWSDLParam; - - } - - - /** - * Execute LiteralSupportMessageTask - */ - public Status execute(Environment env) { - Status status = new SimpleStatus(""); - if (javaWSDLParam_ == null) { - status = new SimpleStatus("",coreMsgUtils_.getMessage("MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET"), Status.ERROR); - env.getStatusHandler().reportError(status); - return status; - } - - String use = javaWSDLParam_.getUse(); - if(use != null && - use.equals(JavaWSDLParameter.USE_LITERAL)){ - status = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_LITERAL_SUPPORT_MESSAGE"), Status.WARNING); - try - { - env.getStatusHandler().report(status); - } - catch(StatusException se) - { - status = new SimpleStatus("","User aborted",Status.ERROR); - } - } - - return status; - } - - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) - { - javaWSDLParam_ = javaWSDLParam; - } - -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveDeploymentFilesTask.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveDeploymentFilesTask.java index 2fe3eaaf0..db4a59eaf 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveDeploymentFilesTask.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveDeploymentFilesTask.java @@ -14,24 +14,22 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.task; import java.io.File; import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.axis.consumption.ui.util.FileUtil; import org.eclipse.jst.ws.internal.common.J2EEUtils; import org.eclipse.jst.ws.internal.common.ResourceUtils; import org.eclipse.jst.ws.internal.common.ServerUtils; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -public class MoveDeploymentFilesTask extends SimpleCommand { - - private final String LABEL = "TASK_LABEL_MOVE_DEPLOYMENT_FILES"; - private final String DESCRIPTION = "TASK_DESC_MOVE_DEPLOYMENT_FILES"; - private final String WEB_INF = "WEB-INF"; //$NON-NLS-1$ - private final String META_INF = "META-INF"; //$NON-NLS-1$ +public class MoveDeploymentFilesTask extends EnvironmentalOperation { private MessageUtils msgUtils_; private MessageUtils coreMsgUtils_; @@ -45,20 +43,19 @@ public class MoveDeploymentFilesTask extends SimpleCommand { String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); - moduleName_ = moduleName; } /** * Execute DefaultsForJavaToWSDLTask */ - public Status execute(Environment env) { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); Status status = new SimpleStatus(""); if (javaWSDLParam_ == null) { status = new SimpleStatus("",coreMsgUtils_.getMessage("MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET"), Status.ERROR); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } @@ -68,20 +65,13 @@ public class MoveDeploymentFilesTask extends SimpleCommand { if (projectURL == null) { status = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_PROJECT_URL",new String[] { project.toString()}), Status.ERROR); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } else { javaWSDLParam_.setProjectURL(projectURL); } try { -// if (!project.hasNature(IWebNatureConstants.J2EE_NATURE_ID)) -// return status; -// } catch (Exception ex) { -// status = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_INTERAL"), Status.ERROR, ex); -// env.getStatusHandler().reportError(status); -// return status; -// } String[] deployFiles = javaWSDLParam_.getDeploymentFiles(); String javaOutput = javaWSDLParam_.getJavaOutput(); @@ -104,7 +94,7 @@ public class MoveDeploymentFilesTask extends SimpleCommand { } catch (Exception e) { status = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_MOVE_RESOURCE",new String[] { e.getLocalizedMessage()}), Status.ERROR, e); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveJavaFilesTask.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveJavaFilesTask.java index d513f136f..63d7913e6 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveJavaFilesTask.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveJavaFilesTask.java @@ -14,19 +14,19 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.task; import java.io.File; import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.common.ServerUtils; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -public class MoveJavaFilesTask extends SimpleCommand { - - private final String LABEL = "TASK_LABEL_MOVE_JAVA_FILES"; - private final String DESCRIPTION = "TASK_DESC_MOVE_JAVA_FILES"; +public class MoveJavaFilesTask extends EnvironmentalOperation { private JavaWSDLParameter javaWSDLParam_; private MessageUtils msgUtils_; @@ -40,9 +40,6 @@ public class MoveJavaFilesTask extends SimpleCommand { String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); - this.moduleName_ = moduleName; } @@ -50,16 +47,12 @@ public class MoveJavaFilesTask extends SimpleCommand { String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); } public MoveJavaFilesTask(JavaWSDLParameter javaWSDLParam) { String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); javaWSDLParam_ = javaWSDLParam; } @@ -67,21 +60,14 @@ public class MoveJavaFilesTask extends SimpleCommand { /** * Execute DefaultsForJavaToWSDLTask */ - public Status execute(Environment env) { - - // rm - /* - //Begin Setters - WebServiceElement wse = - WebServiceElement.getWebServiceElement(model_); - setServiceProject(wse.getServiceProject()); - //End Setters - */ + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); Status status = new SimpleStatus(""); if (javaWSDLParam_ == null) { status = new SimpleStatus("",coreMsgUtils_.getMessage("MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET"), Status.ERROR); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } @@ -98,7 +84,7 @@ public class MoveJavaFilesTask extends SimpleCommand { String projectURL = ServerUtils.getEncodedWebComponentURL(project, moduleName_); if (projectURL == null) { status = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_PROJECT_URL",new String[] {project.toString()}), Status.ERROR); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } else { @@ -114,9 +100,9 @@ public class MoveJavaFilesTask extends SimpleCommand { } try { for (int i = 0; i < javaFiles.length; i++) { - String resourceToMove = javaFiles[i].substring(output.length()); - String targetFileName = javaoutput + resourceToMove; - File resultFile = new File(targetFileName); +// String resourceToMove = javaFiles[i].substring(output.length()); +// String targetFileName = javaoutput + resourceToMove; +// File resultFile = new File(targetFileName); // copy java files that without overwtriting existing ones // if (!resultFile.exists()) { // FileUtil.createTargetFile( @@ -129,7 +115,7 @@ public class MoveJavaFilesTask extends SimpleCommand { } } catch (Exception e) { status = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_MOVE_RESOURCE",new String[]{e.getLocalizedMessage()}), Status.ERROR, e); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/Skeleton2WSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/Skeleton2WSDLCommand.java index 83a4a3216..c5502b772 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/Skeleton2WSDLCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/Skeleton2WSDLCommand.java @@ -14,7 +14,6 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.task; import java.io.File; import java.net.MalformedURLException; import java.net.URL; -import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -29,67 +28,63 @@ import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.axis.consumption.ui.util.FileUtil; import org.eclipse.jst.ws.internal.axis.consumption.ui.util.PlatformUtils; import org.eclipse.jst.ws.internal.axis.consumption.ui.util.WSDLUtils; import org.eclipse.jst.ws.internal.axis.creation.ui.plugin.WebServiceAxisCreationUIPlugin; +import org.eclipse.jst.ws.internal.common.EnvironmentUtils; import org.eclipse.jst.ws.internal.common.J2EEUtils; import org.eclipse.jst.ws.internal.common.ResourceUtils; import org.eclipse.jst.ws.internal.common.ServerUtils; import org.eclipse.jst.ws.internal.consumption.command.common.CopyWSDLCommand; import org.eclipse.wst.command.internal.env.ui.eclipse.EclipseEnvironment; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; -public class Skeleton2WSDLCommand extends SimpleCommand +public class Skeleton2WSDLCommand extends EnvironmentalOperation { - private static final String LABEL = "TASK_LABEL_SKELETON_WSDL"; - private static final String DESCRIPTION = "TASK_DESC_SKELETON_WSDL"; private static final String IMPL = "Impl"; //$NON-NLS-1$ private static final String SERVICE_EXT = "/services/"; //$NON-NLS-1$ private static final String WSDL_EXT = "wsdl"; //$NON-NLS-1$ private static final String DOT = "."; //$NON-NLS-1$ - private static final String SLASH = "/"; //$NON-NLS-1$ - private static final String PROTOCOL_SUFFIX = "://"; //$NON-NLS-1$ private final String WSDL_FOLDER = "wsdl"; //$NON-NLS-1$ private WebServicesParser webServicesParser; private JavaWSDLParameter javaWSDLParam; private IProject serverProject; - private HashMap visitedLinks; private MessageUtils msgUtils_; private String moduleName_; public Skeleton2WSDLCommand( String moduleName ) { - super(WebServiceAxisCreationUIPlugin.getMessage(LABEL), WebServiceAxisCreationUIPlugin.getMessage(DESCRIPTION)); msgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.creation.ui.plugin", this ); - setName( LABEL ); - setDescription( DESCRIPTION ); - moduleName_ = moduleName; } /** * Execute Skeleton2WSDLCommand */ - public Status execute(Environment env) - { - if (!(env instanceof EclipseEnvironment)) + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); + if (!(environment instanceof EclipseEnvironment)) { Status status = new SimpleStatus(WebServiceAxisCreationUIPlugin.ID, msgUtils_.getMessage("MSG_ERROR_NOT_IN_ECLIPSE_ENVIRONMENT", new String[] {"Skeleton2WSDLCommand"}), Status.ERROR, null); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } if (javaWSDLParam == null) { Status status = new SimpleStatus(WebServiceAxisCreationUIPlugin.ID, msgUtils_.getMessage("MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET"), Status.ERROR, null); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } @@ -133,14 +128,14 @@ public class Skeleton2WSDLCommand extends SimpleCommand } else { Status status = new SimpleStatus(WebServiceAxisCreationUIPlugin.ID, msgUtils_.getMessage("MSG_ERROR_WSDL_NO_DEFINITION", new String[] {wsdlURL}), Status.ERROR, null); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } // Modify WSDL endpoint if (port == null) { Status status = new SimpleStatus(WebServiceAxisCreationUIPlugin.ID, msgUtils_.getMessage("MSG_ERROR_WSDL_NO_PORT", new String[] {wsdlURL}), Status.ERROR, null); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } Map services = definition.getServices(); @@ -155,8 +150,6 @@ public class Skeleton2WSDLCommand extends SimpleCommand } } - visitedLinks = new HashMap(); - // Set WSDL file name: javaWSDLParam.setOutputWsdlLocation(); IWorkspaceRoot workspace = ResourcesPlugin.getWorkspace().getRoot(); @@ -201,14 +194,15 @@ public class Skeleton2WSDLCommand extends SimpleCommand copyWSDLCommand.setWsdlURI(wsdlURL); copyWSDLCommand.setDestinationURI(outputFile.getLocation().toFile().toURL().toString()); copyWSDLCommand.setDefinition(definition); - Status status = copyWSDLCommand.execute(env); + copyWSDLCommand.setEnvironment(environment); + Status status = EnvironmentUtils.convertIStatusToStatus(copyWSDLCommand.execute(null, null)); if(status!=null && status.getSeverity()==Status.ERROR) { return status; } } catch (Exception e) { Status status = new SimpleStatus(WebServiceAxisCreationUIPlugin.ID, msgUtils_.getMessage("MSG_ERROR_WRITE_WSDL", new String[] { wsdlLocation }), Status.ERROR, e); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } return new SimpleStatus(""); diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/UpdateAxisWSDDFileTask.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/UpdateAxisWSDDFileTask.java index 9de2a11e1..38a573d54 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/UpdateAxisWSDDFileTask.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/UpdateAxisWSDDFileTask.java @@ -23,9 +23,11 @@ import javax.xml.transform.stream.StreamSource; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.IPluginRegistry; +import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; @@ -34,17 +36,14 @@ import org.eclipse.jst.ws.internal.axis.consumption.ui.util.FileUtil; import org.eclipse.jst.ws.internal.axis.creation.ui.plugin.WebServiceAxisCreationUIPlugin; import org.eclipse.jst.ws.internal.common.J2EEUtils; import org.eclipse.jst.ws.internal.common.ServerUtils; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -public class UpdateAxisWSDDFileTask extends SimpleCommand { +public class UpdateAxisWSDDFileTask extends EnvironmentalOperation { - - private final String LABEL = "TASK_LABEL_UPDATE_AXIS_WSDD"; - private final String DESCRIPTION = "TASK_DESC_UPDATE_AXIS_WSDD"; private final String DEPLOY_XSL = "deploy.xsl"; //$NON-NLS-1$ private final String DEPLOY_BAK = "deploy.wsdd.bak"; //$NON-NLS-1$ private final String CLASSNAME_PARAM = "newClassName"; //$NON-NLS-1$ @@ -61,9 +60,6 @@ public class UpdateAxisWSDDFileTask extends SimpleCommand { String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); - moduleName_ = moduleName; } @@ -71,28 +67,19 @@ public class UpdateAxisWSDDFileTask extends SimpleCommand { String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); coreMsgUtils_ = new MessageUtils( "org.eclipse.jst.ws.axis.consumption.core.consumption", this ); - setDescription(msgUtils_.getMessage(DESCRIPTION)); - setName(msgUtils_.getMessage(LABEL)); javaWSDLParam_ = javaWSDLParam; } /** * Execute UpdateAxisWSDDFileTask */ - public Status execute(Environment env) { - - // rm - /* - //Begin Setters - WebServiceElement wse = - WebServiceElement.getWebServiceElement(model_); - setServiceProject(wse.getServiceProject()); - //End Setters - */ + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); Status status = new SimpleStatus(""); if (javaWSDLParam_ == null) { status = new SimpleStatus("",coreMsgUtils_.getMessage("MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET"), Status.ERROR); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } @@ -109,7 +96,7 @@ public class UpdateAxisWSDDFileTask extends SimpleCommand { String projectURL = ServerUtils.getEncodedWebComponentURL(project, moduleName_); if (projectURL == null) { status = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_PROJECT_URL",new String[] {project.toString()}), Status.ERROR); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } else { javaWSDLParam_.setProjectURL(projectURL); @@ -123,12 +110,9 @@ public class UpdateAxisWSDDFileTask extends SimpleCommand { // return status; // } catch (Exception ex) { // status = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_INTERAL"), Status.ERROR, ex); -// env.getStatusHandler().reportError(status); +// environment.getStatusHandler().reportError(status); // return status; // } - String[] javaFiles = javaWSDLParam_.getJavaFiles(); - String javaoutput = javaWSDLParam_.getJavaOutput(); - String output = javaWSDLParam_.getOutput(); // String webContentPath = ResourceUtils.getWebModuleServerRoot(project).getLocation().toString(); String webContentPath = J2EEUtils.getWebContentContainer( project, moduleName_ ).getLocation().toString(); @@ -167,7 +151,7 @@ public class UpdateAxisWSDDFileTask extends SimpleCommand { } catch (Exception e) { String[] errorMsgStrings = new String[]{project.toString(), outputLocation.toString(), webContentPath.toString()}; status = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_UPDATE_AXIS_WSDD", errorMsgStrings), Status.ERROR, e); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/AxisBeanFragment.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/AxisBeanFragment.java deleted file mode 100644 index 346a63be8..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/AxisBeanFragment.java +++ /dev/null @@ -1,209 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean; - -import org.eclipse.jst.ws.internal.axis.consumption.core.command.AxisDeployCommand; -import org.eclipse.jst.ws.internal.axis.consumption.core.command.Java2WSDLCommand; -import org.eclipse.jst.ws.internal.axis.consumption.core.command.WSDL2JavaCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.AddJarsToProjectBuildPathTask; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CheckAxisDeploymentDescriptorsTask; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CopyAxisJarCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.RefreshProjectCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.JavaToWSDLMethodCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.UpdateWEBXMLCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.DefaultsForServerJavaWSDLCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.LiteralSupportMessageTask; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.MoveJavaFilesTask; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.UpdateAxisWSDDFileTask; -import org.eclipse.jst.ws.internal.common.StringToIProjectTransformer; -import org.eclipse.jst.ws.internal.consumption.command.common.BuildProjectCommand; -import org.eclipse.jst.ws.internal.consumption.command.common.StartProjectCommand; -import org.eclipse.jst.ws.internal.consumption.ui.command.WSINonCompliantRuntimeCommand; -import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ServerExtensionDefaultingCommand; -import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ServerExtensionOutputCommand; -import org.eclipse.jst.ws.internal.consumption.ui.widgets.object.ObjectSelectionOutputCommand; -import org.eclipse.wst.command.internal.env.common.WaitForAutoBuildCommand; -import org.eclipse.wst.command.internal.env.core.fragment.BooleanFragment; -import org.eclipse.wst.command.internal.env.core.fragment.SequenceFragment; -import org.eclipse.wst.command.internal.env.core.fragment.SimpleFragment; -import org.eclipse.wst.command.internal.env.ui.widgets.SelectionCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Condition; -import org.eclipse.wst.command.internal.provisional.env.core.data.DataMappingRegistry; - - -public class AxisBeanFragment extends SequenceFragment -{ - - public AxisBeanFragment() - { - add( new SimpleFragment( new ValidateObjectSelectionCommand(), "")); - add( new SimpleFragment( new BUAxisDefaultingCommand(), "" ) ); - add( new BUAxisCommandsFragment1()); - add( new BUAxisCommandsFragment2()); - add( new SimpleFragment( "BeanConfig" ) ); - add( new MappingFragment() ); - add( new BUAxisCommandsFragment3()); - } - - public void registerDataMappings(DataMappingRegistry registry) - { - //ValidateObjectSelectionCommand - registry.addMapping(ObjectSelectionOutputCommand.class, "ObjectSelection", ValidateObjectSelectionCommand.class); - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", ValidateObjectSelectionCommand.class,"ServiceProjectName", null ); - - //BUAxisDefaultingCommand - registry.addMapping(SelectionCommand.class, "InitialSelection", BUAxisDefaultingCommand.class ); - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServiceTypeRuntimeServer", BUAxisDefaultingCommand.class ); - - //WSINonCompliantRuntimeCommand - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", WSINonCompliantRuntimeCommand.class, "ServiceProject", new StringToIProjectTransformer()); - - //BUAxisCommands2 - these run after BeanClassWidget - //DefaultsForServerJavaWSDLCommand - registry.addMapping(BUAxisDefaultingCommand.class, "JavaWSDLParam", DefaultsForServerJavaWSDLCommand.class); - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", DefaultsForServerJavaWSDLCommand.class, "ServiceProject", new StringToIProjectTransformer()); - registry.addMapping(BUAxisDefaultingCommand.class, "JavaBeanName", DefaultsForServerJavaWSDLCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "Parser", DefaultsForServerJavaWSDLCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "CustomizeServiceMappings", AxisBeanFragment.MappingFragment.class); - - //JavaWSDLMethodCommand - registry.addMapping(DefaultsForServerJavaWSDLCommand.class, "JavaWSDLParam", JavaToWSDLMethodCommand.class); - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", JavaToWSDLMethodCommand.class, "ServiceProject", new StringToIProjectTransformer()); - - // BUAxisCommands3 - these run after BeanConfigWidget - //LiteralSupportMessageTask - registry.addMapping(JavaToWSDLMethodCommand.class, "JavaWSDLParam", LiteralSupportMessageTask.class); - - //CheckAxisDeploymentDescriptorsTask - //registry.addMapping(JavaToWSDLMethodCommand.class, "JavaWSDLParam", CheckAxisDeploymentDescriptorsTask.class); - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", CheckAxisDeploymentDescriptorsTask.class, "ServerProject", new StringToIProjectTransformer()); - - //CopyAxisJarCommand - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", CopyAxisJarCommand.class, "Project", new StringToIProjectTransformer()); - - //AddJarsToProjectBuildPathTask - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", AddJarsToProjectBuildPathTask.class, "Project", new StringToIProjectTransformer()); - - //Java2WSDLCommand - registry.addMapping(JavaToWSDLMethodCommand.class, "JavaWSDLParam", Java2WSDLCommand.class); - - //RefreshProjectCommand - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", RefreshProjectCommand.class, "Project", new StringToIProjectTransformer()); - - //WSDL2JavaCommand - registry.addMapping(JavaToWSDLMethodCommand.class, "JavaWSDLParam", WSDL2JavaCommand.class); - - - //MoveJavaFilesTask - registry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", MoveJavaFilesTask.class); - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", MoveJavaFilesTask.class, "ServiceProject", new StringToIProjectTransformer()); - - //UpdateAxisWSDDFileTask - registry.addMapping(MoveJavaFilesTask.class, "JavaWSDLParam", UpdateAxisWSDDFileTask.class); - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", UpdateAxisWSDDFileTask.class, "ServiceProject", new StringToIProjectTransformer()); - - //UpdateWEBXMLCommand - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", UpdateWEBXMLCommand.class, "ServerProject", new StringToIProjectTransformer()); - - //BuildProjectCommand - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", BuildProjectCommand.class, "Project", new StringToIProjectTransformer()); - registry.addMapping(BUAxisDefaultingCommand.class, "ForceBuild", BuildProjectCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "ValidationManager", BuildProjectCommand.class); - - //StartProjectCommand - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", StartProjectCommand.class, "ServiceProject", new StringToIProjectTransformer()); - registry.addMapping(BUAxisDefaultingCommand.class, "SampleProject", StartProjectCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "ServiceServerTypeID", StartProjectCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "SampleServerTypeID", StartProjectCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "ServiceExistingServer", StartProjectCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "SampleExistingServer", StartProjectCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "IsWebProjectStartupRequested",StartProjectCommand.class); - - //AxisDeployCommand - registry.addMapping(UpdateAxisWSDDFileTask.class, "JavaWSDLParam", AxisDeployCommand.class); - - //CopyAxisServerConfigTask - /* - registry.addMapping(UpdateAxisWSDDFileTask.class, "JavaWSDLParam", CopyAxisServerConfigTask.class); - registry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", CopyAxisServerConfigTask.class, "ServiceProject", new StringToIProjectTransformer()); - registry.addMapping(BUAxisDefaultingCommand.class, "ServiceExistingServer", CopyAxisServerConfigTask.class); - registry.addMapping(BUAxisDefaultingCommand.class, "ServiceServerTypeID", CopyAxisServerConfigTask.class); - */ - - // ServerExtensionOutputCommand - registry.addMapping(Java2WSDLCommand.class, "WsdlURI", ServerExtensionOutputCommand.class); - } - - private class BUAxisCommandsFragment1 extends SequenceFragment - { - public BUAxisCommandsFragment1() - { - add(new SimpleFragment(new WSINonCompliantRuntimeCommand(), "")); - } - } - - private class BUAxisCommandsFragment2 extends SequenceFragment - { - public BUAxisCommandsFragment2() - { - //add(new SimpleFragment(new DefaultsForServerJavaWSDLCommand(), "")); - add(new SimpleFragment(new JavaToWSDLMethodCommand(), "")); - } - } - - private class BUAxisCommandsFragment3 extends SequenceFragment - { - public BUAxisCommandsFragment3() - { - add(new SimpleFragment(new LiteralSupportMessageTask(), "")); - //add(new SimpleFragment(new CheckAxisDeploymentDescriptorsTask(), "")); - //add(new SimpleFragment(new CopyAxisJarCommand(), "")); - add(new SimpleFragment(new AddJarsToProjectBuildPathTask(), "")); - add(new SimpleFragment(new WaitForAutoBuildCommand(), "" )); - add(new SimpleFragment(new Java2WSDLCommand(), "")); - add(new SimpleFragment(new RefreshProjectCommand(), "")); - add(new SimpleFragment(new WSDL2JavaCommand(), "")); - add(new SimpleFragment(new MoveJavaFilesTask(), "")); - //add(new SimpleFragment(new UpdateAxisWSDDFileTask(), "")); - //add(new SimpleFragment(new UpdateWEBXMLCommand(), "")); - add(new SimpleFragment(new RefreshProjectCommand(), "")); - add(new SimpleFragment(new BuildProjectCommand(), "")); - //add(new SimpleFragment(new StartProjectCommand(), "")); - add(new SimpleFragment(new AxisDeployCommand(), "")); - //add(new SimpleFragment(new CopyAxisServerConfigTask(), "")); - add(new SimpleFragment(new RefreshProjectCommand(), "")); - } - } - - public class MappingFragment extends BooleanFragment - { - private boolean showMappings_; - - public MappingFragment() - { - super(); - - setTrueFragment( new SimpleFragment( "AxisServiceBeanMapping" )); - setCondition( new Condition() - { - public boolean evaluate() - { - return showMappings_; - } - } ); - } - - public void setCustomizeServiceMappings( boolean showMappings ) - { - showMappings_ = showMappings; - } - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BUAxisDefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BUAxisDefaultingCommand.java index 417e21b01..3b13f84ff 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BUAxisDefaultingCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BUAxisDefaultingCommand.java @@ -13,13 +13,15 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.common.ResourceUtils; import org.eclipse.jst.ws.internal.consumption.common.JavaResourceFilter; import org.eclipse.jst.ws.internal.consumption.datamodel.validate.ValidationManager; -import org.eclipse.jst.ws.internal.data.TypeRuntimeServer; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; @@ -31,15 +33,13 @@ import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; /** * */ -public class BUAxisDefaultingCommand extends SimpleCommand +public class BUAxisDefaultingCommand extends EnvironmentalOperation { //Need private IStructuredSelection initialSelection_; - private TypeRuntimeServer serviceIds_; //Provide private IServer serviceExistingServer_; - private String serviceServerTypeID_; // rsk revisit private JavaWSDLParameter javaWSDLParam_; private String javaBeanName_; private WebServicesParser parser_; @@ -61,8 +61,9 @@ public class BUAxisDefaultingCommand extends SimpleCommand private MessageUtils msgUtils_; - public Status execute(Environment env) - { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; msgUtils_ = new MessageUtils( pluginId + ".plugin", this ); @@ -94,18 +95,18 @@ public class BUAxisDefaultingCommand extends SimpleCommand Status status = new SimpleStatus("BUAxisDefaultingCommand", //$NON-NLS-1$ msgUtils_.getMessage("MSG_ERROR_CANNOT_NO_JAVA_BEAN"), //$NON-NLS-1$ Status.ERROR); - env.getStatusHandler().reportError(status); + environment.getStatusHandler().reportError(status); return status; } // try { // -// javaBeanName_ = getJavaBeanFromInitialSelection(env); +// javaBeanName_ = getJavaBeanFromInitialSelection(environment); // // } catch (CoreException e) { // Status status = new SimpleStatus("BUAxisDefaultingCommand", //$NON-NLS-1$ // msgUtils_.getMessage("MSG_ERROR_INITIAL_SELECTION") + " " //$NON-NLS-1$ // +e.getCause().toString(), Status.ERROR); -// env.getStatusHandler().reportError(status); +// environment.getStatusHandler().reportError(status); // return status; // } diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/DefaultsForConfig.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/DefaultsForConfig.java deleted file mode 100644 index e96b20ea4..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/DefaultsForConfig.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean; - -import java.util.Hashtable; - -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; - - -public class DefaultsForConfig extends SimpleCommand -{ - public JavaWSDLParameter getJavaParameter() - { - JavaWSDLParameter parameter = new JavaWSDLParameter(); - Hashtable methods = new Hashtable(); - - methods.put( "method1", new Boolean( true ) ); - methods.put( "method2", new Boolean( false ) ); - methods.put( "method3", new Boolean( true ) ); - - parameter.setMethods( methods ); - parameter.setOutputWsdlLocation( "/SomeProj/SomeFolder/SomeFile" ); - parameter.setUrlLocation( "SomeURLLocation" ); - parameter.setStyle( JavaWSDLParameter.STYLE_DOCUMENT ); - - return parameter; - } - - public boolean getCustomizeServiceMappings() - { - return true; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/ValidateObjectSelectionCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/ValidateObjectSelectionCommand.java index 6ce5371e2..af2047d8f 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/ValidateObjectSelectionCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/ValidateObjectSelectionCommand.java @@ -13,6 +13,9 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jem.internal.plugin.JavaEMFNature; import org.eclipse.jem.java.JavaClass; import org.eclipse.jem.java.impl.JavaClassImpl; @@ -20,14 +23,14 @@ import org.eclipse.jem.util.emf.workbench.ProjectUtilities; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jst.ws.internal.common.ResourceUtils; import org.eclipse.jst.ws.internal.consumption.common.JavaResourceFilter; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; import org.eclipse.wst.command.internal.provisional.env.core.common.MessageUtils; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -public class ValidateObjectSelectionCommand extends SimpleCommand +public class ValidateObjectSelectionCommand extends EnvironmentalOperation { private String JAVA_EXTENSION = ".java"; //$NON-NLS-1$ private String CLASS_EXTENSION = ".class"; //$NON-NLS-1$ @@ -45,8 +48,9 @@ public class ValidateObjectSelectionCommand extends SimpleCommand String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; msgUtils_ = new MessageUtils(pluginId + ".plugin", this); } - public Status execute(Environment env) - { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { + Environment environment = getEnvironment(); //Make sure a bean is selected String javaBeanName = null; if (objectSelection != null && !objectSelection.isEmpty()) @@ -68,7 +72,7 @@ public class ValidateObjectSelectionCommand extends SimpleCommand } catch (CoreException ce) { Status errorStatus = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_CANNOT_NO_JAVA_BEAN"),Status.ERROR); - env.getStatusHandler().reportError(errorStatus); + environment.getStatusHandler().reportError(errorStatus); return errorStatus; } } @@ -77,7 +81,7 @@ public class ValidateObjectSelectionCommand extends SimpleCommand if (javaBeanName==null || javaBeanName.length()==0) { Status errorStatus = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_CANNOT_NO_JAVA_BEAN"),Status.ERROR); - env.getStatusHandler().reportError(errorStatus); + environment.getStatusHandler().reportError(errorStatus); return errorStatus; } @@ -86,7 +90,7 @@ public class ValidateObjectSelectionCommand extends SimpleCommand if (serviceProject==null) { Status errorStatus = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_NO_PROJECT"),Status.ERROR); - env.getStatusHandler().reportError(errorStatus); + environment.getStatusHandler().reportError(errorStatus); return errorStatus; } @@ -103,13 +107,13 @@ public class ValidateObjectSelectionCommand extends SimpleCommand if (!javaClass.isExistingType()) { Status errorStatus = new SimpleStatus("JavaToWSDLMethodCommand", msgUtils_.getMessage("MSG_ERROR_CANNOT_LOAD_JAVA_BEAN", new String[] { javaBeanName, serviceProjectName }),Status.ERROR); - env.getStatusHandler().reportError(errorStatus); + environment.getStatusHandler().reportError(errorStatus); return errorStatus; } } catch (CoreException ce) { Status errorStatus = new SimpleStatus("JavaToWSDLMethodCommand", msgUtils_.getMessage("MSG_ERROR_CANNOT_LOAD_JAVA_BEAN", new String[] { javaBeanName, serviceProjectName }),Status.ERROR); - env.getStatusHandler().reportError(errorStatus); + environment.getStatusHandler().reportError(errorStatus); return errorStatus; } diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonDefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonDefaultingCommand.java index 0b6a14d97..fe1a47705 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonDefaultingCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonDefaultingCommand.java @@ -11,26 +11,26 @@ package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton; import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.consumption.common.WSDLParserFactory; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; -import org.eclipse.wst.command.internal.provisional.env.core.common.Status; import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; -public class AxisSkeletonDefaultingCommand extends SimpleCommand +public class AxisSkeletonDefaultingCommand extends EnvironmentalOperation { private IStructuredSelection initialSelection; - private IStructuredSelection objectSelection; private WebServicesParser webServicesParser; private String wsdlURI_; private JavaWSDLParameter javaWSDLParam; - public Status execute(Environment env){ - + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { javaWSDLParam = new JavaWSDLParameter(); javaWSDLParam.setServerSide(JavaWSDLParameter.SERVER_SIDE_BEAN); javaWSDLParam.setSkeletonDeploy(true); @@ -46,7 +46,6 @@ public class AxisSkeletonDefaultingCommand extends SimpleCommand public void setObjectSelection(IStructuredSelection objectSelection) { - this.objectSelection = objectSelection; } public void setWebServicesParser(WebServicesParser webServicesParser) @@ -83,15 +82,6 @@ public class AxisSkeletonDefaultingCommand extends SimpleCommand public String getWsdlURI() { -// if (objectSelection != null && !objectSelection.isEmpty()) -// { -// Object object = objectSelection.getFirstElement(); -// if (object instanceof IResource) -// return ((IResource)object).getLocation().toString(); -// else -// return object.toString(); -// } -// return ""; return wsdlURI_; } diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonFragment.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonFragment.java deleted file mode 100644 index 7e86a18a0..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonFragment.java +++ /dev/null @@ -1,138 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton; - -import org.eclipse.jst.ws.internal.axis.consumption.core.command.AxisDeployCommand; -import org.eclipse.jst.ws.internal.axis.consumption.core.command.WSDL2JavaCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.AddJarsToProjectBuildPathTask; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CheckAxisDeploymentDescriptorsTask; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CopyAxisJarCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.RefreshProjectCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.ValidateWSDLCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisMappingsFragment; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.ComputeAxisSkeletonBeanCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.UpdateWEBXMLCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.MoveDeploymentFilesTask; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.Skeleton2WSDLCommand; -import org.eclipse.jst.ws.internal.consumption.command.common.BuildProjectCommand; -import org.eclipse.jst.ws.internal.consumption.command.common.StartProjectCommand; -import org.eclipse.jst.ws.internal.consumption.ui.command.OpenJavaEditorCommand; -import org.eclipse.jst.ws.internal.consumption.ui.command.data.ProjectName2IProjectTransformer; -import org.eclipse.jst.ws.internal.consumption.ui.command.data.ServerName2IServerTransformer; -import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ServerExtensionDefaultingCommand; -import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ServerExtensionOutputCommand; -import org.eclipse.jst.ws.internal.consumption.ui.widgets.object.ObjectSelectionOutputCommand; -import org.eclipse.wst.command.internal.env.core.fragment.SequenceFragment; -import org.eclipse.wst.command.internal.env.core.fragment.SimpleFragment; -import org.eclipse.wst.command.internal.env.ui.widgets.SelectionCommand; -import org.eclipse.wst.command.internal.provisional.env.core.data.DataMappingRegistry; - -public class AxisSkeletonFragment extends SequenceFragment -{ - public AxisSkeletonFragment() - { - add( new SimpleFragment( new AxisSkeletonDefaultingCommand(), "" ) ); - add( new SimpleFragment( new ValidateWSDLCommand(), "")); - //add( new SimpleFragment( new SkeletonConfigWidgetDefaultingCommand(), "")); - add( new SimpleFragment( "SkeletonConfig") ); - add( new AxisMappingsFragment() ); - //add( new SimpleFragment( new CheckAxisDeploymentDescriptorsTask(), "")); - add( new SimpleFragment( new AddJarsToProjectBuildPathTask(), "")); - //add( new SimpleFragment( new CopyAxisJarCommand(), "")); - add( new SimpleFragment( new WSDL2JavaCommand(), "")); - //add( new SimpleFragment( new MoveDeploymentFilesTask(), "")); - //add( new SimpleFragment( new Skeleton2WSDLCommand(), "")); - //add( new SimpleFragment( new UpdateWEBXMLCommand(), "")); - add( new SimpleFragment( new RefreshProjectCommand(), "")); - add( new SimpleFragment( new BuildProjectCommand(), "")); - //add( new SimpleFragment( new StartProjectCommand(), "")); - // the second build project command is needed to synchronize with workspace auto build - add( new SimpleFragment( new BuildProjectCommand(), "")); - add( new SimpleFragment( new AxisDeployCommand(), "")); - add( new SimpleFragment( new RefreshProjectCommand(), "")); - add (new SimpleFragment( new ComputeAxisSkeletonBeanCommand(), "")); - add( new SimpleFragment( new OpenJavaEditorCommand(), "")); - } - - /* (non-Javadoc) - * @see org.eclipse.wst.command.internal.env.core.fragment.CommandFragment#registerDataMappings(org.eclipse.wst.command.internal.provisional.env.core.data.DataMappingRegistry) - */ - public void registerDataMappings(DataMappingRegistry dataRegistry) - { - // Transformers - ProjectName2IProjectTransformer projectTransformer = new ProjectName2IProjectTransformer(); - - dataRegistry.addMapping(SelectionCommand.class, "InitialSelection", AxisSkeletonDefaultingCommand.class); - dataRegistry.addMapping(ObjectSelectionOutputCommand.class, "ObjectSelection", AxisSkeletonDefaultingCommand.class); - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "WebServicesParser", AxisSkeletonDefaultingCommand.class); - - // ValidateWSDLCommand - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WebServicesParser", ValidateWSDLCommand.class); - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WsdlURI", ValidateWSDLCommand.class); - - // SkeletonConfigWidgetDefaultingCommand - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", SkeletonConfigWidgetDefaultingCommand.class); - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WsdlURI", SkeletonConfigWidgetDefaultingCommand.class); - - // CheckAxisDeploymentDescriptorsTask - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", CheckAxisDeploymentDescriptorsTask.class, "ServerProject", projectTransformer); - - // AddJarsToProjectBuildPathTask - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", AddJarsToProjectBuildPathTask.class, "Project", projectTransformer); - - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WsdlURI", WSDL2JavaCommand.class); - //dataRegistry.addMapping(WSDLSelectionTreeWidget.class, "WsdlURI", WSDL2JavaCommand.class); - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "HttpBasicAuthUsername", WSDL2JavaCommand.class); - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "HttpBasicAuthPassword", WSDL2JavaCommand.class); - - // MoveDeploymentFilesTask - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", MoveDeploymentFilesTask.class, "ServerProject", projectTransformer); - dataRegistry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", MoveDeploymentFilesTask.class); - - // CopyAxisJarCommand - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", CopyAxisJarCommand.class, "Project", projectTransformer); - - // Skeleton2WSDLCommand - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WebServicesParser", Skeleton2WSDLCommand.class); - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", Skeleton2WSDLCommand.class, "ServerProject", projectTransformer); - dataRegistry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", Skeleton2WSDLCommand.class); - - // UpdateWEBXMLCommand - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", UpdateWEBXMLCommand.class, "ServerProject", projectTransformer); - - // RefreshProjectCommand - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", RefreshProjectCommand.class, "Project", projectTransformer); - - // BuildProjectCommand - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", BuildProjectCommand.class, "Project", projectTransformer); - - // StartProjectCommand - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", StartProjectCommand.class, "ServiceProject", projectTransformer); - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerServer", StartProjectCommand.class, "ServiceExistingServer", new ServerName2IServerTransformer()); - dataRegistry.addMapping(CopyAxisJarCommand.class, "ProjectRestartRequired", StartProjectCommand.class, "IsWebProjectStartupRequested", null); - - // AxisDeployCommand - dataRegistry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", AxisDeployCommand.class); - - // ServerExtensionOutputCommand - dataRegistry.addMapping(Skeleton2WSDLCommand.class, "WsdlURI", ServerExtensionOutputCommand.class); - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WebServicesParser", ServerExtensionOutputCommand.class); - - // ComputeAxisSkeletonBeanCommand - dataRegistry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", ComputeAxisSkeletonBeanCommand.class); - //dataRegistry.addMapping(Skeleton2WSDLCommand.class, "WsdlURI", ComputeAxisSkeletonBeanCommand.class); - //dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WebServicesParser", ComputeAxisSkeletonBeanCommand.class); - - // OpenJavaEditorCommand - dataRegistry.addMapping(ComputeAxisSkeletonBeanCommand.class, "ClassNames", OpenJavaEditorCommand.class); - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", OpenJavaEditorCommand.class, "Project", projectTransformer); - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidgetDefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidgetDefaultingCommand.java index d930940f6..f9941fb83 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidgetDefaultingCommand.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidgetDefaultingCommand.java @@ -15,16 +15,17 @@ import java.net.MalformedURLException; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; import org.eclipse.jst.ws.internal.common.J2EEUtils; import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.wst.command.internal.provisional.env.core.SimpleCommand; -import org.eclipse.wst.command.internal.provisional.env.core.common.Environment; +import org.eclipse.wst.command.internal.provisional.env.core.EnvironmentalOperation; import org.eclipse.wst.command.internal.provisional.env.core.common.SimpleStatus; -import org.eclipse.wst.command.internal.provisional.env.core.common.Status; -public class SkeletonConfigWidgetDefaultingCommand extends SimpleCommand +public class SkeletonConfigWidgetDefaultingCommand extends EnvironmentalOperation { private String wsdlURI; private IProject serverProject; @@ -36,8 +37,8 @@ public class SkeletonConfigWidgetDefaultingCommand extends SimpleCommand moduleName_ = moduleName; } - public Status execute(Environment env) - { + public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) + { String root = getRootURL(); javaWSDLParam.setOutput( root + getOutputWSDLFolder()); javaWSDLParam.setJavaOutput(root + getOutputJavaFolder()); diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/beans/WSBeanAxisType.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/beans/WSBeanAxisType.java index 38bf3351c..0d9487c79 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/beans/WSBeanAxisType.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/beans/WSBeanAxisType.java @@ -19,13 +19,12 @@ import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisMappingsWidge import org.eclipse.jst.ws.internal.axis.creation.ui.command.JavaToWSDLMethodCommand; import org.eclipse.jst.ws.internal.axis.creation.ui.plugin.WebServiceAxisCreationUIPlugin; import org.eclipse.jst.ws.internal.axis.creation.ui.task.DefaultsForServerJavaWSDLCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean.AxisBeanFragment; import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean.BeanConfigWidget; import org.eclipse.jst.ws.internal.consumption.common.JavaResourceFilter; import org.eclipse.jst.ws.internal.consumption.ui.widgets.object.ObjectSelectionWidget; -import org.eclipse.jst.ws.internal.consumption.ui.wizard.WebServiceServerRuntimeType; import org.eclipse.wst.command.internal.env.core.fragment.CommandFragment; import org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentFactory; +import org.eclipse.wst.command.internal.env.core.fragment.SimpleFragment; import org.eclipse.wst.command.internal.env.ui.widgets.CanFinishRegistry; import org.eclipse.wst.command.internal.env.ui.widgets.CommandWidgetBinding; import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributor; @@ -37,10 +36,10 @@ import org.eclipse.wst.command.internal.provisional.env.core.data.DataMappingReg /** * This is the class for the -* Java Bean -* {@link org.eclipse.jst.ws.was.creation.ui.wizard.WebServiceServerRuntimeType WebServiceServerRuntimeType}. +* Axis bottom up Java Bean scenario +* */ -public class WSBeanAxisType implements WebServiceServerRuntimeType, CommandWidgetBinding +public class WSBeanAxisType implements CommandWidgetBinding { private JavaResourceFilter filter_ = new JavaResourceFilter(); private String serverName_; @@ -182,9 +181,6 @@ public class WSBeanAxisType implements WebServiceServerRuntimeType, CommandWidge dataRegistry.addMapping(BeanConfigWidget.class, "JavaParameter", AddJarsToProjectBuildPathTask.class, "JavaWSDLParam", null); dataRegistry.addMapping(BeanConfigWidget.class, "JavaParameter", Java2WSDLCommand.class, "JavaWSDLParam", null); dataRegistry.addMapping(BeanConfigWidget.class, "JavaParameter", WSDL2JavaCommand.class, "JavaWSDLParam", null); - - //MappingFragment (optionally displays the AxisMappingsWidget) - dataRegistry.addMapping(BeanConfigWidget.class, "CustomizeServiceMappings", AxisBeanFragment.MappingFragment.class); //AxisMappingsWidget - as target dataRegistry.addMapping(BeanConfigWidget.class, "JavaParameter", AxisMappingsWidget.class); @@ -255,7 +251,8 @@ public class WSBeanAxisType implements WebServiceServerRuntimeType, CommandWidge { public CommandFragment create() { - return new AxisBeanFragment(); + //dead code - doesn't matter what gets returned here. + return new SimpleFragment(); } }; } diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/wsdl/WSWSDLAxisType.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/wsdl/WSWSDLAxisType.java index 1114fde6f..d8bd58d2a 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/wsdl/WSWSDLAxisType.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/wsdl/WSWSDLAxisType.java @@ -16,15 +16,14 @@ import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisMappingsFragm import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisMappingsWidget; import org.eclipse.jst.ws.internal.axis.creation.ui.plugin.WebServiceAxisCreationUIPlugin; import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.AxisSkeletonDefaultingCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.AxisSkeletonFragment; import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.SkeletonConfigWidget; import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.SkeletonConfigWidgetDefaultingCommand; import org.eclipse.jst.ws.internal.consumption.common.WSDLResourceFilter; import org.eclipse.jst.ws.internal.consumption.ui.command.data.ProjectName2IProjectTransformer; import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ServerExtensionDefaultingCommand; -import org.eclipse.jst.ws.internal.consumption.ui.wizard.WebServiceServerRuntimeType; import org.eclipse.wst.command.internal.env.core.fragment.CommandFragment; import org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentFactory; +import org.eclipse.wst.command.internal.env.core.fragment.SimpleFragment; import org.eclipse.wst.command.internal.env.ui.widgets.CanFinishRegistry; import org.eclipse.wst.command.internal.env.ui.widgets.CommandWidgetBinding; import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributor; @@ -36,7 +35,7 @@ import org.eclipse.wst.command.internal.provisional.env.core.data.DataMappingReg /** * This is the class for the Axis Web service type. */ -public class WSWSDLAxisType implements WebServiceServerRuntimeType, CommandWidgetBinding +public class WSWSDLAxisType implements CommandWidgetBinding { private WSDLResourceFilter filter_ = new WSDLResourceFilter(); @@ -239,7 +238,8 @@ public class WSWSDLAxisType implements WebServiceServerRuntimeType, CommandWidge { public CommandFragment create() { - return new AxisSkeletonFragment(); + //dead code - doesn't matter what gets returned here. + return new SimpleFragment(); } }; } diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebService.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebService.java index 6c8bfc2fb..1fc8b5940 100644 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebService.java +++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebService.java @@ -24,7 +24,6 @@ import org.eclipse.jst.ws.internal.axis.creation.ui.task.MoveJavaFilesTask; import org.eclipse.jst.ws.internal.axis.creation.ui.task.Skeleton2WSDLCommand; import org.eclipse.jst.ws.internal.axis.creation.ui.task.TDCheckAxisDeploymentDescriptors; import org.eclipse.jst.ws.internal.axis.creation.ui.task.UpdateAxisWSDDFileTask; -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean.AxisBeanFragment; import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean.BUAxisDefaultingCommand; import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.AxisSkeletonDefaultingCommand; import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.SkeletonConfigWidgetDefaultingCommand; @@ -177,7 +176,6 @@ public class AxisWebService extends AbstractWebService registry.addMapping(BUAxisInputCommand.class, "ServerProject", DefaultsForServerJavaWSDLCommand.class, "ServiceProject", new StringToIProjectTransformer()); registry.addMapping(BUAxisDefaultingCommand.class, "JavaBeanName", DefaultsForServerJavaWSDLCommand.class); registry.addMapping(BUAxisDefaultingCommand.class, "Parser", DefaultsForServerJavaWSDLCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "CustomizeServiceMappings", AxisBeanFragment.MappingFragment.class); //JavaWSDLMethodCommand registry.addMapping(DefaultsForServerJavaWSDLCommand.class, "JavaWSDLParam", JavaToWSDLMethodCommand.class); |