Author: dennyxu
Date: 2009-10-16 04:47:57 -0400 (Fri, 16 Oct 2009)
New Revision: 18122
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSFacetInstallPage.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSRuntimeConfigBlock.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/CodeGenConfigWidget.java
Log:
JBIDE-5035: Add support for the option "--extension" in wsconsume command
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2009-10-16 08:19:05 UTC (rev
18121)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2009-10-16 08:47:57 UTC (rev
18122)
@@ -1,40 +1,49 @@
<plugin>
<extension
point="org.eclipse.wst.common.project.facet.core.facets">
- <category id="jbossws.category">
- <label>%JBOSSWS_CATOGERY_LABEL</label>
- <description>%JBOSSWS_CATOGERY_DISCRIPTION</description>
- </category>
<project-facet id="jbossws.core">
<label>%JBOSSWS_FACET_CORE_LABEL</label>
<description>%JBOSSWS_FACET_CORE_DISCRIPTION</description>
- <member category="jbossws.category "/>
</project-facet>
<project-facet-version facet="jbossws.core" version="2.0">
<constraint>
<requires facet="jst.web" version="2.2,2.3,2.4,2.5"/>
</constraint>
- <action
- facet="jbossws.core"
- id="jbossws.core.install"
- type="INSTALL">
- <delegate
class="org.jboss.tools.ws.core.facet.delegate.JBossWSInstallRuntimeDelegate"/>
- <config-factory
-
class="org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider">
- </config-factory>
- </action>
- <action
- facet="jbossws.core"
- id="jbossws.core.uninstall"
- type="UNINSTALL">
- <delegate
-
class="org.jboss.tools.ws.core.facet.delegate.JBossWSUnInstallRuntimeDelegate">
- </delegate>
- </action>
</project-facet-version>
+ <project-facet-version
+ facet="jbossws.core"
+ version="3.0">
+ <constraint>
+ <requires
+ facet="jst.web"
+ version="2.2,2.3,2.4,2.5">
+ </requires>
+ </constraint>
+ </project-facet-version>
+ <action
+ facet="jbossws.core"
+ id="jbossws.core.install"
+ type="INSTALL"
+ version="2.0,3.0">
+ <delegate
+
class="org.jboss.tools.ws.core.facet.delegate.JBossWSInstallRuntimeDelegate">
+ </delegate>
+ <config-factory
+
class="org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider">
+ </config-factory>
+ </action>
+ <action
+ facet="jbossws.core"
+ id="jbossws.core.uninstall"
+ type="UNINSTALL"
+ version="2.0,3.0">
+ <delegate
+
class="org.jboss.tools.ws.core.facet.delegate.JBossWSUnInstallRuntimeDelegate">
+ </delegate>
+ </action>
</extension>
<extension
point="org.eclipse.wst.common.project.facet.core.runtimes">
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2009-10-16
08:19:05 UTC (rev 18121)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2009-10-16
08:47:57 UTC (rev 18122)
@@ -38,7 +38,8 @@
Export-Package: org.jboss.tools.ws.creation.core,
org.jboss.tools.ws.creation.core.commands,
org.jboss.tools.ws.creation.core.data,
- org.jboss.tools.ws.creation.core.messages
+ org.jboss.tools.ws.creation.core.messages,
+ org.jboss.tools.ws.creation.core.utils
Bundle-ClassPath: lib/wsdl4j.jar,
.
Bundle-Localization: plugin
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java 2009-10-16
08:19:05 UTC (rev 18121)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java 2009-10-16
08:47:57 UTC (rev 18122)
@@ -9,7 +9,6 @@
import java.util.List;
import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.internal.utils.Policy;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java 2009-10-16
08:19:05 UTC (rev 18121)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java 2009-10-16
08:47:57 UTC (rev 18122)
@@ -4,6 +4,7 @@
import java.util.List;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
+import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
public class WSDL2JavaCommand extends AbstractGenerateCodeCommand{
@@ -54,6 +55,10 @@
command.add("-t"); //$NON-NLS-1$
command.add(model.getTarget());
}
+
+ if(model.enableSOAP12() &&
JBossWSCreationUtils.supportSOAP12(model.getWebProjectName())){
+ command.add("-e"); //$NON-NLS-1$
+ }
}
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java 2009-10-16
08:19:05 UTC (rev 18121)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java 2009-10-16
08:47:57 UTC (rev 18122)
@@ -18,6 +18,7 @@
private boolean isGenWSDL;
private String target;
private int wsScenario;
+ private boolean extension;
public int getWsScenario() {
return wsScenario;
@@ -156,4 +157,12 @@
public void setUpdateWebxml(boolean updateWebxml){
this.UpdateWebxml = updateWebxml;
}
+
+ public boolean enableSOAP12(){
+ return extension;
+ }
+
+ public void setEnableSOAP12(boolean enable){
+ this.extension = enable;
+ }
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2009-10-16
08:19:05 UTC (rev 18121)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2009-10-16
08:47:57 UTC (rev 18122)
@@ -38,13 +38,15 @@
Error_Create_Client_Sample=When create a client sample, a error comes up. Please check
the generated files.
-Error_WS_Chose_runtime=Select an JBoss Web Service runtime. If a server supplied JBoss
Web Service runtime is chosen ,\n the chosen server adapter must be capable of providing
the JBoss Web Service runtime
+Error_WS_Chose_runtime=Select a JBoss Web Service runtime. If a server supplied JBoss
Web Service runtime is chosen ,\n the chosen server adapter must be capable of providing
the JBoss Web Service runtime
Error_WS_No_Runtime_Specifed=A JBossWS runtime has not been chosen
-JBossWSFacetInstallPage_Title=JBossWS Facet
-JBossWSFacetInstallPage_Description=Select JBossWS Web Service runtime
+JBossWSFacetInstallPage_Title=JBossWS Facet {0}
+JBossWSFacetInstallPage_Description=Select JBossWS {0} Web Service runtime
JBossWSFacetInstallPage_ServerSuppliedJBossWS=Server Supplied JBossWS Runtime
JBossWSFacetInstallPage_Deploy= Package all JBossWS runtime jars into the deployment
archive
JBossWSFacetInstallPage_New=New...
JBossWSRuntimeConfigBlock_Duplicated_Jar=Duplicated jar on classpath:{0}
+JBossWSRuntimeInstallPage_NoTargetRuntime=Please the specify project target runtime.
+JBossWSRuntimeInstallPage_NoValidJBossWSRuntime=The specified target runtime should be
JBoss AS 5.0 or later.
Client_Sample_Run_Over= Call Over!
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2009-10-16
08:19:05 UTC (rev 18121)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2009-10-16
08:47:57 UTC (rev 18122)
@@ -16,6 +16,8 @@
public static String JBossWSFacetInstallPage_Title;
public static String JBossWSRuntimeConfigBlock_Duplicated_Jar;
+ public static String JBossWSRuntimeInstallPage_NoTargetRuntime;
+ public static String JBossWSRuntimeInstallPage_NoValidJBossWSRuntime;
public static String Label_Custom_Package_Name;
public static String Label_Catalog_File;
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java 2009-10-16
08:19:05 UTC (rev 18121)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java 2009-10-16
08:47:57 UTC (rev 18122)
@@ -45,13 +45,17 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jst.ws.internal.common.J2EEUtils;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.tools.ws.core.JBossWSCorePlugin;
import org.jboss.tools.ws.core.classpath.JBossWSRuntime;
import org.jboss.tools.ws.core.classpath.JBossWSRuntimeManager;
import org.jboss.tools.ws.core.facet.delegate.IJBossWSFacetDataModelProperties;
+import org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider;
import org.jboss.tools.ws.core.messages.JBossWSCoreMessages;
import org.jboss.tools.ws.core.utils.StatusUtils;
import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
@@ -339,7 +343,7 @@
}
// if no target runtime has been specified, get runtime location from
- // default jbossws runtime
+ // default jbossws runtime configured at Web Service preference page
if (prjFacetRuntime == null) {
JBossWSRuntime jbws = JBossWSRuntimeManager.getInstance()
.getDefaultRuntime();
@@ -356,6 +360,49 @@
return ""; //$NON-NLS-1$
}
+
+ public static boolean supportSOAP12(String projectName){
+ try {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if(project == null){
+ return false;
+ }
+
+ IFacetedProject facetedPrj = ProjectFacetsManager.create(project);
+ IProjectFacet jbossWSFacet =
ProjectFacetsManager.getProjectFacet(JBossWSFacetInstallDataModelProvider.JBOSS_WS_FACET_ID);
+ IProjectFacetVersion fpVersion = facetedPrj.getProjectFacetVersion(jbossWSFacet);
+ if(fpVersion != null &&
fpVersion.getVersionString().compareTo("3.0") >= 0){ //$NON-NLS-1$
+ return true;
+ }
+
+// if the project doesn't get JBossWS facet installed, check its primary target
runtime
+// if the jboss runtime version is 5.0 or higher, return true
+ org.eclipse.wst.common.project.facet.core.runtime.IRuntime targetRuntime =
facetedPrj.getPrimaryRuntime();
+ if(targetRuntime != null){
+ IRuntime runtime = getRuntime(targetRuntime);
+ IRuntimeType rt = runtime.getRuntimeType();
+ if(rt.getName().toUpperCase().indexOf("JBOSS") >= 0){ //$NON-NLS-1$
+ String runtimeVersion = rt.getVersion();
+ if(runtimeVersion != null && runtimeVersion.compareTo("5.0") >=
0){ //$NON-NLS-1$
+ return true;
+ }
+ }
+
+ }
+ } catch (CoreException e) {
+// ignore
+// e.printStackTrace();
+ }
+
+ //check the version of default jbossws runtime configured at the Web Service preference
page
+ JBossWSRuntime jbws = JBossWSRuntimeManager.getInstance()
+ .getDefaultRuntime();
+ if(jbws != null && "3.0".compareTo(jbws.getVersion()) <= 0){
//$NON-NLS-1$
+ return true;
+ }
+
+ return false;
+ }
public static IRuntime getRuntime(
org.eclipse.wst.common.project.facet.core.runtime.IRuntime runtime) {
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF 2009-10-16
08:19:05 UTC (rev 18121)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF 2009-10-16
08:47:57 UTC (rev 18122)
@@ -25,7 +25,8 @@
org.eclipse.jst.ws.creation.ui,
org.eclipse.wst.common.modulecore,
org.eclipse.wst.common.project.facet.ui,
- org.jboss.tools.ws.ui
+ org.jboss.tools.ws.ui,
+ org.eclipse.wst.server.core;bundle-version="1.1.3"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.ws.creation.ui.wsrt
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSFacetInstallPage.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSFacetInstallPage.java 2009-10-16
08:19:05 UTC (rev 18121)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSFacetInstallPage.java 2009-10-16
08:47:57 UTC (rev 18122)
@@ -10,12 +10,15 @@
******************************************************************************/
package org.jboss.tools.ws.creation.ui.project.facet;
+import java.text.MessageFormat;
+
import org.eclipse.swt.widgets.Composite;
import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;
import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
+import org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider;
import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
/**
@@ -31,14 +34,14 @@
private JBossWSRuntimeConfigBlock block;
public JBossWSFacetInstallPage() {
- super(JBossWSCreationCoreMessages.JBossWSFacetInstallPage_Title);
- setTitle(JBossWSCreationCoreMessages.JBossWSFacetInstallPage_Title);
- setDescription(JBossWSCreationCoreMessages.JBossWSFacetInstallPage_Description);
+ super("jbosswsfacet"); //$NON-NLS-1$
}
public void setConfig(Object config) {
this.model = (IDataModel) config;
-
+ String JbossWSVersion =
(String)model.getProperty(JBossWSFacetInstallDataModelProvider.FACET_VERSION_STR);
+ setTitle(MessageFormat.format(JBossWSCreationCoreMessages.JBossWSFacetInstallPage_Title,
JbossWSVersion));
+ setDescription(MessageFormat.format(JBossWSCreationCoreMessages.JBossWSFacetInstallPage_Description,
JbossWSVersion));
}
public void createControl(Composite parent) {
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSRuntimeConfigBlock.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSRuntimeConfigBlock.java 2009-10-16
08:19:05 UTC (rev 18121)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSRuntimeConfigBlock.java 2009-10-16
08:47:57 UTC (rev 18122)
@@ -29,9 +29,14 @@
import
org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
+import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
+import org.eclipse.wst.server.core.ServerCore;
import org.jboss.tools.ws.core.classpath.JBossWSRuntime;
import org.jboss.tools.ws.core.classpath.JBossWSRuntimeManager;
import org.jboss.tools.ws.core.facet.delegate.IJBossWSFacetDataModelProperties;
+import org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider;
import org.jboss.tools.ws.core.utils.StatusUtils;
import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
import org.jboss.tools.ws.creation.ui.CreationUIPlugin;
@@ -47,12 +52,17 @@
private String errMsg;
private IMessageNotifier notifier;
+ private String jbossWSVersion;
private IDataModel model;
+ private final static String JBOSS_IDE_AS_RUNTIME_ID =
"org.jboss.ide.eclipse.as.runtime"; //$NON-NLS-1$
+ private final static String JBOSS_IDE_EAP_RUNTIME_ID =
"org.jboss.ide.eclipse.as.runtime.eap"; //$NON-NLS-1$
+
public JBossWSRuntimeConfigBlock(Object config){
this.model = (IDataModel) config;
-
+ jbossWSVersion =
(String)model.getProperty(JBossWSFacetInstallDataModelProvider.FACET_VERSION_STR);
+// validateTargetRuntime();
}
@@ -141,6 +151,35 @@
}
+ private void validateTargetRuntime(){
+ IFacetedProjectWorkingCopy fpWorkingCopy =
(IFacetedProjectWorkingCopy)model.getProperty(JBossWSFacetInstallDataModelProvider.FACETED_PROJECT_WORKING_COPY);
+ IRuntime runtime = fpWorkingCopy.getPrimaryRuntime();
+ if(runtime == null){
+ setErrorMessage(JBossWSCreationCoreMessages.JBossWSRuntimeInstallPage_NoTargetRuntime);
+ return;
+ }
+
+ org.eclipse.wst.server.core.IRuntime serverRuntime =
ServerCore.findRuntime(runtime.getProperty("id")); //$NON-NLS-1$
+ IRuntimeType rt = serverRuntime.getRuntimeType();
+ String runtimeTypeId = rt.getId();
+ String version = rt.getVersion();
+ if(runtimeTypeId.indexOf(JBOSS_IDE_AS_RUNTIME_ID) < 0 &&
runtimeTypeId.indexOf(JBOSS_IDE_EAP_RUNTIME_ID) < 0){
+ setErrorMessage(JBossWSCreationCoreMessages.JBossWSRuntimeInstallPage_NoValidJBossWSRuntime);
+ return;
+ }
+
+ if("3.0".compareTo(jbossWSVersion) <= 0){ //$NON-NLS-1$
+ if("5.0".compareTo(version) > 0){ //$NON-NLS-1$
+ setErrorMessage(JBossWSCreationCoreMessages.JBossWSRuntimeInstallPage_NoValidJBossWSRuntime);
+ return;
+ }
+ }
+
+ setErrorMessage(null);
+
+
+ }
+
private void setInitialValues(){
boolean isServerSupplied =
model.getBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED);
String runtimeName =
model.getStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID);
@@ -194,7 +233,8 @@
IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, null);
model.setStringProperty(
IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, null);
- enableUserSupplied(false);
+ enableUserSupplied(false);
+
changePageStatus();
}
@@ -228,19 +268,22 @@
protected void initializeRuntimesCombo(Combo cmRuntime, String runtimeName) {
JBossWSRuntime selectedJbws = null;
JBossWSRuntime defaultJbws = null;
- int selectIndex = 0;
+// int selectIndex = 0;
int defaultIndex = 0;
cmRuntime.removeAll();
JBossWSRuntime[] runtimes = JBossWSRuntimeManager.getInstance()
.getRuntimes();
for (int i = 0; i < runtimes.length; i++) {
JBossWSRuntime jr = runtimes[i];
+ if(jbossWSVersion.compareTo(jr.getVersion()) > 0){
+ continue;
+ }
cmRuntime.add(jr.getName());
cmRuntime.setData(jr.getName(), jr);
if(jr.getName().equals(runtimeName)){
selectedJbws = jr;
- selectIndex = i;
+// selectIndex = i;
}
// get default jbossws runtime
if (jr.isDefault()) {
@@ -250,7 +293,7 @@
}
if(selectedJbws != null){
- cmRuntime.select(selectIndex);
+ cmRuntime.setText(runtimeName);
saveJBosswsRuntimeToModel(selectedJbws);
}else if(defaultJbws != null){
cmRuntime.select(defaultIndex);
@@ -306,7 +349,11 @@
}else{
setErrorMessage(null);
}
- }else{
+ }
+ else if(btnServerSupplied.getSelection()){
+ validateTargetRuntime();
+ }
+ else{
setErrorMessage(null);
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/CodeGenConfigWidget.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/CodeGenConfigWidget.java 2009-10-16
08:19:05 UTC (rev 18121)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/CodeGenConfigWidget.java 2009-10-16
08:47:57 UTC (rev 18122)
@@ -1,5 +1,7 @@
package org.jboss.tools.ws.creation.ui.widgets;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -19,8 +21,10 @@
import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor;
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents;
import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
+import org.jboss.tools.ws.core.utils.JBossWSCoreUtils;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
+import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
public class CodeGenConfigWidget extends SimpleWidgetDataContributor {
@@ -37,6 +41,7 @@
private Button btnRemove;
private Button btnUpdateWebxml;
private Button btnGenDefaultImpl;
+ private Button btnExtension;
public CodeGenConfigWidget(ServiceModel model) {
this.model = model;
@@ -156,6 +161,19 @@
}
}
});
+
+ btnExtension = new Button(configCom, SWT.CHECK);
+ gd = new GridData();
+ gd.horizontalSpan = 3;
+ btnExtension.setLayoutData(gd);
+ btnExtension.setText("Enable SOAP 1.2 binding extension (This option is only
available for JBossWS 3.0 or later)");
+ btnExtension.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ model.setEnableSOAP12(btnExtension
+ .getSelection());
+ }
+ });
+
if (model.getWsScenario() != WebServiceScenario.CLIENT) {
btnGenDefaultImpl = new Button(configCom, SWT.CHECK);
gd = new GridData();
@@ -191,8 +209,16 @@
}
});
}
+
+ //enable enable soap12 checkbox if the target jbossws runtime is less than 3.0
+ updateExtensionButtonStatus();
+
return this;
}
+
+ private void updateExtensionButtonStatus(){
+ btnExtension.setEnabled(JBossWSCreationUtils.supportSOAP12(model.getWebProjectName()));
+ }
private void loadBindingFiles(List bindingList) {
for (String fileLocation : model.getBindingFiles()) {