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
|
@ -39,6 +39,18 @@ public class PseudoNameGenerator {
|
||||||
typeName = typeName.substring(0, 1).toLowerCase() + typeName.substring(1);
|
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 numberString = ""; //$NON-NLS-1$
|
||||||
String newNameCandidate;
|
String newNameCandidate;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue