mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 328068 - Creation of element failed error when creating new C++ class
This commit is contained in:
parent
a76a17353c
commit
b78e2ea29a
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ public class StubUtility {
|
|||
context.setVariable(CodeTemplateContextType.ENCLOSING_TYPE, typeName);
|
||||
context.setVariable(CodeTemplateContextType.BODY_STATEMENT, bodyStatement != null ? bodyStatement : ""); //$NON-NLS-1$
|
||||
String str= evaluateTemplate(context, template, new String[] { CodeTemplateContextType.BODY_STATEMENT });
|
||||
if (str == null && !Strings.containsOnlyWhitespaces(bodyStatement)) {
|
||||
if (str == null && bodyStatement != null && !Strings.containsOnlyWhitespaces(bodyStatement)) {
|
||||
return bodyStatement;
|
||||
}
|
||||
return str;
|
||||
|
|
Loading…
Add table
Reference in a new issue