mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Loop enhancement.
This commit is contained in:
parent
e0da7a58dd
commit
bcf7ea67a0
1 changed files with 6 additions and 6 deletions
|
@ -152,17 +152,17 @@ public class SourceUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isEmpty(String string) {
|
private static boolean isEmpty(String string) {
|
||||||
return (string == null || string.trim().length() == 0);
|
return string == null || string.trim().length() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static public ISourceContainer[] convertSourceLocations(ICSourceLocation[] locations) {
|
static public ISourceContainer[] convertSourceLocations(ICSourceLocation[] locations) {
|
||||||
ArrayList<ISourceContainer> containers = new ArrayList<ISourceContainer>(locations.length);
|
ArrayList<ISourceContainer> containers = new ArrayList<ISourceContainer>(locations.length);
|
||||||
int mappingCount = 0;
|
int mappingCount = 0;
|
||||||
for (int i = 0; i < locations.length; ++i) {
|
for (ICSourceLocation location : locations) {
|
||||||
if (locations[i] instanceof IProjectSourceLocation) {
|
if (location instanceof IProjectSourceLocation) {
|
||||||
containers.add(new ProjectSourceContainer(((IProjectSourceLocation)locations[i]).getProject(), false));
|
containers.add(new ProjectSourceContainer(((IProjectSourceLocation) location).getProject(), false));
|
||||||
} else if (locations[i] instanceof IDirectorySourceLocation) {
|
} else if (location instanceof IDirectorySourceLocation) {
|
||||||
IDirectorySourceLocation d = (IDirectorySourceLocation)locations[i];
|
IDirectorySourceLocation d = (IDirectorySourceLocation) location;
|
||||||
IPath a = d.getAssociation();
|
IPath a = d.getAssociation();
|
||||||
if (a != null) {
|
if (a != null) {
|
||||||
MappingSourceContainer mapping = new MappingSourceContainer(InternalSourceLookupMessages.SourceUtils_0 + (++mappingCount));
|
MappingSourceContainer mapping = new MappingSourceContainer(InternalSourceLookupMessages.SourceUtils_0 + (++mappingCount));
|
||||||
|
|
Loading…
Add table
Reference in a new issue