From 42931e5db14ae5b4f30a2db6b04aa6afd7d42e20 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Thu, 2 Jun 2011 02:47:38 +0000 Subject: [PATCH] Bug 348039 - When creating new class project header file is treated as system include. --- .../internal/ui/wizards/classwizard/NewClassCodeGenerator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) {