mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed decorators in PE showing incorrectly for legacy (MBS provider)
This commit is contained in:
parent
3713fcd080
commit
8c7108d523
3 changed files with 10 additions and 13 deletions
|
@ -69,7 +69,7 @@ public class MBSLanguageSettingsProvider extends AbstractExecutableExtensionBase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return LanguageSettingsStorage.getPooledList(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ICLanguageSetting[] getLanguageSettings(ICResourceDescription rcDescription) {
|
private ICLanguageSetting[] getLanguageSettings(ICResourceDescription rcDescription) {
|
||||||
|
|
|
@ -77,6 +77,8 @@ public interface ILanguageSettingsProvider {
|
||||||
* (see {@link LanguageManager#getLanguageForFile(org.eclipse.core.resources.IFile, ICConfigurationDescription)}).
|
* (see {@link LanguageManager#getLanguageForFile(org.eclipse.core.resources.IFile, ICConfigurationDescription)}).
|
||||||
*
|
*
|
||||||
* @return the list of setting entries or {@code null} if no settings defined.
|
* @return the list of setting entries or {@code null} if no settings defined.
|
||||||
|
* The list needs to be a pooled list created by {@link LanguageSettingsStorage#getPooledList(List)}
|
||||||
|
* to save memory and avoid deep equality comparisons.
|
||||||
*/
|
*/
|
||||||
public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription cfgDescription, IResource rc, String languageId);
|
public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription cfgDescription, IResource rc, String languageId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@ import org.eclipse.swt.graphics.Point;
|
||||||
import org.eclipse.swt.graphics.Rectangle;
|
import org.eclipse.swt.graphics.Rectangle;
|
||||||
import org.eclipse.ui.texteditor.MarkerUtilities;
|
import org.eclipse.ui.texteditor.MarkerUtilities;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsBroadcastingProvider;
|
|
||||||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
|
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
|
||||||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvidersKeeper;
|
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvidersKeeper;
|
||||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||||
|
@ -397,21 +396,17 @@ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabe
|
||||||
|
|
||||||
if (cfgDescription instanceof ILanguageSettingsProvidersKeeper) {
|
if (cfgDescription instanceof ILanguageSettingsProvidersKeeper) {
|
||||||
for (ILanguageSettingsProvider provider: ((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders()) {
|
for (ILanguageSettingsProvider provider: ((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders()) {
|
||||||
if (provider instanceof ILanguageSettingsBroadcastingProvider) {
|
for (String languageId : LanguageSettingsManager.getLanguages(rc, cfgDescription)) {
|
||||||
for (String languageId : LanguageSettingsManager.getLanguages(rc, cfgDescription)) {
|
List<ICLanguageSettingEntry> list = provider.getSettingEntries(cfgDescription, rc, languageId);
|
||||||
List<ICLanguageSettingEntry> list = provider.getSettingEntries(cfgDescription, rc, languageId);
|
if (list!=null) {
|
||||||
if (list!=null) {
|
List<ICLanguageSettingEntry> listDefault = provider.getSettingEntries(cfgDescription, rc.getParent(), languageId);
|
||||||
// TODO - check default or check parent?
|
// != is OK here due as the equal lists will have the same reference in WeakHashSet
|
||||||
List<ICLanguageSettingEntry> listDefault = provider.getSettingEntries(null, null, languageId);
|
if (list != listDefault)
|
||||||
// != is OK here due as the equal lists will have the same reference in WeakHashSet
|
return true;
|
||||||
if (list != listDefault)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue