1 11 package org.eclipse.jdt.internal.core.search; 12 13 import java.util.HashSet ; 14 import java.util.Iterator ; 15 16 import org.eclipse.jdt.core.search.SearchParticipant; 17 import org.eclipse.jdt.core.search.SearchPattern; 18 import org.eclipse.jdt.internal.compiler.env.AccessRuleSet; 19 20 23 public class PathCollector extends IndexQueryRequestor { 24 25 26 public HashSet paths = new HashSet (5); 27 28 31 public boolean acceptIndexMatch(String documentPath, SearchPattern indexRecord, SearchParticipant participant, AccessRuleSet access) { 32 paths.add(documentPath); 33 return true; 34 } 35 36 39 public String [] getPaths() { 40 String [] result = new String [this.paths.size()]; 41 int i = 0; 42 for (Iterator iter = this.paths.iterator(); iter.hasNext();) { 43 result[i++] = (String )iter.next(); 44 } 45 return result; 46 } 47 } 48 | Popular Tags |