findMatchingComponentClassNames(partialToken, SearchPattern.R_PREFIX_MATCH, typeNameCollector); Iterator matchingComponentClassNamesIter = typeNameCollector.typeNames(); while (matchingComponentClassNamesIter.hasNext()) { String matchingComponentClassName = (String) matchingComponentClassNamesIter.next(); String matchingComponentTypeName; int lastDotIndex = matchingComponentClassName.lastIndexOf('.');
findMatchingElementClassNames(partialToken, SearchPattern.R_PREFIX_MATCH, typeNameCollector); Iterator matchingElementClassNamesIter = typeNameCollector.typeNames(); while (matchingElementClassNamesIter.hasNext()) { String matchingElementClassName = (String) matchingElementClassNamesIter.next(); String matchingElementTypeName; int lastDotIndex = matchingElementClassName.lastIndexOf('.');
  protected void fillInElementTypeCompletionProposals(IJavaProject _project, String _token, int _tokenOffset, int _offset, List _completionProposalsList) throws JavaModelException {    TypeNameCollector typeNameCollector = new TypeNameCollector(_project, false);    String partialToken = partialToken(_token, _tokenOffset, _offset);    if (partialToken.length() > 0) {      findMatchingComponentClassNames(partialToken, SearchPattern.R_PREFIX_MATCH, typeNameCollector);      Iterator matchingComponentClassNamesIter = typeNameCollector.typeNames();      while (matchingComponentClassNamesIter.hasNext()) {        String matchingComponentClassName = (String) matchingComponentClassNamesIter.next();        String matchingComponentTypeName;        int lastDotIndex = matchingComponentClassName.lastIndexOf('.');        if (lastDotIndex == -1) {          matchingComponentTypeName = matchingComponentClassName;        }        else {          matchingComponentTypeName = matchingComponentClassName.substring(lastDotIndex + 1);        }        CompletionProposal completionProposal = completionProposal(_token, _tokenOffset, _offset, matchingComponentTypeName);        _completionProposalsList.add(completionProposal);      }    }  }