JBoss Tools SVN: r8020 - branches.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-05-09 00:53:18 -0400 (Fri, 09 May 2008)
New Revision: 8020
Removed:
branches/ganymede/
Log:
Branch is now closed - trunk is thew new ganymede
17 years, 11 months
JBoss Tools SVN: r8019 - in trunk/ws/plugins: org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages and 4 other directories.
by jbosstools-commits@lists.jboss.org
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){
17 years, 11 months
JBoss Tools SVN: r8018 - in trunk/ws/plugins/org.jboss.tools.ws.core: META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-05-08 22:50:12 -0400 (Thu, 08 May 2008)
New Revision: 8018
Added:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
Log:
modify for spell error and add support for ws project classpath --jira2047
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF 2008-05-09 02:49:57 UTC (rev 8017)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF 2008-05-09 02:50:12 UTC (rev 8018)
@@ -11,7 +11,8 @@
org.eclipse.wst.common.frameworks,
org.eclipse.core.resources,
org.eclipse.jst.ws,
- org.eclipse.jdt.core
+ org.eclipse.jdt.core,
+ org.eclipse.jdt.launching
Eclipse-LazyStart: true
Bundle-Vendor: %PLUGIN_PROVIDER
Export-Package: org.jboss.tools.ws.core,
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2008-05-09 02:49:57 UTC (rev 8017)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2008-05-09 02:50:12 UTC (rev 8018)
@@ -55,6 +55,13 @@
<runtime-component
any="true"/>
</supported>
+ </extension>
+ <extension
+ point="org.eclipse.jdt.core.classpathContainerInitializer">
+ <classpathContainerInitializer
+ class="org.jboss.tools.ws.core.classpath.JbossWSRuntimeClassPathInitializer"
+ id="JbossWSRuntimeLib">
+ </classpathContainerInitializer>
</extension>
</plugin>
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties 2008-05-09 02:49:57 UTC (rev 8017)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties 2008-05-09 02:50:12 UTC (rev 8018)
@@ -3,4 +3,5 @@
DIR_CLIENT=client
DIR_WEB_INF=WEB-INF
DIR_WEB_CONTENT=WebContent
-ERROR_COPY=Exception while copy JBossWS jars
\ No newline at end of file
+ERROR_COPY=Exception while copy JBossWS jars
+WS_LOCATION=jbosswsruntimelocation
\ No newline at end of file
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java 2008-05-09 02:49:57 UTC (rev 8017)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java 2008-05-09 02:50:12 UTC (rev 8018)
@@ -27,6 +27,7 @@
public static String DIR_WEB_INF;
public static String DIR_WEB_CONTENT;
public static String ERROR_COPY;
+ public static String WS_LOCATION;
static {
Added: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java 2008-05-09 02:50:12 UTC (rev 8018)
@@ -0,0 +1,108 @@
+package org.jboss.tools.ws.core.classpath;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.ClasspathContainerInitializer;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.jboss.tools.ws.core.utils.JbossWSCoreUtils;
+
+public class JbossWSRuntimeClassPathInitializer extends
+ ClasspathContainerInitializer {
+
+ public static final String ID = "JbossWSRuntimeLib";
+
+ public JbossWSRuntimeClassPathInitializer() {
+ }
+
+ @Override
+ public void initialize(IPath containerPath, IJavaProject project)
+ throws CoreException {
+
+ if (containerPath.segment(0).equals(ID)) {
+ JbossWSRuntimeClasspathContainer container = new JbossWSRuntimeClasspathContainer(
+ containerPath);
+ System.out.println(project.getElementName()+ " before "+project.getRawClasspath().length);
+ for(int i=0;i<project.getRawClasspath().length;i++){
+ System.out.println(i+" classpath entry = " + project.getRawClasspath()[i]);
+ }
+ JavaCore.setClasspathContainer(containerPath,
+ new IJavaProject[] {project},
+ new IClasspathContainer[] {container}, null);
+ System.out.println(project.getElementName()+" after "+project.getRawClasspath().length);
+ for(int i=0;i<project.getRawClasspath().length;i++){
+ System.out.println(i+" classpath entry = " + project.getRawClasspath()[i]);
+ }
+ }
+ }
+
+ public IClasspathEntry[] getEntries(IPath path) {
+ return new JbossWSRuntimeClasspathContainer(path).getClasspathEntries();
+ }
+
+ public class JbossWSRuntimeClasspathContainer implements
+ IClasspathContainer {
+ private IPath path;
+ private IClasspathEntry[] entries = null;
+
+ public JbossWSRuntimeClasspathContainer(IPath path) {
+ this.path = path;
+ }
+
+ public String getDescription() {
+ return "JBoss WS Runtime";
+ }
+
+ public int getKind() {
+ return IClasspathContainer.K_APPLICATION;
+ }
+
+ public IPath getPath() {
+ return path;
+ }
+
+ public IClasspathEntry[] getClasspathEntries() {
+ if (entries == null) {
+ loadClasspathEntries();
+ if (entries == null)
+ return new IClasspathEntry[0];
+ }
+ return entries;
+ }
+
+ private void loadClasspathEntries() {
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
+ IPath libpath = JbossWSCoreUtils.getJbossLibPath();
+ list.addAll(Arrays.asList(getEntries(libpath)));
+ libpath = JbossWSCoreUtils.getJbossClientPath();
+
+ list.addAll(Arrays.asList(getEntries(libpath)));
+
+ entries = list.toArray(new IClasspathEntry[list.size()]);
+ }
+
+ protected IClasspathEntry getEntry(IPath path) {
+ return JavaRuntime.newArchiveRuntimeClasspathEntry(path)
+ .getClasspathEntry();
+ }
+
+ protected IClasspathEntry[] getEntries(IPath folder) {
+ String[] files = folder.toFile().list();
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
+ for (int i = 0; i < files.length; i++) {
+ if (files[i].endsWith(".jar")) {
+ list.add(getEntry(folder.append(files[i])));
+ }//else if(new File(files[i] instanceof Folder)){}
+ }
+ return list.toArray(new IClasspathEntry[list.size()]);
+ }
+
+ }
+
+}
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java 2008-05-09 02:49:57 UTC (rev 8017)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java 2008-05-09 02:50:12 UTC (rev 8018)
@@ -14,15 +14,10 @@
import org.eclipse.core.commands.ExecutionException;
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.core.runtime.Path;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.jboss.tools.ws.core.JbossWSCoreMessages;
-import org.jboss.tools.ws.core.JbossWSCorePlugin;
import org.jboss.tools.ws.core.utils.JbossWSCoreUtils;
public class JbossWSClassPathCommand extends AbstractDataModelOperation {
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-05-09 02:49:57 UTC (rev 8017)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-05-09 02:50:12 UTC (rev 8018)
@@ -17,12 +17,9 @@
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.core.runtime.Status;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
import org.jboss.tools.ws.core.JbossWSCoreMessages;
-import org.jboss.tools.ws.core.JbossWSCorePlugin;
import org.jboss.tools.ws.core.utils.JbossWSCoreUtils;
public class JbossWSRuntimeCommand extends AbstractDataModelOperation {
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java 2008-05-09 02:49:57 UTC (rev 8017)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java 2008-05-09 02:50:12 UTC (rev 8018)
@@ -223,11 +223,12 @@
try {
IJavaProject javaProject = JavaCore.create(project);
+
IClasspathEntry newClasspath = JavaCore
- .newContainerEntry(getJbossLibPath());
+ .newContainerEntry(new Path("JbossWSRuntimeLib"));
IClasspathEntry[] oldClasspathEntries = javaProject
- .getRawClasspath();
+ .readRawClasspath();
boolean isFolderInClassPathAlready = false;
for (int i = 0; i < oldClasspathEntries.length
@@ -263,10 +264,38 @@
public static IPath getJbossLibPath() {
IPreferenceStore ps = JbossWSCorePlugin.getDefault()
.getPreferenceStore();
- String runtimeLocation = ps.getString("jbosswsruntimelocation");
+ String runtimeLocation = ps.getString(JbossWSCoreMessages.WS_LOCATION);
+
+ if(runtimeLocation == null || runtimeLocation.equals("")){
+
+ }
IPath libPath = new Path(runtimeLocation);
return libPath.append(JbossWSCoreMessages.DIR_LIB);
}
+
+ public static IPath getJbossClientPath() {
+ IPreferenceStore ps = JbossWSCorePlugin.getDefault()
+ .getPreferenceStore();
+ String runtimeLocation = ps.getString(JbossWSCoreMessages.WS_LOCATION);
+
+ if(runtimeLocation == null || runtimeLocation.equals("")){
+
+ }
+ IPath libPath = new Path(runtimeLocation);
+ return libPath.append(JbossWSCoreMessages.DIR_CLIENT);
+ }
+
+ public static IPath getJbossWSRuntimePath() {
+ IPreferenceStore ps = JbossWSCorePlugin.getDefault()
+ .getPreferenceStore();
+ String runtimeLocation = ps.getString(JbossWSCoreMessages.WS_LOCATION);
+
+ if(runtimeLocation == null || runtimeLocation.equals("")){
+
+ }
+ return new Path(runtimeLocation);
+ }
+
}
17 years, 11 months
JBoss Tools SVN: r8017 - trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-05-08 22:49:57 -0400 (Thu, 08 May 2008)
New Revision: 8017
Added:
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/WSDL2JavaCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java
Removed:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommnad.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommnad.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommnad.java
Log:
modify for spell error and add support for ws project classpath --jira2047
Copied: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommand.java (from rev 7988, trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommnad.java)
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommand.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommand.java 2008-05-09 02:49:57 UTC (rev 8017)
@@ -0,0 +1,62 @@
+package org.jboss.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;
+import org.eclipse.wst.wsdl.WSDLFactory;
+import org.eclipse.wst.wsdl.internal.impl.wsdl4j.WSDLFactoryImpl;
+import org.eclipse.wst.wsdl.internal.util.WSDLDefinitionFactory;
+import org.eclipse.wst.wsdl.internal.util.WSDLUtil;
+import org.eclipse.wst.wsdl.util.WSDLParser;
+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.WSDLPropertyReader;
+
+public class InitialCommand extends AbstractDataModelOperation {
+
+ private ServiceModel model;
+ private IWebService ws;
+ private int scenario;
+
+ public InitialCommand(ServiceModel model, IWebService ws, int scenario) {
+ this.model = model;
+ this.ws = ws;
+ this.scenario = scenario;
+ }
+
+ @Override
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+
+ model.setTarget(JBossWSCreationCoreMessages.getString("VALUE_TARGET_1"));
+ 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);
+ }
+ }else {
+ model.setServiceClass(ws.getWebServiceInfo().getImplURL());
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ public ServiceModel getWebServiceDataModel() {
+
+ return model;
+ }
+
+}
Deleted: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommnad.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommnad.java 2008-05-09 02:49:47 UTC (rev 8016)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommnad.java 2008-05-09 02:49:57 UTC (rev 8017)
@@ -1,62 +0,0 @@
-package org.jboss.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;
-import org.eclipse.wst.wsdl.WSDLFactory;
-import org.eclipse.wst.wsdl.internal.impl.wsdl4j.WSDLFactoryImpl;
-import org.eclipse.wst.wsdl.internal.util.WSDLDefinitionFactory;
-import org.eclipse.wst.wsdl.internal.util.WSDLUtil;
-import org.eclipse.wst.wsdl.util.WSDLParser;
-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.WSDLPropertyReader;
-
-public class InitialCommnad extends AbstractDataModelOperation {
-
- private ServiceModel model;
- private IWebService ws;
- private int scenario;
-
- public InitialCommnad(ServiceModel model, IWebService ws, int scenario) {
- this.model = model;
- this.ws = ws;
- this.scenario = scenario;
- }
-
- @Override
- public IStatus execute(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
-
- model.setTarget(JBossWSCreationCoreMessages.getString("VALUE_TARGET_1"));
- 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);
- }
- }else {
- model.setServiceClass(ws.getWebServiceInfo().getImplURL());
- }
-
- return Status.OK_STATUS;
- }
-
- public ServiceModel getWebServiceDataModel() {
-
- return model;
- }
-
-}
Copied: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java (from rev 7988, trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommnad.java)
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java 2008-05-09 02:49:57 UTC (rev 8017)
@@ -0,0 +1,142 @@
+package org.jboss.tools.ws.creation.core.commands;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.util.List;
+
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.core.commands.ExecutionException;
+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.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.jboss.tools.ws.core.JbossWSCorePlugin;
+import org.jboss.tools.ws.creation.core.data.ServiceModel;
+import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
+
+public class WSDL2JavaCommand extends AbstractDataModelOperation{
+
+ private ServiceModel model;
+
+
+ public WSDL2JavaCommand(ServiceModel model){
+ this.model = model;
+ }
+
+ @Override
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+
+ String runtimeLocation = JbossWSCorePlugin.getDefault().getPreferenceStore().getString("jbosswsruntimelocation");
+ String commandLocation = runtimeLocation + Path.SEPARATOR + "bin";
+ String command = "sh wsconsume.sh ";
+ if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0){
+ command = "cmd.exe /c wsconsume.bat ";
+ }
+ String args = getCommandlineArgs();
+ command += " -k " + args + " " + model.getWsdlURI();
+
+ try {
+ Runtime rt = Runtime.getRuntime();
+ Process proc = rt.exec(command, null, new File(commandLocation));
+ InputStreamReader ir = new InputStreamReader(proc.getErrorStream());
+ LineNumberReader input = new LineNumberReader(ir);
+ String str = input.readLine();
+ StringBuffer result = new StringBuffer();
+ while(str != null){
+ System.out.println(str);
+ result.append(str).append("\t\r");
+ str = input.readLine();
+
+ }
+ proc.waitFor();
+ System.out.print(result);
+
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ SAXParserFactory spf = SAXParserFactory.newInstance();
+ refreshProject(model.getWebProjectName(), monitor);
+
+
+ return Status.OK_STATUS;
+ }
+
+ private void refreshProject(String project, IProgressMonitor monitor){
+ try {
+ JBossWSCreationUtils.getProjectByName(project).refreshLocal(2, monitor);
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ private String getCommandlineArgs(){
+ String commandLine;
+ String project = model.getWebProjectName();
+ String projectRoot = JBossWSCreationUtils.getProjectRoot(project).toOSString();
+ commandLine = "-s " + projectRoot + Path.SEPARATOR + "src";
+
+ if(model.getCustomPackage() != null && !"".equals(model.getCustomPackage())){
+ commandLine += " -p " + model.getCustomPackage();
+ }
+
+ List<String> bindingFiles = model.getBindingFiles();
+ for(String bindingFileLocation: bindingFiles){
+ File bindingFile = new File(bindingFileLocation);
+ if(bindingFile.exists()){
+ 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;
+
+ }
+
+/* private List<String> getEnv(){
+ List<String> env = new ArrayList<String>();
+
+ String project = model.getWebProjectName();
+ String projectRoot = JBossWSCreationUtils.getProjectRoot(project).toOSString();
+ env.add("o=" + projectRoot + Path.SEPARATOR + "src");
+
+ String customePkg = model.getPackageText();
+ if(customePkg != null && !"".equals(customePkg)){
+ env.add(" p=" + customePkg);
+ }
+
+ String bindingFileLocation = model.getBindingFileLocation();
+ if(bindingFileLocation != null && !"".equals(bindingFileLocation)){
+ File bindingFile = new File(bindingFileLocation);
+ if(bindingFile.exists()){
+ env.add("b=" + bindingFileLocation);
+ }
+ }
+
+ return env;
+
+ }
+*/
+}
Deleted: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommnad.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommnad.java 2008-05-09 02:49:47 UTC (rev 8016)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommnad.java 2008-05-09 02:49:57 UTC (rev 8017)
@@ -1,142 +0,0 @@
-package org.jboss.tools.ws.creation.core.commands;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.LineNumberReader;
-import java.util.List;
-
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.core.commands.ExecutionException;
-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.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.jboss.tools.ws.core.JbossWSCorePlugin;
-import org.jboss.tools.ws.creation.core.data.ServiceModel;
-import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
-
-public class WSDL2JavaCommnad extends AbstractDataModelOperation{
-
- private ServiceModel model;
-
-
- public WSDL2JavaCommnad(ServiceModel model){
- this.model = model;
- }
-
- @Override
- public IStatus execute(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
-
- String runtimeLocation = JbossWSCorePlugin.getDefault().getPreferenceStore().getString("jbosswsruntimelocation");
- String commandLocation = runtimeLocation + Path.SEPARATOR + "bin";
- String command = "sh wsconsume.sh ";
- if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0){
- command = "cmd.exe /c wsconsume.bat ";
- }
- String args = getCommandlineArgs();
- command += " -k " + args + " " + model.getWsdlURI();
-
- try {
- Runtime rt = Runtime.getRuntime();
- Process proc = rt.exec(command, null, new File(commandLocation));
- InputStreamReader ir = new InputStreamReader(proc.getErrorStream());
- LineNumberReader input = new LineNumberReader(ir);
- String str = input.readLine();
- StringBuffer result = new StringBuffer();
- while(str != null){
- System.out.println(str);
- result.append(str).append("\t\r");
- str = input.readLine();
-
- }
- proc.waitFor();
- System.out.print(result);
-
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- SAXParserFactory spf = SAXParserFactory.newInstance();
- refreshProject(model.getWebProjectName(), monitor);
-
-
- return Status.OK_STATUS;
- }
-
- private void refreshProject(String project, IProgressMonitor monitor){
- try {
- JBossWSCreationUtils.getProjectByName(project).refreshLocal(2, monitor);
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- private String getCommandlineArgs(){
- String commandLine;
- String project = model.getWebProjectName();
- String projectRoot = JBossWSCreationUtils.getProjectRoot(project).toOSString();
- commandLine = "-s " + projectRoot + Path.SEPARATOR + "src";
-
- if(model.getCustomPackage() != null && !"".equals(model.getCustomPackage())){
- commandLine += " -p " + model.getCustomPackage();
- }
-
- List<String> bindingFiles = model.getBindingFiles();
- for(String bindingFileLocation: bindingFiles){
- File bindingFile = new File(bindingFileLocation);
- if(bindingFile.exists()){
- 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;
-
- }
-
-/* private List<String> getEnv(){
- List<String> env = new ArrayList<String>();
-
- String project = model.getWebProjectName();
- String projectRoot = JBossWSCreationUtils.getProjectRoot(project).toOSString();
- env.add("o=" + projectRoot + Path.SEPARATOR + "src");
-
- String customePkg = model.getPackageText();
- if(customePkg != null && !"".equals(customePkg)){
- env.add(" p=" + customePkg);
- }
-
- String bindingFileLocation = model.getBindingFileLocation();
- if(bindingFileLocation != null && !"".equals(bindingFileLocation)){
- File bindingFile = new File(bindingFileLocation);
- if(bindingFile.exists()){
- env.add("b=" + bindingFileLocation);
- }
- }
-
- return env;
-
- }
-*/
-}
Copied: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java (from rev 7988, trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommnad.java)
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java 2008-05-09 02:49:57 UTC (rev 8017)
@@ -0,0 +1,90 @@
+package org.jboss.tools.ws.creation.core.commands;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+
+import org.eclipse.core.commands.ExecutionException;
+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.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.jboss.tools.ws.core.JbossWSCorePlugin;
+import org.jboss.tools.ws.creation.core.data.ServiceModel;
+import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
+
+public class WSProviderInvokeCommand extends AbstractDataModelOperation{
+
+ private ServiceModel model;
+
+
+ public WSProviderInvokeCommand(ServiceModel model){
+ this.model = model;
+ }
+
+ @Override
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+
+ String runtimeLocation = JbossWSCorePlugin.getDefault().getPreferenceStore().getString("jbosswsruntimelocation");
+ String commandLocation = runtimeLocation + Path.SEPARATOR + "bin";
+ String command = "sh wsprovide.sh ";
+ if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0){
+ command = "cmd.exe /C wsprovide.bat";
+ }
+ String args = getCommandlineArgs();
+ command += " -k " + args;
+
+ try {
+
+ InputStreamReader ir = new InputStreamReader(Runtime.getRuntime().exec(command, null, new File(commandLocation)).getInputStream());
+ LineNumberReader input = new LineNumberReader(ir);
+ String str = input.readLine();
+ while(str != null){
+ System.out.println(str);
+ str = input.readLine();
+ }
+
+
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ refreshProject(model.getWebProjectName(), monitor);
+
+ return Status.OK_STATUS;
+ }
+
+ private void refreshProject(String project, IProgressMonitor monitor){
+ try {
+ JBossWSCreationUtils.getProjectByName(project).refreshLocal(2, monitor);
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ private String getCommandlineArgs(){
+ String commandLine;
+ String project = model.getWebProjectName();
+ String projectRoot = JBossWSCreationUtils.getProjectRoot(project).toOSString();
+ commandLine = "-s " + projectRoot + Path.SEPARATOR + "src";
+
+ if(model.isGenWSDL()){
+ commandLine += " -w ";
+ }
+ commandLine += " -r " + projectRoot + Path.SEPARATOR + "WebContent" + Path.SEPARATOR + "wsdl ";
+
+ commandLine += " -c " + projectRoot + Path.SEPARATOR + "build/classes/ ";
+
+ commandLine += model.getServiceClass();
+
+ return commandLine;
+
+ }
+}
Deleted: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommnad.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommnad.java 2008-05-09 02:49:47 UTC (rev 8016)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommnad.java 2008-05-09 02:49:57 UTC (rev 8017)
@@ -1,90 +0,0 @@
-package org.jboss.tools.ws.creation.core.commands;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.LineNumberReader;
-
-import org.eclipse.core.commands.ExecutionException;
-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.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.jboss.tools.ws.core.JbossWSCorePlugin;
-import org.jboss.tools.ws.creation.core.data.ServiceModel;
-import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
-
-public class WSProviderInvokeCommnad extends AbstractDataModelOperation{
-
- private ServiceModel model;
-
-
- public WSProviderInvokeCommnad(ServiceModel model){
- this.model = model;
- }
-
- @Override
- public IStatus execute(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
-
- String runtimeLocation = JbossWSCorePlugin.getDefault().getPreferenceStore().getString("jbosswsruntimelocation");
- String commandLocation = runtimeLocation + Path.SEPARATOR + "bin";
- String command = "sh wsprovide.sh ";
- if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0){
- command = "cmd.exe /C wsprovide.bat";
- }
- String args = getCommandlineArgs();
- command += " -k " + args;
-
- try {
-
- InputStreamReader ir = new InputStreamReader(Runtime.getRuntime().exec(command, null, new File(commandLocation)).getInputStream());
- LineNumberReader input = new LineNumberReader(ir);
- String str = input.readLine();
- while(str != null){
- System.out.println(str);
- str = input.readLine();
- }
-
-
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- refreshProject(model.getWebProjectName(), monitor);
-
- return Status.OK_STATUS;
- }
-
- private void refreshProject(String project, IProgressMonitor monitor){
- try {
- JBossWSCreationUtils.getProjectByName(project).refreshLocal(2, monitor);
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- private String getCommandlineArgs(){
- String commandLine;
- String project = model.getWebProjectName();
- String projectRoot = JBossWSCreationUtils.getProjectRoot(project).toOSString();
- commandLine = "-s " + projectRoot + Path.SEPARATOR + "src";
-
- if(model.isGenWSDL()){
- commandLine += " -w ";
- }
- commandLine += " -r " + projectRoot + Path.SEPARATOR + "WebContent" + Path.SEPARATOR + "wsdl ";
-
- commandLine += " -c " + projectRoot + Path.SEPARATOR + "build/classes/ ";
-
- commandLine += model.getServiceClass();
-
- return commandLine;
-
- }
-}
17 years, 11 months
JBoss Tools SVN: r8016 - in trunk/ws/plugins/org.jboss.tools.ws.creation.ui: src/org/jboss/tools/ws/creation/ui/wsrt and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-05-08 22:49:47 -0400 (Thu, 08 May 2008)
New Revision: 8016
Modified:
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/wsrt/JBossWSConfigWidgetFactory.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWSProviderInvokeConfigWidgetFactory.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java
Log:
modify for spell error and add support for ws project classpath --jira2047
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:49:37 UTC (rev 8015)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-05-09 02:49:47 UTC (rev 8016)
@@ -6,7 +6,7 @@
<widgetFactory
class="org.jboss.tools.ws.creation.ui.wsrt.JBossWSConfigWidgetFactory"
id="JBossWSWSDL2JavaConfig"
- insertBeforeCommandId="org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommnad">
+ insertBeforeCommandId="org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommand">
</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.WSProviderInvokeCommnad">
+ insertBeforeCommandId="org.jboss.tools.ws.creation.core.commands.WSProviderInvokeCommand">
</widgetFactory>
</extension>
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWSConfigWidgetFactory.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWSConfigWidgetFactory.java 2008-05-09 02:49:37 UTC (rev 8015)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWSConfigWidgetFactory.java 2008-05-09 02:49:47 UTC (rev 8016)
@@ -7,7 +7,7 @@
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributor;
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributorFactory;
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataContributor;
-import org.jboss.tools.ws.creation.core.commands.InitialCommnad;
+import org.jboss.tools.ws.creation.core.commands.InitialCommand;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
import org.jboss.tools.ws.creation.ui.widgets.CodeGenConfigWidget;
@@ -36,7 +36,7 @@
// The framework will actually to the call to getWebServiceDataModel in
// the ExampleDefaultingCommand class and then call the setWebServiceDataModel
// method in this class.
- dataRegistry.addMapping( InitialCommnad.class,
+ dataRegistry.addMapping( InitialCommand.class,
"WebServiceDataModel", //$NON-NLS-1$
JBossWSConfigWidgetFactory.class );
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWSProviderInvokeConfigWidgetFactory.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWSProviderInvokeConfigWidgetFactory.java 2008-05-09 02:49:37 UTC (rev 8015)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWSProviderInvokeConfigWidgetFactory.java 2008-05-09 02:49:47 UTC (rev 8016)
@@ -18,7 +18,7 @@
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributor;
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributorFactory;
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataContributor;
-import org.jboss.tools.ws.creation.core.commands.InitialCommnad;
+import org.jboss.tools.ws.creation.core.commands.InitialCommand;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
import org.jboss.tools.ws.creation.ui.widgets.CodeGenConfigWidget;
import org.jboss.tools.ws.creation.ui.widgets.ProviderInvokeCodeGenConfigWidget;
@@ -53,7 +53,7 @@
// the ExampleDefaultingCommand class and then call the
// setWebServiceDataModel
// method in this class.
- dataRegistry.addMapping(InitialCommnad.class, "WebServiceDataModel", //$NON-NLS-1$
+ dataRegistry.addMapping(InitialCommand.class, "WebServiceDataModel", //$NON-NLS-1$
JBossWSProviderInvokeConfigWidgetFactory.class);
}
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:49:37 UTC (rev 8015)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java 2008-05-09 02:49:47 UTC (rev 8016)
@@ -12,9 +12,9 @@
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.InitialCommnad;
-import org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommnad;
-import org.jboss.tools.ws.creation.core.commands.WSProviderInvokeCommnad;
+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.WSProviderInvokeCommand;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
public class JBossWebService extends AbstractWebService {
@@ -46,13 +46,13 @@
ServiceModel model = new ServiceModel();
model.setWebProjectName(project);
if (ctx.getScenario().getValue() == WebServiceScenario.TOPDOWN) {
- commands.add(new InitialCommnad(model, this, WebServiceScenario.TOPDOWN));
- commands.add(new WSDL2JavaCommnad(model));
+ commands.add(new InitialCommand(model, this, WebServiceScenario.TOPDOWN));
+ commands.add(new WSDL2JavaCommand(model));
//commands.add(new JbossWSRuntimeCommand(ResourcesPlugin.getWorkspace().getRoot().getProject(project)));
}
else if (ctx.getScenario().getValue() == WebServiceScenario.BOTTOMUP){
- commands.add(new InitialCommnad(model, this, WebServiceScenario.BOTTOMUP));
- commands.add(new WSProviderInvokeCommnad(model));
+ commands.add(new InitialCommand(model, this, WebServiceScenario.BOTTOMUP));
+ commands.add(new WSProviderInvokeCommand(model));
//commands.add(new JbossWSRuntimeCommand(ResourcesPlugin.getWorkspace().getRoot().getProject(project)));
}
17 years, 11 months
JBoss Tools SVN: r8015 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-05-08 22:49:37 -0400 (Thu, 08 May 2008)
New Revision: 8015
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java
Log:
modify for spell error and add support for ws project classpath --jira2047
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java 2008-05-09 00:35:13 UTC (rev 8014)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java 2008-05-09 02:49:37 UTC (rev 8015)
@@ -32,6 +32,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.jboss.tools.ws.core.JbossWSCoreMessages;
import org.jboss.tools.ws.core.JbossWSCorePlugin;
import org.jboss.tools.ws.ui.JbossWSUIMessages;
import org.jboss.tools.ws.ui.JbossWSUIPlugin;
@@ -150,7 +151,7 @@
private void storeValues() {
IPreferenceStore store = this.getPreferenceStore();
System.out.println(jbosswsPath.getText());
- store.setValue("jbosswsruntimelocation", jbosswsPath.getText());
+ store.setValue(JbossWSCoreMessages.WS_LOCATION, jbosswsPath.getText());
}
/**
17 years, 11 months
JBoss Tools SVN: r8014 - trunk/legacy.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-05-08 20:35:13 -0400 (Thu, 08 May 2008)
New Revision: 8014
Removed:
trunk/legacy/aop/
trunk/legacy/core/
trunk/legacy/ejb3/
trunk/legacy/releng/
trunk/legacy/xdoclet/
Log:
Removing unmaintained unused legacy plugins which are still available in recent release branches
17 years, 11 months
JBoss Tools SVN: r8013 - trunk/core/plugins/org.jboss.ide.eclipse.ui/src/main/org/jboss/ide/eclipse/ui.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-05-08 20:28:04 -0400 (Thu, 08 May 2008)
New Revision: 8013
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.ui/src/main/org/jboss/ide/eclipse/ui/MainPreferencePage.java
Log:
JBIDE-2191 Unnecessary "Restore Defaults" and "Apply" buttons on JBoss Tools
Modified: trunk/core/plugins/org.jboss.ide.eclipse.ui/src/main/org/jboss/ide/eclipse/ui/MainPreferencePage.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.ui/src/main/org/jboss/ide/eclipse/ui/MainPreferencePage.java 2008-05-09 00:26:22 UTC (rev 8012)
+++ trunk/core/plugins/org.jboss.ide.eclipse.ui/src/main/org/jboss/ide/eclipse/ui/MainPreferencePage.java 2008-05-09 00:28:04 UTC (rev 8013)
@@ -108,7 +108,7 @@
// {
// // Do nothing
// }
-
+ noDefaultAndApplyButton();
return composite;
}
}
17 years, 11 months
JBoss Tools SVN: r8012 - branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.ui/src/main/org/jboss/ide/eclipse/ui.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-05-08 20:26:22 -0400 (Thu, 08 May 2008)
New Revision: 8012
Modified:
branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.ui/src/main/org/jboss/ide/eclipse/ui/MainPreferencePage.java
Log:
JBIDE-2191 Unnecessary "Restore Defaults" and "Apply" buttons on JBoss Tools
Modified: branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.ui/src/main/org/jboss/ide/eclipse/ui/MainPreferencePage.java
===================================================================
--- branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.ui/src/main/org/jboss/ide/eclipse/ui/MainPreferencePage.java 2008-05-08 23:54:28 UTC (rev 8011)
+++ branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.ui/src/main/org/jboss/ide/eclipse/ui/MainPreferencePage.java 2008-05-09 00:26:22 UTC (rev 8012)
@@ -109,6 +109,7 @@
// // Do nothing
// }
+ noDefaultAndApplyButton();
return composite;
}
}
17 years, 11 months
JBoss Tools SVN: r8011 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: xpl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-05-08 19:54:28 -0400 (Thu, 08 May 2008)
New Revision: 8011
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java
Log:
JBIDE-2198 Unhandled event loop exception when use shift-F6 and alt-shift-F6 as shortcuts to toggle between the various states of the splitpane.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-05-08 23:52:27 UTC (rev 8010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-05-08 23:54:28 UTC (rev 8011)
@@ -844,6 +844,8 @@
public void partActivated(IWorkbenchPart part) {
fActivePart = part;
handleActivation();
+ if (part == multiPageEditor)
+ activateKeys();
}
public void partBroughtToTop(IWorkbenchPart part) {
@@ -854,22 +856,24 @@
public void partDeactivated(IWorkbenchPart part) {
fActivePart = null;
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (fContextActivation != null) {
- IContextService contextService = (IContextService) workbench
- .getAdapter(IContextService.class);
- contextService.deactivateContext(fContextActivation);
- }
+ if (part == multiPageEditor) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ if (fContextActivation != null) {
+ IContextService contextService = (IContextService) workbench
+ .getAdapter(IContextService.class);
+ contextService.deactivateContext(fContextActivation);
+ }
- IHandlerService handlerService = (IHandlerService) workbench
- .getService(IHandlerService.class);
- if (handlerService != null) {
- if (sourceActivation != null)
- handlerService.deactivateHandler(sourceActivation);
- if (visualActivation != null)
- handlerService.deactivateHandler(visualActivation);
- if (jumpingActivation != null)
- handlerService.deactivateHandler(jumpingActivation);
+ IHandlerService handlerService = (IHandlerService) workbench
+ .getService(IHandlerService.class);
+ if (handlerService != null) {
+ if (sourceActivation != null)
+ handlerService.deactivateHandler(sourceActivation);
+ if (visualActivation != null)
+ handlerService.deactivateHandler(visualActivation);
+ if (jumpingActivation != null)
+ handlerService.deactivateHandler(jumpingActivation);
+ }
}
}
@@ -898,29 +902,32 @@
}
sourceEditor.safelySanityCheckState(getEditorInput());
}
- IWorkbench workbench = PlatformUI.getWorkbench();
- IContextService contextService = (IContextService) workbench
- .getAdapter(IContextService.class);
- fContextActivation = contextService
- .activateContext(VPE_EDITOR_CONTEXT); //$NON-NLS-1$
- IHandlerService handlerService = (IHandlerService) workbench
- .getService(IHandlerService.class);
- if (handlerService != null) {
- sourceActivation = handlerService.activateHandler(
- VPE_SOURCE_MAXMIN,
- sourceMaxmin);
- visualActivation = handlerService.activateHandler(
- VPE_VISUAL_MAXMIN,
- visualMaxmin);
- jumpingActivation = handlerService.activateHandler(
- VPE_JUMPING,
- jumping);
- }
} finally {
fIsHandlingActivation = false;
}
}
}
+
+ private void activateKeys() {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IContextService contextService = (IContextService) workbench
+ .getAdapter(IContextService.class);
+ fContextActivation = contextService
+ .activateContext(VPE_EDITOR_CONTEXT); //$NON-NLS-1$
+ IHandlerService handlerService = (IHandlerService) workbench
+ .getService(IHandlerService.class);
+ if (handlerService != null) {
+ sourceActivation = handlerService.activateHandler(
+ VPE_SOURCE_MAXMIN,
+ sourceMaxmin);
+ visualActivation = handlerService.activateHandler(
+ VPE_VISUAL_MAXMIN,
+ visualMaxmin);
+ jumpingActivation = handlerService.activateHandler(
+ VPE_JUMPING,
+ jumping);
+ }
+ }
}
public VpeController getController() {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java 2008-05-08 23:52:27 UTC (rev 8010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java 2008-05-08 23:54:28 UTC (rev 8011)
@@ -178,12 +178,12 @@
public void upClicked() {
- if (currentSashInfo != null)
+ if (currentSashInfo != null && currentSashInfo.weight >= 0)
upClicked(currentSashInfo);
}
public void downClicked() {
- if (currentSashInfo != null)
+ if (currentSashInfo != null && currentSashInfo.weight >= 0)
downClicked(currentSashInfo);
}
17 years, 11 months