diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java index 0631ec5985b..54c82f79ec8 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java @@ -1055,7 +1055,8 @@ public class NewClassCodeGenerator { IPath includePath = PathUtil.makeRelativePathToProjectIncludes(headerLocation, project); boolean isSystemIncludePath = false; - if (includePath != null && !projectLocation.isPrefixOf(headerLocation)) { + if (headerTU.getResource() == null && includePath != null + && !projectLocation.isPrefixOf(headerLocation)) { isSystemIncludePath = true; } else if (projectLocation.isPrefixOf(headerLocation) && projectLocation.isPrefixOf(sourceLocation)) {