### Eclipse Workspace Patch 1.0 #P org.eclipse.wst.wsdl.ui Index: src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/actions/SmartRenameAction.java =================================================================== RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/actions/SmartRenameAction.java,v retrieving revision 1.9 diff -u -r1.9 SmartRenameAction.java --- src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/actions/SmartRenameAction.java 3 Sep 2008 22:46:22 -0000 1.9 +++ src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/actions/SmartRenameAction.java 25 Feb 2009 21:59:22 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2008 IBM Corporation and others. + * Copyright (c) 2001, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -34,6 +34,7 @@ import org.eclipse.wst.wsdl.binding.soap.SOAPOperation; import org.eclipse.wst.wsdl.ui.internal.Messages; import org.eclipse.wst.wsdl.ui.internal.commands.AddBaseParameterCommand; +import org.eclipse.wst.wsdl.ui.internal.util.NameUtil; import org.eclipse.wst.wsdl.ui.internal.util.WSDLEditorUtil; import org.eclipse.xsd.XSDElementDeclaration; import org.w3c.dom.Node; @@ -216,7 +217,7 @@ if (msg != null) { oldMessageName = msg.getQName().getLocalPart(); - if (isMessageNameGenerated(oldMessageName, oldName, fault.getName())) { + if (isMessageNameGenerated(oldMessageName, oldName, NameUtil.buildFirstCharUppercaseName(fault.getName()))) { renameMessageHelper(msg, computeNewMessageName(msg, oldName, newName)); if (msg.getEParts() != null) Index: src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/util/NameUtil.java =================================================================== RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/util/NameUtil.java,v retrieving revision 1.5 diff -u -r1.5 NameUtil.java --- src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/util/NameUtil.java 30 May 2006 06:25:49 -0000 1.5 +++ src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/util/NameUtil.java 25 Feb 2009 21:59:22 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2006 IBM Corporation and others. + * Copyright (c) 2001, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -578,4 +578,17 @@ return usedNames; } + + /** + * Returns a copy of the input string with the the first letter converted to uppercase. + * @param name the input name. Must not be null. + * @return a a copy of the input string with the the first letter converted to uppercase. + */ + public static String buildFirstCharUppercaseName(String name) { + int length = name.length(); + char[] buffer = new char[length]; + buffer[0] = Character.toUpperCase(name.charAt(0)); + name.getChars(1, length, buffer, 1); + return String.copyValueOf(buffer); + } } Index: src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/commands/AddFaultParameterCommand.java =================================================================== RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/commands/AddFaultParameterCommand.java,v retrieving revision 1.7 diff -u -r1.7 AddFaultParameterCommand.java --- src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/commands/AddFaultParameterCommand.java 2 May 2007 19:07:46 -0000 1.7 +++ src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/commands/AddFaultParameterCommand.java 25 Feb 2009 21:59:22 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2007 IBM Corporation and others. + * Copyright (c) 2001, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -116,7 +116,7 @@ protected String getAnonymousXSDElementBaseName() { if (newAnonymousXSDElementName == null) { - newAnonymousXSDElementName = operation.getName() + "_" + getFaultName(); //$NON-NLS-1$ + newAnonymousXSDElementName = operation.getName() + NameUtil.buildFirstCharUppercaseName(faultName); } return newAnonymousXSDElementName; @@ -124,7 +124,7 @@ protected String getNewXSDElementBaseName() { if (newXSDElementName == null) { - newXSDElementName = operation.getName() + "_" + getFaultName(); //$NON-NLS-1$ + newXSDElementName = operation.getName() + NameUtil.buildFirstCharUppercaseName(faultName); } return newXSDElementName; @@ -132,7 +132,7 @@ protected String getWSDLMessageName() { if (newWSDLMessageName == null) { - newWSDLMessageName = operation.getName() + "_" + getFaultName() + "Msg"; //$NON-NLS-1$ //$NON-NLS-2$ + newWSDLMessageName = operation.getName() + NameUtil.buildFirstCharUppercaseName(faultName); List usedNames = NameUtil.getUsedMessageNames(operation.getEnclosingDefinition()); newWSDLMessageName = NameUtil.getUniqueNameHelper(newWSDLMessageName, usedNames); }