/** * Return the full list of known regions. Typically getNodes should be * used instead of this method. */ public List getRegions() { IStructuredDocumentRegion headNode = null; if (!getTokenizer().isEOF()) { headNode = getDocumentRegions(); // throw new IllegalStateException("parsing has not finished"); } // for memory recovery, we assume if someone // requests all regions, we can reset our big // memory consuming objects // but the new "getRegions" method is then more expensive. // I don't think its used much, though. List localRegionsList = getRegions(headNode); primReset(); return localRegionsList; }