1 11 12 package org.eclipse.jdt.internal.ui.text.spelling.engine; 13 14 import java.util.Set ; 15 16 21 public class SpellEvent implements ISpellEvent { 22 23 24 private final int fBegin; 25 26 27 private final ISpellChecker fChecker; 28 29 30 private final int fEnd; 31 32 33 private final boolean fMatch; 34 35 36 private final boolean fSentence; 37 38 39 private final String fWord; 40 41 59 protected SpellEvent(final ISpellChecker checker, final String word, final int begin, final int end, final boolean sentence, final boolean match) { 60 fChecker= checker; 61 fEnd= end; 62 fBegin= begin; 63 fWord= word; 64 fSentence= sentence; 65 fMatch= match; 66 } 67 68 71 public final int getBegin() { 72 return fBegin; 73 } 74 75 78 public final int getEnd() { 79 return fEnd; 80 } 81 82 85 public final Set getProposals() { 86 return fChecker.getProposals(fWord, fSentence); 87 } 88 89 92 public final String getWord() { 93 return fWord; 94 } 95 96 99 public final boolean isMatch() { 100 return fMatch; 101 } 102 103 106 public final boolean isStart() { 107 return fSentence; 108 } 109 } 110 | Popular Tags |