mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
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 <marc-andre.laperle@ericsson.com> Reviewed-on: https://git.eclipse.org/r/20297 Tested-by: Hudson CI Reviewed-by: Andrew Gvozdev <angvoz.dev@gmail.com> IP-Clean: Andrew Gvozdev <angvoz.dev@gmail.com> Tested-by: Andrew Gvozdev <angvoz.dev@gmail.com>
This commit is contained in:
parent
6918b6c685
commit
fb12c43146
1 changed files with 15 additions and 18 deletions
|
@ -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<String> languages = LanguageSettingsManager.getLanguages(rc, cfgDescription);
|
||||
for (ILanguageSettingsProvider provider: ((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders()) {
|
||||
for (String languageId : languages) {
|
||||
List<ICLanguageSettingEntry> list = provider.getSettingEntries(cfgDescription, rc, languageId);
|
||||
if (list != null) {
|
||||
List<ICLanguageSettingEntry> 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<String> languages = LanguageSettingsManager.getLanguages(rc, cfgDescription);
|
||||
for (ILanguageSettingsProvider provider: ((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders()) {
|
||||
for (String languageId : languages) {
|
||||
List<ICLanguageSettingEntry> list = provider.getSettingEntries(cfgDescription, rc, languageId);
|
||||
if (list != null) {
|
||||
List<ICLanguageSettingEntry> 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
|
||||
|
|
Loading…
Add table
Reference in a new issue