org.fife.ui.rsyntaxtextarea.spell.DefaultSpellCheckableTokenIdentifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spellchecker Show documentation
Show all versions of spellchecker Show documentation
A simple spell checker add-on for RSyntaxTextArea. It will spell-check comments in source code, or the entire file if you are editing plain text. Spelling errors are squiggle-underlined with the color of your choice, and tooltips are available offering any spelling suggestions.
/*
* 03/19/2014
*
* DefaultSpellCheckableTokenIdentifier.java - Identifies comment tokens to
* be spell checked.
*
* This library is distributed under the LGPL. See the included
* SpellChecker.License.txt file for details.
*/
package org.fife.ui.rsyntaxtextarea.spell;
import org.fife.ui.rsyntaxtextarea.Token;
/**
* The spell-checkable token identifier used by {@link SpellingParser} if
* none is explicitly identified. It causes all comment tokens to be
* spell checked.
*
* @author Robert Futrell
* @version 1.0
*/
public class DefaultSpellCheckableTokenIdentifier
implements SpellCheckableTokenIdentifier {
/**
* The default implementation of this method does nothing; this token
* identifier does not have state.
*/
@Override
public void begin() {
}
/**
* The default implementation of this method does nothing; this token
* identifier does not have state.
*/
@Override
public void end() {
}
/**
* Returns true
if the token is a comment.
*
* @return true
only if the token is a comment.
*/
@Override
public boolean isSpellCheckable(Token t) {
return t.isComment();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy