/** * Returns all of the possible subtypes of this type hierarchy. Returns null if they could not be * determine. */ private String[] determinePossibleSubTypes(final HashSet localTypes, IProgressMonitor monitor) { class PathCollector implements IPathRequestor { HashSet paths = new HashSet(10); public void acceptPath(String path, boolean containsLocalTypes) { this.paths.add(path); if (containsLocalTypes) { localTypes.add(path); } } } PathCollector collector = new PathCollector(); try { if (monitor != null) monitor.beginTask("", MAXTICKS); // $NON-NLS-1$ searchAllPossibleSubTypes( getType(), this.scope, this.binariesFromIndexMatches, collector, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, monitor); } finally { if (monitor != null) monitor.done(); } HashSet paths = collector.paths; int length = paths.size(); String[] result = new String[length]; int count = 0; for (Iterator iter = paths.iterator(); iter.hasNext(); ) { result[count++] = (String) iter.next(); } return result; }