1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

bug 299895: Project Explorer does not honor indexer's configuration preference for build settings overlay adornment

This commit is contained in:
Andrew Gvozdev 2010-02-19 18:08:50 +00:00
parent c1165cf212
commit 63934dce7a

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2008 IBM Corporation and others. * Copyright (c) 2000, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -377,19 +377,17 @@ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabe
* to be adorned or 0 otherwise. * to be adorned or 0 otherwise.
*/ */
private int getTicks (IResource rc) { private int getTicks (IResource rc) {
if (rc == null || rc instanceof IProject) return 0; if (rc == null || rc instanceof IProject)
IPath path = rc.getProjectRelativePath(); return 0;
ICProjectDescription prjDescription = CoreModel.getDefault().getProjectDescription(rc.getProject(), false);
int result = 0; int result = 0;
ICProjectDescription prjDescription = CoreModel.getDefault().getProjectDescription(rc.getProject(), false);
if (prjDescription != null) { if (prjDescription != null) {
ICConfigurationDescription [] cfgDescriptions = prjDescription.getConfigurations(); ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
if (cfgDescriptions == null) return 0; IPath path = rc.getProjectRelativePath();
for (ICConfigurationDescription cfgDescription : cfgDescriptions) {
if (cfgDescription.isActive()) {
ICResourceDescription rcDescription = cfgDescription.getResourceDescription(path, true); ICResourceDescription rcDescription = cfgDescription.getResourceDescription(path, true);
if (rcDescription != null) result |= TICK_CONFIGURATION; if (rcDescription != null)
} result |= TICK_CONFIGURATION;
}
} }
return result; return result;
} }