Author: dennyxu
Date: 2008-04-24 06:47:26 -0400 (Thu, 24 Apr 2008)
New Revision: 7732
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/WSDL2JavaCommnad.java
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.ui/src/org/jboss/tools/ws/creation/ui/widgets/CodeGenConfigWidget.java
Log:
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
09:38:03 UTC (rev 7731)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java 2008-04-24
10:47:26 UTC (rev 7732)
@@ -37,7 +37,7 @@
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- model.setTarget(JBossWSCreationCoreMessages.getString("VALUE_TARGET_2"));
+ model.setTarget(JBossWSCreationCoreMessages.getString("VALUE_TARGET_1"));
if (scenario == WebServiceScenario.TOPDOWN) {
try{
model.setWsdlURI(ws.getWebServiceInfo().getWsdlURL());
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
09:38:03 UTC (rev 7731)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java 2008-04-24
10:47:26 UTC (rev 7732)
@@ -35,7 +35,7 @@
String commandLocation = runtimeLocation + Path.SEPARATOR + "bin";
String command = "sh wsconsume.sh ";
if(System.getProperty("os.name").toLowerCase().indexOf("win") >=
0){
- command += "cmd wsconsume.bat";
+ command = "cmd wsconsume.bat";
}
String args = getCommandlineArgs();
command += " -k " + args + " " + model.getWsdlURI();
@@ -76,9 +76,8 @@
String projectRoot = JBossWSCreationUtils.getProjectRoot(project).toOSString();
commandLine = "-s " + projectRoot + Path.SEPARATOR + "src";
- String customePkg = model.getCustomPackage();
- if(customePkg != null && !"".equals(customePkg)){
- commandLine += " -p " + customePkg;
+ if(model.getCustomPackage() != null &&
!"".equals(model.getCustomPackage())){
+ commandLine += " -p " + model.getCustomPackage();
}
List<String> bindingFiles = model.getBindingFiles();
@@ -88,6 +87,17 @@
commandLine += " -b " + bindingFileLocation;
}
}
+
+ if(model.getCatalog() != null &&
!"".equals(model.getCatalog().trim())){
+ File catalog = new File(model.getCatalog());
+ if(catalog.exists()){
+ commandLine += " -c " + model.getCatalog();
+ }
+ }
+
+ if(model.getTarget() != null){
+ commandLine += " -t " + model.getTarget();
+ }
return commandLine;
Modified:
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 2008-04-24
09:38:03 UTC (rev 7731)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2008-04-24
10:47:26 UTC (rev 7732)
@@ -1,7 +1,8 @@
-LABEL_CUSTOM_PACKAGE_NAME=Custom package name:
-LABEL_CATALOG_FILE=Catalog file:
-LABEL_BUTTON_TEXT_SELECTION=...
-LABEL_BINDING_FILE=Binding files:
+LABEL_CUSTOM_PACKAGE_NAME=Custom package name
+LABEL_CATALOG_FILE=Catalog file
+LABEL_BUTTON_TEXT_SELECTION= &Add
+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
+VALUE_TARGET_0=2.0
+VALUE_TARGET_1=2.1
+LABEL_BUTTON_TEXT_REMOVE=Remove
\ No newline at end of file
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
09:38:03 UTC (rev 7731)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/CodeGenConfigWidget.java 2008-04-24
10:47:26 UTC (rev 7732)
@@ -2,7 +2,6 @@
-import org.eclipse.jface.viewers.CellEditor.LayoutData;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -27,6 +26,7 @@
public class CodeGenConfigWidget extends SimpleWidgetDataContributor {
private ServiceModel model;
+ private Button btnRemove;
public CodeGenConfigWidget(ServiceModel model){
this.model = model;
@@ -38,6 +38,8 @@
GridLayout layout = new GridLayout(3, false);
configCom.setLayout(layout);
configCom.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ //custom package name
Label lblCustomPakage = new Label(configCom, SWT.NONE);
lblCustomPakage.setText(JBossWSCreationCoreMessages.getString("LABEL_CUSTOM_PACKAGE_NAME"));
//$NON-NLS-1$
final Text txtCustomPkgName = new Text(configCom, SWT.BORDER);
@@ -51,9 +53,10 @@
model.setCustomPackage(txtCustomPkgName.getText());
}});
+ //target
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_0"), 0);
//$NON-NLS-1$
cbSpec.add(JBossWSCreationCoreMessages.getString("VALUE_TARGET_1"), 1);
//$NON-NLS-1$
cbSpec.select(1);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -65,8 +68,8 @@
model.setTarget(cbSpec.getText());
}});
+ //catalog file
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);
@@ -79,14 +82,26 @@
}
});
+ //binding files
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;
+ gd.verticalSpan = 3;
bindingList.setLayoutData(gd);
- /*final Text txtBinding = new Text(configCom, SWT.BORDER);
- txtBinding.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));*/
+ loadBindingFiles(bindingList);
+ bindingList.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ if(bindingList.getSelectionIndex() >= 0){
+ btnRemove.setEnabled(true);
+ }else{
+ btnRemove.setEnabled(false);
+ }
+ }
+ });
+
+
Button btnSelect = new Button(configCom, SWT.NONE);
btnSelect.setText(JBossWSCreationCoreMessages.getString("LABEL_BUTTON_TEXT_SELECTION"));
//$NON-NLS-1$
btnSelect.addSelectionListener(new SelectionAdapter(){
@@ -100,8 +115,26 @@
}
});
+ new Label(configCom, SWT.NONE);
+ btnRemove = new Button(configCom, SWT.BORDER);
+ btnRemove.setEnabled(false);
+ btnRemove.setText(JBossWSCreationCoreMessages.getString("LABEL_BUTTON_TEXT_REMOVE"));
+ btnRemove.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ model.getBindingFiles().remove(bindingList.getSelectionIndex());
+ bindingList.remove(bindingList.getSelectionIndex());
+ if(bindingList.getSelectionIndex() == -1){
+ btnRemove.setEnabled(false);
+ }
+ }
+ });
-
return this;
}
+
+ private void loadBindingFiles(List bindingList){
+ for(String fileLocation: model.getBindingFiles()){
+ bindingList.add(fileLocation);
+ }
+ }
}
Show replies by date