From 91561be4aed97b898adec4bb79e98bd0313f24de Mon Sep 17 00:00:00 2001 From: James Blackburn Date: Tue, 11 May 2010 11:10:01 +0000 Subject: [PATCH] Bug 297557 getProjectDescription returns null for non-CDT projects; use the shared description for the decorator. --- .../cdt/internal/ui/viewsupport/ExcludedFileDecorator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ExcludedFileDecorator.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ExcludedFileDecorator.java index b72196ed2a6..59aacb4c66b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ExcludedFileDecorator.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ExcludedFileDecorator.java @@ -37,7 +37,9 @@ public class ExcludedFileDecorator implements ILightweightLabelDecorator { if (element instanceof IFile) { IFile resource = (IFile) element; ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager(); - ICProjectDescription desc = mngr.getProjectDescription(resource.getProject()); + ICProjectDescription desc = mngr.getProjectDescription(resource.getProject(), false); + if (desc == null) + return; ICConfigurationDescription conf = desc.getDefaultSettingConfiguration(); ICSourceEntry[] entries = conf.getSourceEntries(); boolean isSource = false;