com.devepos.adt.codesearch.ui/src/com/devepos/adt/cst/ui/internal/codesearch/result/CodeSearchResult.java
/**
   * Take query result and convert it into a flat and tree like result for the
   * search view
   */
Take query result and convert it into a flat and tree like result for the
search view
Take query result and convert it into a flat and tree like result for the search view
public void addResult(final ICodeSearchResult result) {
    if (result == null) {
      return;
    }
    logMessages(result);
    resultCount += result.getNumberOfResults();
    runtimeInfo.updateWithNewResult(result);
    if (result.getNumberOfResults() <= 0) {
      return;
    }
    if (resultTree == null) {
      resultTree = new ResultTreeBuilder(fileMatchesCache, searchQuery.getProjectProvider()
          .getDestinationId());
    }
    if (searchResultRootNode == null) {
      searchResultRootNode = resultTree.getRootNode();
    }
    resultTree.addResultToTree(result);
    List<ITreeNode> currentFlatResult = resultTree.getFlatResult();
    if (currentFlatResult != null) {
      flatResult.addAll(currentFlatResult);
      for (ITreeNode matchNode : currentFlatResult) {
        addMatch(new Match(matchNode, -1, -1));
      }
    }
    resultTree.clearBuffersOfLastResult();
  }
public void addResult ( final ICodeSearchResult result ) { if ( result == null ) { return ; } logMessages ( result ) ; resultCount += result . getNumberOfResults ( ) ; runtimeInfo . updateWithNewResult ( result ) ; if ( result . getNumberOfResults ( ) <= 0 ) { return ; } if ( resultTree == null ) { resultTree = new ResultTreeBuilder ( fileMatchesCache , searchQuery . getProjectProvider ( ) . getDestinationId ( ) ) ; } if ( searchResultRootNode == null ) { searchResultRootNode = resultTree . getRootNode ( ) ; } resultTree . addResultToTree ( result ) ; List < ITreeNode > currentFlatResult = resultTree . getFlatResult ( ) ; if ( currentFlatResult != null ) { flatResult . addAll ( currentFlatResult ) ; for ( ITreeNode matchNode : currentFlatResult ) { addMatch ( new Match ( matchNode , - 1 , - 1 ) ) ; } } resultTree . clearBuffersOfLastResult ( ) ; }
Take query result and convert it into a flat and tree like result for the
 search view
Take query result and convert it into a flat and tree like result for the search view