diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java index 730f1f9cdf7..a3f6c61ee9b 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java @@ -439,8 +439,7 @@ public class CoreModel { * @param includePath * the absolute path of the include * @param isSystemInclude - * wheter this include path should be consider the system - * include path + * whether this include path should be consider a system include path * @return IIncludeEntry */ public static IIncludeEntry newIncludeEntry(IPath resourcePath, IPath includePath, boolean isSystemInclude) { @@ -457,9 +456,6 @@ public class CoreModel { * @param isSystemInclude * wheter this include path should be consider the system * include path - * @param isRecursive - * if the resource is a folder the include applied to all - * recursively * @param exclusionPatterns * exclusion patterns in the resource if a container * @return IIincludeEntry @@ -489,14 +485,35 @@ public class CoreModel { */ public static IIncludeEntry newIncludeEntry(IPath resourcePath, IPath includePath, IPath basePath, boolean isSystemInclude, IPath[] exclusionPatterns) { - return new IncludeEntry(resourcePath, includePath, basePath, isSystemInclude, exclusionPatterns); + return newIncludeEntry(resourcePath, includePath, basePath, isSystemInclude, exclusionPatterns, resourcePath == null || resourcePath.isEmpty()); + } + + /** + * Creates and returns a new entry of kind CDT_INCLUDE + * + * @param path + * the affected project-relative resource path + * @param includePath + * the path of the include + * @param basePath + * the base path of the include + * @param isSystemInclude + * wheter this include path should be consider the system + * include path + * @param exclusionPatterns + * exclusion patterns in the resource if a container + * @param isExported + * if the entry ix exported to reference projects + * @return IIincludeEntry + */ + public static IIncludeEntry newIncludeEntry(IPath resourcePath, IPath includePath, IPath basePath, boolean isSystemInclude, + IPath[] exclusionPatterns, boolean isExported) { + return new IncludeEntry(resourcePath, includePath, basePath, isSystemInclude, exclusionPatterns, isExported); } /** * Creates and returns an entry kind CDT_MACRO * - * @param path - * the affected workspace-relative resource path * @param macroName * the name of the macro * @param macroValue diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java index e07301dbaab..60e4bcdda1a 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java @@ -19,8 +19,9 @@ public class IncludeEntry extends APathEntry implements IIncludeEntry { IPath includePath; boolean isSystemInclude; - public IncludeEntry(IPath resourcePath, IPath includePath, IPath basePath, boolean isSystemInclude, IPath[] exclusionPatterns) { - super(IIncludeEntry.CDT_INCLUDE, resourcePath, basePath, exclusionPatterns, resourcePath == null); + public IncludeEntry(IPath resourcePath, IPath includePath, IPath basePath, boolean isSystemInclude, + IPath[] exclusionPatterns, boolean isExported) { + super(IIncludeEntry.CDT_INCLUDE, resourcePath, basePath, exclusionPatterns, isExported); this.includePath = includePath; this.isSystemInclude = isSystemInclude; } diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java index 58511a921c7..7a40cd17b35 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java @@ -735,7 +735,7 @@ public class PathEntryManager implements ICDescriptorListener { if (element.hasAttribute(ATTRIBUTE_SYSTEM)) { isSystemInclude = element.getAttribute(ATTRIBUTE_SYSTEM).equals(VALUE_TRUE); } - return CoreModel.newIncludeEntry(path, includePath, basePath, isSystemInclude, exclusionPatterns); + return CoreModel.newIncludeEntry(path, includePath, basePath, isSystemInclude, exclusionPatterns, isExported); } case IPathEntry.CDT_MACRO : {