diff options
author | Anton Leherbauer | 2010-10-22 08:25:56 +0000 |
---|---|---|
committer | Anton Leherbauer | 2010-10-22 08:25:56 +0000 |
commit | b78e2ea29a8dd4692415fedc19d1727c351d4109 (patch) | |
tree | 288c163409ed8dffdce6f5e02ffb826859877365 /core | |
parent | a76a17353cd91f34512753e062fa935b2d52f05b (diff) | |
download | org.eclipse.cdt-b78e2ea29a8dd4692415fedc19d1727c351d4109.tar.gz org.eclipse.cdt-b78e2ea29a8dd4692415fedc19d1727c351d4109.tar.xz org.eclipse.cdt-b78e2ea29a8dd4692415fedc19d1727c351d4109.zip |
Bug 328068 - Creation of element failed error when creating new C++ class
Diffstat (limited to 'core')
-rw-r--r-- | core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java index f1d268d9372..5e8e0112ba6 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java @@ -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; |