Author: dennyxu
Date: 2008-05-08 23:42:43 -0400 (Thu, 08 May 2008)
New Revision: 8019
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossStatusUtils.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/BindingFilesValidationCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommand.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.core/src/org/jboss/tools/ws/creation/core/utils/WSDLPropertyReader.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
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/wsrt/JBossWebService.java
Log:
JBIDE-2200: add binding file validation for topdown service creation
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/BindingFilesValidationCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/BindingFilesValidationCommand.java 2008-05-09
02:50:12 UTC (rev 8018)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/BindingFilesValidationCommand.java 2008-05-09
03:42:43 UTC (rev 8019)
@@ -10,54 +10,71 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
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.JBossStatusUtils;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
-public class BindingFilesValidationCommand extends AbstractDataModelOperation{
+public class BindingFilesValidationCommand extends AbstractDataModelOperation {
private ServiceModel model;
-
-
- public BindingFilesValidationCommand(ServiceModel model){
+
+ public BindingFilesValidationCommand(ServiceModel model) {
this.model = model;
}
-
+
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IStatus status = Status.OK_STATUS;
- SAXParserFactory spf = SAXParserFactory.newInstance();
+ IStatus status = Status.OK_STATUS;
+ SAXParserFactory spf = SAXParserFactory.newInstance();
- // Create the XMLReader to be used to check for errors.
- XMLReader reader = null;
- try {
- SAXParser parser = spf.newSAXParser();
- reader = parser.getXMLReader();
- } catch (Exception e) {
- //if no SAXParserFactory implementation is available, break this command
- return Status.OK_STATUS;
- }
+ // Create the XMLReader to be used to check for errors.
+ XMLReader reader = null;
+ try {
+ SAXParser parser = spf.newSAXParser();
+ reader = parser.getXMLReader();
+ } catch (Exception e) {
+ //if no SAXParserFactory implementation is available, ignore this command
+ return Status.OK_STATUS;
+ }
-
- // Use the XMLReader to parse the entire file.
- try {
- InputSource is = new InputSource("");
- reader.parse(is);
- } catch (SAXException e) {
- /*status = StatusUtils.errorStatus(
- JBossWSCreationCoreMessages
- new String[]{e.getLocalizedMessage()}), e);*/
- } catch (IOException e) {
- System.err.println(e);
- System.exit(1);
- }
- return null;
- }
+
+ for (String filename : model.getBindingFiles()) {
+ IStatus bStatus = validateXMLFile(reader, filename);
+ if(bStatus != Status.OK_STATUS){
+ return bStatus;
+ }
+ }
+
+
+ return status;
+ }
+ private IStatus validateXMLFile(XMLReader reader, String filename){
+ try {
+ InputSource is = new InputSource(filename);
+ reader.parse(is);
+
+ } catch (SAXException e) {
+ return JBossStatusUtils
+ .errorStatus(
+ NLS.bind(JBossWSCreationCoreMessages.ERROR_MESSAGE_INVALID_BINDING_FILE,
+ new String[] {filename, e.getLocalizedMessage() }), e);
+
+ } catch (IOException e) {
+ return JBossStatusUtils
+ .errorStatus(
+ NLS.bind(JBossWSCreationCoreMessages.ERROR_MESSAGE_INVALID_BINDING_FILE,
+ new String[] {filename, e.getLocalizedMessage() }), e);
+ }
+ return Status.OK_STATUS;
+ }
+
+
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommand.java 2008-05-09
02:50:12 UTC (rev 8018)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommand.java 2008-05-09
03:42:43 UTC (rev 8019)
@@ -37,7 +37,7 @@
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- model.setTarget(JBossWSCreationCoreMessages.getString("VALUE_TARGET_1"));
+ model.setTarget(JBossWSCreationCoreMessages.VALUE_TARGET_0);
if (scenario == WebServiceScenario.TOPDOWN) {
try{
model.setWsdlURI(ws.getWebServiceInfo().getWsdlURL());
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 2008-05-09
02:50:12 UTC (rev 8018)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2008-05-09
03:42:43 UTC (rev 8019)
@@ -5,4 +5,7 @@
LABEL_JAXWS_TARGET=JAX-WS specification
VALUE_TARGET_0=2.0
VALUE_TARGET_1=2.1
-LABEL_BUTTON_TEXT_REMOVE=Remove
\ No newline at end of file
+LABEL_BUTTON_TEXT_REMOVE=Remove
+
+ERROR_MESSAGE_INVALID_BINDING_FILE={0} is not a valid JAX-WS or JAXB binding file
+ERROR_READ_BINDING_FILE=Exception occurred while reading binding file
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 2008-05-09
02:50:12 UTC (rev 8018)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2008-05-09
03:42:43 UTC (rev 8019)
@@ -1,22 +1,27 @@
package org.jboss.tools.ws.creation.core.messages;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import org.eclipse.osgi.util.NLS;
-public class JBossWSCreationCoreMessages {
+public class JBossWSCreationCoreMessages extends NLS {
private static final String BUNDLE_NAME =
"org.jboss.tools.ws.creation.core.messages.JBossWSCreationCore"; //$NON-NLS-1$
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
+ public static String LABEL_CUSTOM_PACKAGE_NAME;
+ public static String LABEL_CATALOG_FILE;
+ public static String LABEL_BUTTON_TEXT_SELECTION;
+ public static String LABEL_BINDING_FILE;
+ public static String LABEL_JAXWS_TARGET;
+ public static String VALUE_TARGET_0;
+ public static String VALUE_TARGET_1;
+ public static String LABEL_BUTTON_TEXT_REMOVE;
+ public static String ERROR_MESSAGE_INVALID_BINDING_FILE;
+ public static String ERROR_READ_BINDING_FILE;
+
private JBossWSCreationCoreMessages() {
}
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, JBossWSCreationCoreMessages.class);
}
+
}
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossStatusUtils.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossStatusUtils.java
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossStatusUtils.java 2008-05-09
03:42:43 UTC (rev 8019)
@@ -0,0 +1,24 @@
+package org.jboss.tools.ws.creation.core.utils;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+
+public class JBossStatusUtils {
+
+ public static IStatus errorStatus(String message, Throwable exc) {
+ return new Status(IStatus.ERROR, "id", 0, message, exc);
+ }
+
+ public static IStatus errorStatus(String message) {
+ return new Status(IStatus.ERROR, "id", message);
+ }
+
+ public static MultiStatus errorMultiStatus(String message, IStatus[] status) {
+ return new MultiStatus("id", 0, status, message, null);
+ }
+
+ public static MultiStatus errorMultiStatus(String message) {
+ return new MultiStatus("id", 0, message, null);
+ }
+}
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 2008-05-09
02:50:12 UTC (rev 8018)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java 2008-05-09
03:42:43 UTC (rev 8019)
@@ -22,6 +22,9 @@
package org.jboss.tools.ws.creation.core.utils;
import java.io.File;
+import java.text.Collator;
+import java.util.Arrays;
+import java.util.Locale;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -30,6 +33,40 @@
public class JBossWSCreationUtils {
+ static final String javaKeyWords[] =
+ {
+ "abstract", "assert", "boolean",
"break", "byte", "case",
+ "catch", "char", "class", "const",
"continue",
+ "default", "do", "double", "else",
"extends",
+ "false", "final", "finally", "float",
"for",
+ "goto", "if", "implements", "import",
"instanceof",
+ "int", "interface", "long", "native",
"new",
+ "null", "package", "private",
"protected", "public",
+ "return", "short", "static",
"strictfp", "super",
+ "switch", "synchronized", "this",
"throw", "throws",
+ "transient", "true", "try", "void",
"volatile",
+ "while"
+ };
+
+ public static boolean isJavaKeyword(String keyword) {
+ if (hasUpperCase(keyword)) {
+ return false;
+ }
+ return (Arrays.binarySearch(javaKeyWords, keyword,
Collator.getInstance(Locale.ENGLISH)) >= 0);
+ }
+
+ private static boolean hasUpperCase(String nodeName) {
+ if (nodeName == null) {
+ return false;
+ }
+ for (int i = 0; i < nodeName.length(); i++) {
+ if (Character.isUpperCase(nodeName.charAt(i))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
public static IPath getWorkspace(){
return ResourcesPlugin.getWorkspace().getRoot().getLocation();
}
@@ -119,4 +156,5 @@
+
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/WSDLPropertyReader.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/WSDLPropertyReader.java 2008-05-09
02:50:12 UTC (rev 8018)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/WSDLPropertyReader.java 2008-05-09
03:42:43 UTC (rev 8019)
@@ -21,6 +21,7 @@
*/
package org.jboss.tools.ws.creation.core.utils;
+import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -63,22 +64,107 @@
public String packageFromTargetNamespace(){
String packageName = definition.getTargetNamespace();
- packageName = packageName.substring(packageName.lastIndexOf("/") + 1);
- String returnPkg = "";
- StringTokenizer st = new StringTokenizer(packageName, ".");
- while(st.hasMoreTokens()){
- if("".equals(returnPkg)){
- returnPkg = st.nextToken();
- }else{
- returnPkg = st.nextToken() + "." + returnPkg;
- }
- }
+ String returnPkg = getPackageNameFromNamespce(packageName);
return returnPkg;
}
+ private static String getPackageNameFromNamespce(String namespace) {
+
+ String hostname = null;
+ String path = "";
+
+ try {
+ java.net.URL url = new java.net.URL(namespace);
+
+ hostname = url.getHost();
+ path = url.getPath();
+ } catch (MalformedURLException e) {
+ if (namespace.indexOf(":") > -1) {
+ hostname = namespace.substring(namespace.indexOf(":") + 1);
+
+ while (hostname.startsWith("/")) {
+ hostname = hostname.substring(1);
+ }
+
+ if (hostname.indexOf("/") > -1) {
+ hostname = hostname.substring(0, hostname.indexOf("/"));
+ }
+ } else {
+ hostname = namespace.replace('/','.');
+ }
+ }
+
+ if (hostname == null || hostname.length() == 0) {
+ return null;
+ }
+
+ hostname = hostname.replace('-', '_');
+ path = path.replace('-', '_');
+
+ path = path.replace(':', '_');
+
+
+ if ((path.length() > 0) && (path.charAt(path.length() - 1) ==
'/')) {
+ path = path.substring(0, path.length() - 1);
+ }
+
+
+ StringTokenizer st = new StringTokenizer(hostname, ".:");
+ String[] nodes = new String[st.countTokens()];
+
+ for (int i = 0; i < nodes.length; ++i) {
+ nodes[i] = st.nextToken();
+ }
+
+ StringBuffer sb = new StringBuffer(namespace.length());
+
+ for (int i = nodes.length - 1; i >= 0; --i) {
+ appendToPackage(sb, nodes[i], (i == nodes.length - 1));
+ }
+
+ StringTokenizer st2 = new StringTokenizer(path, "/");
+
+ while (st2.hasMoreTokens()) {
+ appendToPackage(sb, st2.nextToken(), false);
+ }
+
+ return sb.toString().toLowerCase();
+ }
+
+ private static void appendToPackage(StringBuffer sb, String nodeName,
+ boolean firstNode) {
+
+ if (JBossWSCreationUtils.isJavaKeyword(nodeName)) {
+ nodeName = "_" + nodeName;
+ }
+
+ if (!firstNode) {
+ sb.append('.');
+ }
+
+ if (Character.isDigit(nodeName.charAt(0))) {
+ sb.append('_');
+ }
+
+ if (nodeName.indexOf('.') != -1) {
+ char[] buf = nodeName.toCharArray();
+
+ for (int i = 0; i < nodeName.length(); i++) {
+ if (buf[i] == '.') {
+ buf[i] = '_';
+ }
+ }
+
+ nodeName = new String(buf);
+ }
+
+ sb.append(nodeName);
+ }
+
+
/**
* Returns a list of service names the names are QNames
*
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-05-09 02:50:12 UTC
(rev 8018)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-05-09 03:42:43 UTC
(rev 8019)
@@ -6,7 +6,7 @@
<widgetFactory
class="org.jboss.tools.ws.creation.ui.wsrt.JBossWSConfigWidgetFactory"
id="JBossWSWSDL2JavaConfig"
-
insertBeforeCommandId="org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommand">
+
insertBeforeCommandId="org.jboss.tools.ws.creation.core.commands.BindingFilesValidationCommand">
</widgetFactory>
</extension>
@@ -51,7 +51,7 @@
<widgetFactory
class="org.jboss.tools.ws.creation.ui.wsrt.JBossWSProviderInvokeConfigWidgetFactory"
id="JBossWSProviderInvokeConfig"
-
insertBeforeCommandId="org.jboss.tools.ws.creation.core.commands.WSProviderInvokeCommand">
+
insertBeforeCommandId="org.jboss.tools.ws.creation.core.commands.WSProviderInvokeCommnad">
</widgetFactory>
</extension>
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 2008-05-09
02:50:12 UTC (rev 8018)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/CodeGenConfigWidget.java 2008-05-09
03:42:43 UTC (rev 8019)
@@ -41,7 +41,7 @@
//custom package name
Label lblCustomPakage = new Label(configCom, SWT.NONE);
- lblCustomPakage.setText(JBossWSCreationCoreMessages.getString("LABEL_CUSTOM_PACKAGE_NAME"));
//$NON-NLS-1$
+ lblCustomPakage.setText(JBossWSCreationCoreMessages.LABEL_CUSTOM_PACKAGE_NAME);
//$NON-NLS-1$
final Text txtCustomPkgName = new Text(configCom, SWT.BORDER);
txtCustomPkgName.setText(model.getCustomPackage());
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -54,11 +54,16 @@
}});
//target
- new Label(configCom,
SWT.NONE).setText(JBossWSCreationCoreMessages.getString("LABEL_JAXWS_TARGET"));
//$NON-NLS-1$
+ new Label(configCom, SWT.NONE).setText(JBossWSCreationCoreMessages.LABEL_JAXWS_TARGET);
//$NON-NLS-1$
final Combo cbSpec = new Combo(configCom, SWT.BORDER | SWT.READ_ONLY);
- cbSpec.add(JBossWSCreationCoreMessages.getString("VALUE_TARGET_0"), 0);
//$NON-NLS-1$
- cbSpec.add(JBossWSCreationCoreMessages.getString("VALUE_TARGET_1"), 1);
//$NON-NLS-1$
- cbSpec.select(1);
+ cbSpec.add(JBossWSCreationCoreMessages.VALUE_TARGET_0, 0); //$NON-NLS-1$
+ cbSpec.add(JBossWSCreationCoreMessages.VALUE_TARGET_1, 1); //$NON-NLS-1$
+ if(JBossWSCreationCoreMessages.VALUE_TARGET_0.equals(model.getTarget())){
+ cbSpec.select(0);
+ }
+ else{
+ cbSpec.select(1);
+ }
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
cbSpec.setLayoutData(gd);
@@ -69,11 +74,11 @@
}});
//catalog file
- new Label(configCom,
SWT.NONE).setText(JBossWSCreationCoreMessages.getString("LABEL_CATALOG_FILE"));
//$NON-NLS-1$
+ new Label(configCom, SWT.NONE).setText(JBossWSCreationCoreMessages.LABEL_CATALOG_FILE);
//$NON-NLS-1$
final Text txtCatlog = new Text(configCom, SWT.BORDER);
txtCatlog.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Button btnCatlog = new Button(configCom, SWT.NONE);
- btnCatlog.setText(JBossWSCreationCoreMessages.getString("LABEL_BUTTON_TEXT_SELECTION"));
//$NON-NLS-1$
+ btnCatlog.setText(JBossWSCreationCoreMessages.LABEL_BUTTON_TEXT_SELECTION);
//$NON-NLS-1$
btnCatlog.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent e) {
String fileLocation = new FileDialog(Display.getCurrent().getActiveShell(),
SWT.NONE).open();
@@ -83,7 +88,7 @@
});
//binding files
- new Label(configCom,
SWT.NONE).setText(JBossWSCreationCoreMessages.getString("LABEL_BINDING_FILE"));
//$NON-NLS-1$
+ new Label(configCom, SWT.NONE).setText(JBossWSCreationCoreMessages.LABEL_BINDING_FILE);
//$NON-NLS-1$
final List bindingList = new List(configCom, SWT.BORDER | SWT.SCROLL_LINE |
SWT.V_SCROLL | SWT.H_SCROLL);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -103,11 +108,13 @@
Button btnSelect = new Button(configCom, SWT.NONE);
- btnSelect.setText(JBossWSCreationCoreMessages.getString("LABEL_BUTTON_TEXT_SELECTION"));
//$NON-NLS-1$
+ btnSelect.setText(JBossWSCreationCoreMessages.LABEL_BUTTON_TEXT_SELECTION);
//$NON-NLS-1$
btnSelect.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent e) {
+
String fileLocation = new FileDialog(Display.getCurrent().getActiveShell(),
SWT.NONE).open();
- if(!model.getBindingFiles().contains(fileLocation)){
+ if(fileLocation != null &&
+ !model.getBindingFiles().contains(fileLocation)){
bindingList.add(fileLocation);
model.addBindingFile(fileLocation);
}
@@ -118,7 +125,7 @@
new Label(configCom, SWT.NONE);
btnRemove = new Button(configCom, SWT.NONE);
btnRemove.setEnabled(false);
- btnRemove.setText(JBossWSCreationCoreMessages.getString("LABEL_BUTTON_TEXT_REMOVE"));
+ btnRemove.setText(JBossWSCreationCoreMessages.LABEL_BUTTON_TEXT_REMOVE);
btnRemove.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent e) {
model.getBindingFiles().remove(bindingList.getSelectionIndex());
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java 2008-05-09
02:50:12 UTC (rev 8018)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java 2008-05-09
03:42:43 UTC (rev 8019)
@@ -2,7 +2,6 @@
import java.util.Vector;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.wst.command.internal.env.core.ICommandFactory;
import org.eclipse.wst.command.internal.env.core.SimpleCommandFactory;
import org.eclipse.wst.common.environment.IEnvironment;
@@ -11,9 +10,9 @@
import org.eclipse.wst.ws.internal.wsrt.ISelection;
import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo;
import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
-import org.jboss.tools.ws.core.command.JbossWSRuntimeCommand;
+import org.jboss.tools.ws.creation.core.commands.BindingFilesValidationCommand;
import org.jboss.tools.ws.creation.core.commands.InitialCommand;
-import org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommand;
+import org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommnad;
import org.jboss.tools.ws.creation.core.commands.WSProviderInvokeCommand;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
@@ -47,7 +46,8 @@
model.setWebProjectName(project);
if (ctx.getScenario().getValue() == WebServiceScenario.TOPDOWN) {
commands.add(new InitialCommand(model, this, WebServiceScenario.TOPDOWN));
- commands.add(new WSDL2JavaCommand(model));
+ commands.add(new BindingFilesValidationCommand(model));
+ commands.add(new WSDL2JavaCommnad(model));
//commands.add(new
JbossWSRuntimeCommand(ResourcesPlugin.getWorkspace().getRoot().getProject(project)));
}
else if (ctx.getScenario().getValue() == WebServiceScenario.BOTTOMUP){