Menu

#39 AutoSpellCheckHandler Marks Correct Words

open
nobody
None
5
2009-10-13
2009-10-13
xadhatter
No

The AutoSpellCheckHandler ignores the configuration of the SpellChecker. For example, if you set the spell check to ignore numbers the AutoSpellCheckHandler still marks numbers as misspelled. I believe in the method markupSpelling the AutoSpellCheckHandler should be calling SpellCheck.checkSpelling(...) instead of SpellCheck.isCorrect(...) (see below).

public class AutoSpellCheckHandler extends MouseAdapter implements DocumentListener,
AutoSpellConstants{
...

private void markupSpelling(StyledDocument doc, int start, int end){
...
if(sCheck.isCorrect(word) || sCheck.isIgnored(word)){
markAsCorrect(doc, wordStart, wordEnd);
}else{
markAsMisspelled(doc, wordStart, wordEnd);
}
...

Discussion


Log in to post a comment.