mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
FIXED - bug 291268: Source->Implement Method goes into an infinite loop for parameter with white spaces in type name
https://bugs.eclipse.org/bugs/show_bug.cgi?id=291268
This commit is contained in:
parent
d2cb70aeb5
commit
45872aa127
1 changed files with 13 additions and 1 deletions
|
@ -38,7 +38,19 @@ public class PseudoNameGenerator {
|
|||
if(typeName.length() != 0) {
|
||||
typeName = typeName.substring(0, 1).toLowerCase() + typeName.substring(1);
|
||||
}
|
||||
|
||||
|
||||
nameParts = typeName.split("\\s"); //$NON-NLS-1$
|
||||
for (int i = 0; i < nameParts.length; i++) {
|
||||
if(i <= 0) {
|
||||
typeName = nameParts[i];
|
||||
}else {
|
||||
typeName = typeName.concat(nameParts[i].substring(0,1).toUpperCase());
|
||||
if(nameParts[i].length() > 1) {
|
||||
typeName = typeName.concat(nameParts[i].substring(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String numberString = ""; //$NON-NLS-1$
|
||||
String newNameCandidate;
|
||||
int index = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue