1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Open Declaration shows macros twice, bug 222597.

This commit is contained in:
Markus Schorn 2008-03-14 13:05:35 +00:00
parent e5b6fb457b
commit 7b37526690

View file

@ -535,14 +535,8 @@ public class CIndex implements IIndex {
}
private IIndexMacro[] findMacros(char[] name, boolean isPrefix, boolean caseSensitive, IndexFilter filter, IProgressMonitor monitor) throws CoreException {
if (SPECIALCASE_SINGLES && fFragments.length==1) {
try {
return fFragments[0].findMacros(name, isPrefix, caseSensitive, filter, monitor);
} catch (CoreException e) {
CCorePlugin.log(e);
return IIndexMacro.EMPTY_INDEX_MACRO_ARRAY;
}
} else {
// macros can be represented multiple times when a header is parsed in c- and c++ context,
// so there is no special case for indexes with single fragments.
if (monitor == null) {
monitor= new NullProgressMonitor();
}
@ -573,7 +567,6 @@ public class CIndex implements IIndex {
monitor.done();
return result.toArray(new IIndexMacro[result.size()]);
}
}
public long getCacheHits() {
long result= 0;