Author: dennyxu
Date: 2008-04-24 05:32:12 -0400 (Thu, 24 Apr 2008)
New Revision: 7729
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/lib/
trunk/ws/plugins/org.jboss.tools.ws.creation.core/lib/wsdl4j.jar
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/messages/
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/messages/JBossWSCreationCore.properties
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/utils/WSDLPropertyReader.java
Removed:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/Ff.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/.classpath
trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.creation.core/build.properties
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSProviderInvokeCommnad.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/data/ServiceModel.java
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/ProviderInvokeCodeGenConfigWidget.java
Log:
change model
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/.classpath
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/.classpath 2008-04-24 07:55:31 UTC
(rev 7728)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/.classpath 2008-04-24 09:32:12 UTC
(rev 7729)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
+ <classpathentry exported="true" kind="lib"
path="lib/wsdl4j.jar"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
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 2008-04-24
07:55:31 UTC (rev 7728)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2008-04-24
09:32:12 UTC (rev 7729)
@@ -13,8 +13,15 @@
org.eclipse.core.resources,
org.eclipse.jst.ws,
org.jboss.tools.ws.core,
- org.eclipse.wst.wsdl
+ org.eclipse.wst.wsdl,
+ org.eclipse.wst.command.env.core,
+ org.eclipse.wst.command.env,
+ org.eclipse.jst.ws.axis2.consumption.core,
+ org.apache.ant
Eclipse-LazyStart: true
Export-Package: org.jboos.tools.ws.creation.core,
org.jboos.tools.ws.creation.core.commands,
- org.jboos.tools.ws.creation.core.data
+ org.jboos.tools.ws.creation.core.data,
+ org.jboos.tools.ws.creation.core.messages
+Bundle-ClassPath: lib/wsdl4j.jar,
+ .
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/build.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/build.properties 2008-04-24 07:55:31
UTC (rev 7728)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/build.properties 2008-04-24 09:32:12
UTC (rev 7729)
@@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ lib/wsdl4j.jar
Added: trunk/ws/plugins/org.jboss.tools.ws.creation.core/lib/wsdl4j.jar
===================================================================
(Binary files differ)
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.creation.core/lib/wsdl4j.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java 2008-04-24
07:55:31 UTC (rev 7728)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java 2008-04-24
09:32:12 UTC (rev 7729)
@@ -1,10 +1,14 @@
package org.jboos.tools.ws.creation.core.commands;
+import javax.wsdl.WSDLException;
+
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.DefaultCodegenUtil;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
import org.eclipse.wst.ws.internal.wsrt.IWebService;
import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
@@ -14,6 +18,8 @@
import org.eclipse.wst.wsdl.internal.util.WSDLUtil;
import org.eclipse.wst.wsdl.util.WSDLParser;
import org.jboos.tools.ws.creation.core.data.ServiceModel;
+import org.jboos.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
+import org.jboos.tools.ws.creation.core.utils.WSDLPropertyReader;
public class InitialCommnad extends AbstractDataModelOperation{
@@ -30,8 +36,19 @@
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
+ IStatus status = Status.OK_STATUS;
- model.setWsdlURI(ws.getWebServiceInfo().getWsdlURL());
+ model.setTarget(JBossWSCreationCoreMessages.getString("VALUE_TARGET_2"));
+ if (scenario == WebServiceScenario.TOPDOWN) {
+ try{
+ model.setWsdlURI(ws.getWebServiceInfo().getWsdlURL());
+ WSDLPropertyReader reader = new WSDLPropertyReader();
+ reader.readWSDL(ws.getWebServiceInfo().getWsdlURL());
+ model.setCustomPackage(reader.packageFromTargetNamespace());
+ }catch (WSDLException e) {
+ return StatusUtils.errorStatus(e.getLocalizedMessage(), e);
+ }
+ }
return Status.OK_STATUS;
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java 2008-04-24
07:55:31 UTC (rev 7728)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java 2008-04-24
09:32:12 UTC (rev 7729)
@@ -4,6 +4,7 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
+import java.util.List;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.CoreException;
@@ -80,13 +81,14 @@
commandLine += " -p " + customePkg;
}
- String bindingFileLocation = model.getBindingFileLocation();
- if(bindingFileLocation != null && !"".equals(bindingFileLocation)){
+ List<String> bindingFiles = model.getBindingFiles();
+ for(String bindingFileLocation: bindingFiles){
File bindingFile = new File(bindingFileLocation);
if(bindingFile.exists()){
commandLine += " -b " + bindingFileLocation;
}
}
+
return commandLine;
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSProviderInvokeCommnad.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSProviderInvokeCommnad.java 2008-04-24
07:55:31 UTC (rev 7728)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSProviderInvokeCommnad.java 2008-04-24
09:32:12 UTC (rev 7729)
@@ -80,14 +80,8 @@
commandLine += " -p " + customePkg;
}
- String bindingFileLocation = model.getBindingFileLocation();
- if(bindingFileLocation != null && !"".equals(bindingFileLocation)){
- File bindingFile = new File(bindingFileLocation);
- if(bindingFile.exists()){
- commandLine += " -b " + bindingFileLocation;
- }
- }
+
return commandLine;
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/data/ServiceModel.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/data/ServiceModel.java 2008-04-24
07:55:31 UTC (rev 7728)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/data/ServiceModel.java 2008-04-24
09:32:12 UTC (rev 7729)
@@ -1,5 +1,8 @@
package org.jboos.tools.ws.creation.core.data;
+import java.util.ArrayList;
+import java.util.List;
+
public class ServiceModel {
private String webProjectName;
@@ -9,8 +12,10 @@
private String portName;
private String serviceName;
private String customPackage;
- private String bindingFileLocation;
+ private List<String> bindingFileLocation = new ArrayList<String>();
+ private String catalog;
private String serviceClass;
+ private String target;
public String getServiceClass() {
@@ -59,10 +64,24 @@
this.webProjectName = webProjectName;
}
- public String getBindingFileLocation(){
+ public List<String> getBindingFiles(){
return this.bindingFileLocation;
}
- public void setBindingFileLcation(String bindingFileLocation){
- this.bindingFileLocation = bindingFileLocation;
+ public void addBindingFile(String bindingFileLocation){
+ this.bindingFileLocation.add(bindingFileLocation);
}
+
+ public String getCatalog(){
+ return this.catalog;
+ }
+ public void setCatalog(String catalog){
+ this.catalog = catalog;
+ }
+
+ public String getTarget(){
+ return this.target;
+ }
+ public void setTarget(String target){
+ this.target = target;
+ }
}
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/messages/JBossWSCreationCore.properties
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/messages/JBossWSCreationCore.properties
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2008-04-24
09:32:12 UTC (rev 7729)
@@ -0,0 +1,7 @@
+LABEL_CUSTOM_PACKAGE_NAME=Custom package name:
+LABEL_CATALOG_FILE=Catalog file:
+LABEL_BUTTON_TEXT_SELECTION=...
+LABEL_BINDING_FILE=Binding files:
+LABEL_JAXWS_TARGET=JAX-WS specification
+VALUE_TARGET_2=JAX-WS 2.0
+VALUE_TARGET_1=JAX-WS 2.1
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2008-04-24
09:32:12 UTC (rev 7729)
@@ -0,0 +1,22 @@
+package org.jboos.tools.ws.creation.core.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class JBossWSCreationCoreMessages {
+ private static final String BUNDLE_NAME =
"org.jboos.tools.ws.creation.core.messages.JBossWSCreationCore"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private JBossWSCreationCoreMessages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/utils/WSDLPropertyReader.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/utils/WSDLPropertyReader.java
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/utils/WSDLPropertyReader.java 2008-04-24
09:32:12 UTC (rev 7729)
@@ -0,0 +1,132 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+* This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboos.tools.ws.creation.core.utils;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+
+
+
+
+
+public class WSDLPropertyReader {
+
+ private Definition definition = null;
+
+ public void readWSDL(String filepath) throws WSDLException {
+
+ WSDLFactory wsdlFactory;
+
+ wsdlFactory = WSDLFactory.newInstance();
+ WSDLReader reader = wsdlFactory.newWSDLReader();
+ definition = reader.readWSDL(filepath);
+ }
+
+
+ /**
+ * get the default package derived by the targetNamespace
+ */
+ 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;
+ }
+ }
+
+ return returnPkg;
+
+
+ }
+
+ /**
+ * Returns a list of service names the names are QNames
+ *
+ * @return
+ */
+ public List<QName> getServiceList() {
+
+ List<QName> returnList = new ArrayList<QName>();
+
+ Service service;
+ Map serviceMap = definition.getServices();
+
+ if (serviceMap != null && !serviceMap.isEmpty()) {
+ Iterator<Service> serviceIterator = serviceMap.values().iterator();
+ while (serviceIterator.hasNext()) {
+
+ service = (Service) serviceIterator.next();
+ returnList.add(service.getQName());
+ }
+ }
+ return returnList;
+ }
+
+ /**
+ * Returns a list of ports for a particular service the names are QNames
+ *
+ * @return
+ */
+ public List<String> getPortNameList(QName serviceName) {
+
+ List<String> returnList = new ArrayList<String>();
+ Service service = definition.getService(serviceName);
+ Port port = null;
+ if (service != null) {
+ Map portMap = service.getPorts();
+ if (portMap != null && !portMap.isEmpty()) {
+ Iterator<Port> portIterator = portMap.values().iterator();
+ while (portIterator.hasNext()) {
+ port = (Port) portIterator.next();
+ returnList.add(port.getName());
+ }
+ }
+
+ }
+ return returnList;
+ }
+
+
+
+}
+
Deleted:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/Ff.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/Ff.java 2008-04-24
07:55:31 UTC (rev 7728)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/Ff.java 2008-04-24
09:32:12 UTC (rev 7729)
@@ -1,33 +0,0 @@
-package org.jboss.tools.ws.creation.ui;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class Ff {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
-
-
- // TODO Auto-generated method stub
- try {
-
- InputStream in = Runtime.getRuntime().exec("ls").getInputStream();
- byte[] b = new byte[100000];
- in.read(b,0,99999);
- System.out.print(new String(b));
-
-
-
-
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-
-}
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-04-24
07:55:31 UTC (rev 7728)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/CodeGenConfigWidget.java 2008-04-24
09:32:12 UTC (rev 7729)
@@ -2,6 +2,7 @@
+import org.eclipse.jface.viewers.CellEditor.LayoutData;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -10,15 +11,18 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor;
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents;
import org.jboos.tools.ws.creation.core.data.ServiceModel;
+import org.jboos.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
public class CodeGenConfigWidget extends SimpleWidgetDataContributor {
@@ -31,35 +35,73 @@
public WidgetDataEvents addControls( Composite parent, Listener statusListener){
Composite configCom = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
+ GridLayout layout = new GridLayout(3, false);
configCom.setLayout(layout);
configCom.setLayoutData(new GridData(GridData.FILL_BOTH));
Label lblCustomPakage = new Label(configCom, SWT.NONE);
- lblCustomPakage.setText("Custom package name:");
- final Text txtCustomPkgName = new Text(configCom, SWT.NONE);
- txtCustomPkgName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ lblCustomPakage.setText(JBossWSCreationCoreMessages.getString("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);
+ gd.horizontalSpan = 2;
+ txtCustomPkgName.setLayoutData(gd);
txtCustomPkgName.addModifyListener(new ModifyListener(){
public void modifyText(ModifyEvent e) {
model.setCustomPackage(txtCustomPkgName.getText());
}});
- new Label(configCom, SWT.NONE).setText("Binding file:");
- Composite fileSelection = new Composite(configCom, SWT.NONE);
- fileSelection.setLayout(new GridLayout(2, false));
- fileSelection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- final Text txtFiles = new Text(fileSelection, SWT.NONE);
- txtFiles.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- Button btnSelect = new Button(fileSelection, SWT.NONE);
- btnSelect.setText("...");
+ new Label(configCom,
SWT.NONE).setText(JBossWSCreationCoreMessages.getString("LABEL_JAXWS_TARGET"));
//$NON-NLS-1$
+ final Combo cbSpec = new Combo(configCom, SWT.BORDER | SWT.READ_ONLY);
+ cbSpec.add(JBossWSCreationCoreMessages.getString("VALUE_TARGET_2"), 0);
//$NON-NLS-1$
+ cbSpec.add(JBossWSCreationCoreMessages.getString("VALUE_TARGET_1"), 1);
//$NON-NLS-1$
+ cbSpec.select(1);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ cbSpec.setLayoutData(gd);
+ cbSpec.addModifyListener(new ModifyListener(){
+
+ public void modifyText(ModifyEvent e) {
+ model.setTarget(cbSpec.getText());
+ }});
+
+ new Label(configCom,
SWT.NONE).setText(JBossWSCreationCoreMessages.getString("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.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ String fileLocation = new FileDialog(Display.getCurrent().getActiveShell(),
SWT.NONE).open();
+ txtCatlog.setText(fileLocation);
+ model.setCatalog(fileLocation);
+ }
+ });
+
+ new Label(configCom,
SWT.NONE).setText(JBossWSCreationCoreMessages.getString("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);
+ gd.heightHint = Display.getCurrent().getActiveShell().getBounds().height / 4;
+ gd.verticalSpan = 2;
+ bindingList.setLayoutData(gd);
+ /*final Text txtBinding = new Text(configCom, SWT.BORDER);
+ txtBinding.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));*/
+ Button btnSelect = new Button(configCom, SWT.NONE);
+ btnSelect.setText(JBossWSCreationCoreMessages.getString("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();
- txtFiles.setText(fileLocation);
- model.setBindingFileLcation(fileLocation);
+ if(!model.getBindingFiles().contains(fileLocation)){
+ bindingList.add(fileLocation);
+ model.addBindingFile(fileLocation);
+ }
+
}
});
+
+
return this;
}
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/ProviderInvokeCodeGenConfigWidget.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/ProviderInvokeCodeGenConfigWidget.java 2008-04-24
07:55:31 UTC (rev 7728)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/ProviderInvokeCodeGenConfigWidget.java 2008-04-24
09:32:12 UTC (rev 7729)
@@ -53,21 +53,7 @@
model.setCustomPackage(txtCustomPkgName.getText());
}});
- new Label(configCom, SWT.NONE).setText("Binding file:");
- Composite fileSelection = new Composite(configCom, SWT.NONE);
- fileSelection.setLayout(new GridLayout(2, false));
- fileSelection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- final Text txtFiles = new Text(fileSelection, SWT.NONE);
- txtFiles.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- Button btnSelect = new Button(fileSelection, SWT.NONE);
- btnSelect.setText("...");
- btnSelect.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- String fileLocation = new FileDialog(Display.getCurrent().getActiveShell(),
SWT.NONE).open();
- txtFiles.setText(fileLocation);
- model.setBindingFileLcation(fileLocation);
- }
- });
+
return this;
}