mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
Applied patch from 145271 - a quick performance improvement.
This commit is contained in:
parent
b4c738d66a
commit
4ec475f113
1 changed files with 6 additions and 5 deletions
|
@ -82,12 +82,13 @@ public class PDOMSearchResult extends AbstractTextSearchResult implements IEdito
|
|||
List list = new ArrayList();
|
||||
Object[] elements = result.getElements();
|
||||
for (int i = 0; i < elements.length; ++i) {
|
||||
Match[] matches = result.getMatches(elements[i]);
|
||||
for (int j = 0; j < matches.length; ++j) {
|
||||
if (matches[j] instanceof PDOMSearchMatch) {
|
||||
String mfilename = ((PDOMSearchMatch)matches[j]).getFileName();
|
||||
if (filename.equals(mfilename))
|
||||
if (((PDOMSearchElement) elements[i]).getFileName()
|
||||
.equals(filename)) {
|
||||
Match[] matches = result.getMatches(elements[i]);
|
||||
for (int j = 0; j < matches.length; ++j) {
|
||||
if (matches[j] instanceof PDOMSearchMatch) {
|
||||
list.add(matches[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue