fireChangedUpdate(new DefaultDocumentEvent(firstLine, line, DocumentEvent.EventType.CHANGE)); return line; fireChangedUpdate(new DefaultDocumentEvent(firstLine, line, DocumentEvent.EventType.CHANGE));
/** * Updates internal state information; e.g. the "last tokens on lines" * data. After this, a changed update is fired to let listeners know that * the document's structure has changed.<p> * * This is called internally whenever the syntax style changes. */ private void updateSyntaxHighlightingInformation() { // Reinitialize the "last token on each line" array. Note that since // the actual text in the document isn't changing, the number of lines // is the same. Element map = getDefaultRootElement(); int numLines = map.getElementCount(); int lastTokenType = Token.NULL; for (int i=0; i<numLines; i++) { setSharedSegment(i); lastTokenType = tokenMaker.getLastTokenTypeOnLine(s, lastTokenType); lastTokensOnLines.set(i, lastTokenType); } // Clear our token cache to force re-painting lastLine = -1; cachedTokenList = null; // Let everybody know that syntax styles have (probably) changed. fireChangedUpdate(new DefaultDocumentEvent( 0, numLines-1, DocumentEvent.EventType.CHANGE)); }
fireChangedUpdate(new DefaultDocumentEvent(firstLine, line, DocumentEvent.EventType.CHANGE)); return line; fireChangedUpdate(new DefaultDocumentEvent(firstLine, line, DocumentEvent.EventType.CHANGE));
fireChangedUpdate(new DefaultDocumentEvent(firstLine, line, DocumentEvent.EventType.CHANGE)); return line; fireChangedUpdate(new DefaultDocumentEvent(firstLine, line, DocumentEvent.EventType.CHANGE));
fireChangedUpdate(new DefaultDocumentEvent(firstLine, line, DocumentEvent.EventType.CHANGE)); return line; fireChangedUpdate(new DefaultDocumentEvent(firstLine, line, DocumentEvent.EventType.CHANGE));
/** * Updates internal state information; e.g. the "last tokens on lines" * data. After this, a changed update is fired to let listeners know that * the document's structure has changed.<p> * * This is called internally whenever the syntax style changes. */ protected void updateSyntaxHighlightingInformation() { // Reinitialize the "last token on each line" array. Note that since // the actual text in the document isn't changing, the number of lines // is the same. Element map = getDefaultRootElement(); int numLines = map.getElementCount(); int lastTokenType = Token.NULL; for (int i=0; i<numLines; i++) { setSharedSegment(i); lastTokenType = tokenMaker.getLastTokenTypeOnLine(s, lastTokenType); lastTokensOnLines.set(i, lastTokenType); } // Let everybody know that syntax styles have (probably) changed. fireChangedUpdate(new DefaultDocumentEvent( 0, numLines-1, DocumentEvent.EventType.CHANGE)); }
/** * Updates internal state information; e.g. the "last tokens on lines" * data. After this, a changed update is fired to let listeners know that * the document's structure has changed.<p> * * This is called internally whenever the syntax style changes. */ protected void updateSyntaxHighlightingInformation() { // Reinitialize the "last token on each line" array. Note that since // the actual text in the document isn't changing, the number of lines // is the same. Element map = getDefaultRootElement(); int numLines = map.getElementCount(); int lastTokenType = Token.NULL; for (int i=0; i<numLines; i++) { setSharedSegment(i); lastTokenType = tokenMaker.getLastTokenTypeOnLine( s, lastTokenType); lastTokensOnLines.set(i, lastTokenType); } // Let everybody know that syntax styles have (probably) changed. fireChangedUpdate(new DefaultDocumentEvent( 0, numLines-1, DocumentEvent.EventType.CHANGE)); }
/** * Updates internal state information; e.g. the "last tokens on lines" * data. After this, a changed update is fired to let listeners know that * the document's structure has changed.<p> * * This is called internally whenever the syntax style changes. */ private void updateSyntaxHighlightingInformation() { // Reinitialize the "last token on each line" array. Note that since // the actual text in the document isn't changing, the number of lines // is the same. Element map = getDefaultRootElement(); int numLines = map.getElementCount(); int lastTokenType = Token.NULL; for (int i=0; i<numLines; i++) { setSharedSegment(i); lastTokenType = tokenMaker.getLastTokenTypeOnLine(s, lastTokenType); lastTokensOnLines.set(i, lastTokenType); } // Clear our token cache to force re-painting lastLine = -1; cachedTokenList = null; // Let everybody know that syntax styles have (probably) changed. fireChangedUpdate(new DefaultDocumentEvent( 0, numLines-1, DocumentEvent.EventType.CHANGE)); }