/** * Performs the initial partitioning of the partitioner's document. */ protected void initialize() { fIsInitialized= true; fScanner.setRange(fDocument, 0, fDocument.getLength()); try { IToken token= fScanner.nextToken(); while (!token.isEOF()) { String contentType= getTokenContentType(token); if (isSupportedContentType(contentType)) { TypedPosition p= new TypedPosition(fScanner.getTokenOffset(), fScanner.getTokenLength(), contentType); fDocument.addPosition(fPositionCategory, p); } token= fScanner.nextToken(); } } catch (BadLocationException x) { // cannot happen as offsets come from scanner } catch (BadPositionCategoryException x) { // cannot happen if document has been connected before } }
reparseStart = category[oldPosition - 1].offset; fScanner.setPartialRange(fDocument, reparseStart, fDocument.getLength() - reparseStart, /* ignore contentType */ null, reparseStart); IToken token = fScanner.nextToken(); int actualReparseStart = fScanner.getTokenOffset(); int partitionStart = -1; int first = fDocument.computeIndexInCategory(fPositionCategory, actualReparseStart); fScanner.setPartialRange(fDocument, actualReparseStart, fDocument.getLength() - actualReparseStart, contentType, actualReparseStart); behindLastScannedPosition = actualReparseStart; token = fScanner.nextToken(); token = fScanner.nextToken(); continue; int start = fScanner.getTokenOffset(); int length = fScanner.getTokenLength(); token = fScanner.nextToken();
fScanner.setPartialRange(d, reparseStart, d.getLength() - reparseStart, contentType, partitionStart); IToken token= fScanner.nextToken(); token= fScanner.nextToken(); continue; int start= fScanner.getTokenOffset(); int length= fScanner.getTokenLength(); token= fScanner.nextToken();
/** * Performs the initial partitioning of the partitioner's document. */ protected void initialize() { fIsInitialized= true; fScanner.setRange(fDocument, 0, fDocument.getLength()); try { IToken token= fScanner.nextToken(); while (!token.isEOF()) { String contentType= getTokenContentType(token); if (isSupportedContentType(contentType)) { TypedPosition p= new TypedPosition(fScanner.getTokenOffset(), fScanner.getTokenLength(), contentType); fDocument.addPosition(fPositionCategory, p); } token= fScanner.nextToken(); } } catch (BadLocationException x) { // cannot happen as offsets come from scanner } catch (BadPositionCategoryException x) { // cannot happen if document has been connected before } }
category= getPositions(); fScanner.setPartialRange(fDocument, reparseStart, fDocument.getLength() - reparseStart, contentType, partitionStart); IToken token= fScanner.nextToken(); token= fScanner.nextToken(); continue; int start= fScanner.getTokenOffset(); int length= fScanner.getTokenLength(); token= fScanner.nextToken();
/** * Performs the initial partitioning of the partitioner's document. * <p> * May be extended by subclasses. * </p> */ protected void initialize() { fIsInitialized= true; clearPositionCache(); fScanner.setRange(fDocument, 0, fDocument.getLength()); try { IToken token= fScanner.nextToken(); while (!token.isEOF()) { String contentType= getTokenContentType(token); if (isSupportedContentType(contentType)) { TypedPosition p= new TypedPosition(fScanner.getTokenOffset(), fScanner.getTokenLength(), contentType); fDocument.addPosition(fPositionCategory, p); } token= fScanner.nextToken(); } } catch (BadLocationException x) { // cannot happen as offsets come from scanner } catch (BadPositionCategoryException x) { // cannot happen if document has been connected before } }
fScanner.setPartialRange(d, reparseStart, d.getLength() - reparseStart, contentType, partitionStart); IToken token= fScanner.nextToken(); token= fScanner.nextToken(); continue; int start= fScanner.getTokenOffset(); int length= fScanner.getTokenLength(); token= fScanner.nextToken();
/** * Performs the initial partitioning of the partitioner's document. * <p> * May be extended by subclasses. * </p> */ protected void initialize() { fIsInitialized= true; clearPositionCache(); fScanner.setRange(fDocument, 0, fDocument.getLength()); try { IToken token= fScanner.nextToken(); while (!token.isEOF()) { String contentType= getTokenContentType(token); if (isSupportedContentType(contentType)) { TypedPosition p= new TypedPosition(fScanner.getTokenOffset(), fScanner.getTokenLength(), contentType); fDocument.addPosition(fPositionCategory, p); } token= fScanner.nextToken(); } } catch (BadLocationException x) { // cannot happen as offsets come from scanner } catch (BadPositionCategoryException x) { // cannot happen if document has been connected before } }
category= getPositions(); fScanner.setPartialRange(fDocument, reparseStart, fDocument.getLength() - reparseStart, contentType, partitionStart); IToken token= fScanner.nextToken(); token= fScanner.nextToken(); continue; int start= fScanner.getTokenOffset(); int length= fScanner.getTokenLength(); token= fScanner.nextToken();
/** * Performs the initial partitioning of the partitioner's document. * <p> * May be extended by subclasses. * </p> */ protected void initialize() { fIsInitialized= true; clearPositionCache(); fScanner.setRange(fDocument, 0, fDocument.getLength()); try { IToken token= fScanner.nextToken(); while (!token.isEOF()) { String contentType= getTokenContentType(token); if (isSupportedContentType(contentType)) { TypedPosition p= new TypedPosition(fScanner.getTokenOffset(), fScanner.getTokenLength(), contentType); fDocument.addPosition(fPositionCategory, p); } token= fScanner.nextToken(); } } catch (BadLocationException x) { // cannot happen as offsets come from scanner } catch (BadPositionCategoryException x) { // cannot happen if document has been connected before } }
category= getPositions(); fScanner.setPartialRange(fDocument, reparseStart, fDocument.getLength() - reparseStart, contentType, partitionStart); IToken token= fScanner.nextToken(); token= fScanner.nextToken(); continue; int start= fScanner.getTokenOffset(); int length= fScanner.getTokenLength(); token= fScanner.nextToken();
/** * Performs the initial partitioning of the partitioner's document. * <p> * May be extended by subclasses. * </p> */ protected void initialize() { fIsInitialized= true; clearPositionCache(); fScanner.setRange(fDocument, 0, fDocument.getLength()); try { IToken token= fScanner.nextToken(); while (!token.isEOF()) { String contentType= getTokenContentType(token); if (isSupportedContentType(contentType)) { TypedPosition p= new TypedPosition(fScanner.getTokenOffset(), fScanner.getTokenLength(), contentType); fDocument.addPosition(fPositionCategory, p); } token= fScanner.nextToken(); } } catch (BadLocationException x) { // cannot happen as offsets come from scanner } catch (BadPositionCategoryException x) { // cannot happen if document has been connected before } }
category= getPositions(); fScanner.setPartialRange(fDocument, reparseStart, fDocument.getLength() - reparseStart, contentType, partitionStart); IToken token= fScanner.nextToken(); token= fScanner.nextToken(); continue; int start= fScanner.getTokenOffset(); int length= fScanner.getTokenLength(); token= fScanner.nextToken();
/** * Performs the initial partitioning of the partitioner's document. * <p> * May be extended by subclasses. * </p> * * @since 2.2 */ protected void initialize() { fIsInitialized = true; clearPositionCache(); fScanner.setRange(fDocument, 0, fDocument.getLength()); try { IToken token = fScanner.nextToken(); while (!token.isEOF()) { String contentType = getTokenContentType(token); if (isSupportedContentType(contentType)) { TypedPosition p = new TypedPosition(fScanner.getTokenOffset(), fScanner.getTokenLength(), contentType); fDocument.addPosition(fPositionCategory, p); } token = fScanner.nextToken(); } } catch (BadLocationException x) { // cannot happen as offsets come from scanner } catch (BadPositionCategoryException x) { // cannot happen if document has been connected before } }