mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[Include Browser] Handle headers included from c- and c++, related to bug 191989.
This commit is contained in:
parent
a9a1824092
commit
19007dbf93
1 changed files with 17 additions and 3 deletions
|
@ -12,7 +12,7 @@
|
|||
package org.eclipse.cdt.internal.ui.includebrowser;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
@ -161,8 +161,15 @@ public class IBContentProvider extends AsyncTreeContentProvider {
|
|||
}
|
||||
if (files.length > 0) {
|
||||
ArrayList list= new ArrayList();
|
||||
HashSet handled= new HashSet();
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
list.addAll(Arrays.asList(index.findIncludedBy(files[i])));
|
||||
final IIndexInclude[] includes = index.findIncludedBy(files[i]);
|
||||
for (int j = 0; j < includes.length; j++) {
|
||||
IIndexInclude indexInclude = includes[j];
|
||||
if (handled.add(indexInclude.getIncludedByLocation())) {
|
||||
list.add(indexInclude);
|
||||
}
|
||||
}
|
||||
}
|
||||
return (IIndexInclude[]) list.toArray(new IIndexInclude[list.size()]);
|
||||
}
|
||||
|
@ -183,8 +190,15 @@ public class IBContentProvider extends AsyncTreeContentProvider {
|
|||
}
|
||||
if (files.length > 0) {
|
||||
ArrayList list= new ArrayList();
|
||||
HashSet handled= new HashSet();
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
list.addAll(Arrays.asList(index.findIncludes(files[i])));
|
||||
final IIndexInclude[] includes = index.findIncludes(files[i]);
|
||||
for (int j = 0; j < includes.length; j++) {
|
||||
IIndexInclude indexInclude = includes[j];
|
||||
if (handled.add(indexInclude.getIncludesLocation())) {
|
||||
list.add(indexInclude);
|
||||
}
|
||||
}
|
||||
}
|
||||
return (IIndexInclude[]) list.toArray(new IIndexInclude[list.size()]);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue