mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42: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) {
|
||||
return (string == null || string.trim().length() == 0);
|
||||
return string == null || string.trim().length() == 0;
|
||||
}
|
||||
|
||||
static public ISourceContainer[] convertSourceLocations(ICSourceLocation[] locations) {
|
||||
ArrayList<ISourceContainer> containers = new ArrayList<ISourceContainer>(locations.length);
|
||||
int mappingCount = 0;
|
||||
for (int i = 0; i < locations.length; ++i) {
|
||||
if (locations[i] instanceof IProjectSourceLocation) {
|
||||
containers.add(new ProjectSourceContainer(((IProjectSourceLocation)locations[i]).getProject(), false));
|
||||
} else if (locations[i] instanceof IDirectorySourceLocation) {
|
||||
IDirectorySourceLocation d = (IDirectorySourceLocation)locations[i];
|
||||
for (ICSourceLocation location : locations) {
|
||||
if (location instanceof IProjectSourceLocation) {
|
||||
containers.add(new ProjectSourceContainer(((IProjectSourceLocation) location).getProject(), false));
|
||||
} else if (location instanceof IDirectorySourceLocation) {
|
||||
IDirectorySourceLocation d = (IDirectorySourceLocation) location;
|
||||
IPath a = d.getAssociation();
|
||||
if (a != null) {
|
||||
MappingSourceContainer mapping = new MappingSourceContainer(InternalSourceLookupMessages.SourceUtils_0 + (++mappingCount));
|
||||
|
|
Loading…
Add table
Reference in a new issue