mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
ac05898a57
commit
c2fe1df925
2 changed files with 14 additions and 8 deletions
|
@ -91,11 +91,13 @@ public class CIndex implements IIndex {
|
|||
return null;
|
||||
}
|
||||
|
||||
public IIndexBinding[] findBindings(Pattern pattern, boolean isFullyQualified, IndexFilter filter, IProgressMonitor monitor) throws CoreException {
|
||||
public IIndexBinding[] findBindings(Pattern pattern, boolean isFullyQualified, IndexFilter filter,
|
||||
IProgressMonitor monitor) throws CoreException {
|
||||
return findBindings(new Pattern[] { pattern }, isFullyQualified, filter, monitor);
|
||||
}
|
||||
|
||||
public IIndexBinding[] findBindings(Pattern[] patterns, boolean isFullyQualified, IndexFilter filter, IProgressMonitor monitor) throws CoreException {
|
||||
public IIndexBinding[] findBindings(Pattern[] patterns, boolean isFullyQualified, IndexFilter filter,
|
||||
IProgressMonitor monitor) throws CoreException {
|
||||
if (SPECIALCASE_SINGLES && fFragments.length == 1) {
|
||||
return fFragments[0].findBindings(patterns, isFullyQualified, filter, monitor);
|
||||
} else {
|
||||
|
@ -122,7 +124,8 @@ public class CIndex implements IIndex {
|
|||
}
|
||||
}
|
||||
|
||||
public IIndexBinding[] findMacroContainers(Pattern pattern, IndexFilter filter, IProgressMonitor monitor) throws CoreException {
|
||||
public IIndexBinding[] findMacroContainers(Pattern pattern, IndexFilter filter, IProgressMonitor monitor)
|
||||
throws CoreException {
|
||||
if (SPECIALCASE_SINGLES && fFragments.length == 1) {
|
||||
return fFragments[0].findMacroContainers(pattern, filter, monitor);
|
||||
} else {
|
||||
|
@ -133,7 +136,8 @@ public class CIndex implements IIndex {
|
|||
IIndexFragmentBinding[][] fragmentBindings = new IIndexFragmentBinding[fPrimaryFragmentCount][];
|
||||
for (int i = 0; i < fPrimaryFragmentCount; i++) {
|
||||
try {
|
||||
IBinding[] part = fFragments[i].findMacroContainers(pattern, retargetFilter(linkage, filter), monitor);
|
||||
IBinding[] part = fFragments[i].findMacroContainers(pattern,
|
||||
retargetFilter(linkage, filter), monitor);
|
||||
fragmentBindings[i] = new IIndexFragmentBinding[part.length];
|
||||
System.arraycopy(part, 0, fragmentBindings[i], 0, part.length);
|
||||
} catch (CoreException e) {
|
||||
|
@ -259,7 +263,8 @@ public class CIndex implements IIndex {
|
|||
return result.toArray(new IIndexInclude[result.size()]);
|
||||
}
|
||||
|
||||
public void findIncludedBy(List<IIndexFile> in, List<IIndexInclude> out, int depth, HashSet<IIndexFileLocation> handled) throws CoreException {
|
||||
public void findIncludedBy(List<IIndexFile> in, List<IIndexInclude> out, int depth,
|
||||
HashSet<IIndexFileLocation> handled) throws CoreException {
|
||||
List<IIndexFile> nextLevel= depth != 0 ? new LinkedList<IIndexFile>() : null;
|
||||
for (IIndexFile iIndexFile : in) {
|
||||
IIndexFragmentFile file = (IIndexFragmentFile) iIndexFile;
|
||||
|
@ -295,7 +300,8 @@ public class CIndex implements IIndex {
|
|||
return result.toArray(new IIndexInclude[result.size()]);
|
||||
}
|
||||
|
||||
private void findIncludes(List<IIndexFile> in, List<IIndexInclude> out, int depth, HashSet<Object> handled) throws CoreException {
|
||||
private void findIncludes(List<IIndexFile> in, List<IIndexInclude> out, int depth,
|
||||
HashSet<Object> handled) throws CoreException {
|
||||
List<IIndexFile> nextLevel= depth != 0 ? new LinkedList<IIndexFile>() : null;
|
||||
for (IIndexFile iIndexFile : in) {
|
||||
IIndexFragmentFile file = (IIndexFragmentFile) iIndexFile;
|
||||
|
|
|
@ -113,8 +113,8 @@ public class IndexFactory {
|
|||
safeAddFragment(readOnlyFrag, fPDOMManager.getPDOM(cproject));
|
||||
}
|
||||
|
||||
Collection<IIndexFragment> roPdoms= readOnlyFrag.values();
|
||||
return new WritableCIndex(pdom, roPdoms.toArray(new IIndexFragment[roPdoms.size()]) );
|
||||
Collection<IIndexFragment> readOnlyFragments= readOnlyFrag.values();
|
||||
return new WritableCIndex(pdom, readOnlyFragments.toArray(new IIndexFragment[readOnlyFragments.size()]));
|
||||
}
|
||||
|
||||
private Collection<ICProject> getProjects(ICProject[] projects, boolean addDependencies,
|
||||
|
|
Loading…
Add table
Reference in a new issue