mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
cosmetics: JavaDoc for getTick() plus local variables renamed
This commit is contained in:
parent
8b4fc1b893
commit
18570a5d50
1 changed files with 16 additions and 11 deletions
|
@ -371,18 +371,23 @@ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getTicks (IResource r) {
|
/**
|
||||||
if (r == null || r instanceof IProject) return 0;
|
* @param rc - resource to check
|
||||||
IPath path = r.getProjectRelativePath();
|
* @return flags {@link TICK_CONFIGURATION} if the resource has custom settings and possibly needs
|
||||||
ICProjectDescription prjd = CoreModel.getDefault().getProjectDescription(r.getProject(), false);
|
* to be adorned or 0 otherwise.
|
||||||
|
*/
|
||||||
|
private int getTicks (IResource rc) {
|
||||||
|
if (rc == null || rc instanceof IProject) return 0;
|
||||||
|
IPath path = rc.getProjectRelativePath();
|
||||||
|
ICProjectDescription prjDescription = CoreModel.getDefault().getProjectDescription(rc.getProject(), false);
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if (prjd != null) {
|
if (prjDescription != null) {
|
||||||
ICConfigurationDescription [] cf = prjd.getConfigurations();
|
ICConfigurationDescription [] cfgDescriptions = prjDescription.getConfigurations();
|
||||||
if (cf == null) return 0;
|
if (cfgDescriptions == null) return 0;
|
||||||
for (ICConfigurationDescription element : cf) {
|
for (ICConfigurationDescription cfgDescription : cfgDescriptions) {
|
||||||
if (element.isActive()) {
|
if (cfgDescription.isActive()) {
|
||||||
ICResourceDescription out = element.getResourceDescription(path, true);
|
ICResourceDescription rcDescription = cfgDescription.getResourceDescription(path, true);
|
||||||
if (out != null) result |= TICK_CONFIGURATION;
|
if (rcDescription != null) result |= TICK_CONFIGURATION;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue