From fb12c431461e5dcf33d585e6d9c0161bc0734c51 Mon Sep 17 00:00:00 2001 From: Marc-Andre Laperle Date: Mon, 6 Jan 2014 10:37:01 -0500 Subject: [PATCH] Bug 424635 - The wrench icon overlay for a source file does not appear When the language settings providers functionality is enabled, also check for build settings customization, not just the language setting entries. Change-Id: Ia9fec3bc377617dc9f2264dd924941879f1b64b0 Signed-off-by: Marc-Andre Laperle Reviewed-on: https://git.eclipse.org/r/20297 Tested-by: Hudson CI Reviewed-by: Andrew Gvozdev IP-Clean: Andrew Gvozdev Tested-by: Andrew Gvozdev --- .../CustomBuildSettingsDecorator.java | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CustomBuildSettingsDecorator.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CustomBuildSettingsDecorator.java index 41a7d2ab31f..d2fb760dc79 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CustomBuildSettingsDecorator.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CustomBuildSettingsDecorator.java @@ -54,27 +54,24 @@ public class CustomBuildSettingsDecorator implements ILightweightLabelDecorator } private static boolean isCustomizedResource(ICConfigurationDescription cfgDescription, IResource rc) { - if (!ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(rc.getProject())) { - ICResourceDescription rcDescription = cfgDescription.getResourceDescription(rc.getProjectRelativePath(), true); - return rcDescription != null; - } - - if (cfgDescription instanceof ILanguageSettingsProvidersKeeper) { - IContainer parent = rc.getParent(); - List languages = LanguageSettingsManager.getLanguages(rc, cfgDescription); - for (ILanguageSettingsProvider provider: ((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders()) { - for (String languageId : languages) { - List list = provider.getSettingEntries(cfgDescription, rc, languageId); - if (list != null) { - List listDefault = provider.getSettingEntries(cfgDescription, parent, languageId); - // != is OK here due as the equal lists will have the same reference in WeakHashSet - if (list != listDefault) - return true; + if (ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(rc.getProject()) && cfgDescription instanceof ILanguageSettingsProvidersKeeper) { + IContainer parent = rc.getParent(); + List languages = LanguageSettingsManager.getLanguages(rc, cfgDescription); + for (ILanguageSettingsProvider provider: ((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders()) { + for (String languageId : languages) { + List list = provider.getSettingEntries(cfgDescription, rc, languageId); + if (list != null) { + List listDefault = provider.getSettingEntries(cfgDescription, parent, languageId); + // != is OK here due as the equal lists will have the same reference in WeakHashSet + if (list != listDefault) + return true; + } } } - } } - return false; + + ICResourceDescription rcDescription = cfgDescription.getResourceDescription(rc.getProjectRelativePath(), true); + return rcDescription != null; } @Override