diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataUtil.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataUtil.java index 2b4d8861e7d..f07ca395ec3 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataUtil.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataUtil.java @@ -577,12 +577,38 @@ public class CDataUtil { public static boolean canExclude(IPath path, boolean isFolder, boolean excluded, ICSourceEntry[] entries){ try { - return setExcluded(path, isFolder, excluded, entries, false) != null; - } catch (CoreException e) { - } + ICSourceEntry[] out = setExcluded(path, isFolder, excluded, entries, false); + return !isEqual(entries, out); + } catch (CoreException e) { } return false; } + /** + * + * @param ein - initial source entries + * @param aus - resulting source entries + * @return - true if they are equal + */ + public static boolean isEqual(ICSourceEntry[] ein, ICSourceEntry[] aus) { + if (ein == null || aus == null) return (ein == null && aus == null); + if (ein.length != aus.length) return false; + for (int i=0; i