* Creates a new add word proposal
*
* @param word
- * The word to add
+ * The word to add
* @param context
- * The invocation context
+ * The invocation context
*/
public AddWordProposal(final String word, final IInvocationContext context) {
- fContext= context;
- fWord= word;
+ fContext = context;
+ fWord = word;
}
/*
*/
public final void apply(final IDocument document) {
- final ISpellCheckEngine engine= SpellCheckEngine.getInstance();
- final ISpellChecker checker= engine.createSpellChecker(engine.getLocale(), PreferenceConstants.getPreferenceStore());
+ final ISpellCheckEngine engine = SpellCheckEngine.getInstance();
+ final ISpellChecker checker = engine.createSpellChecker(engine
+ .getLocale(), PreferenceConstants.getPreferenceStore());
if (checker != null)
checker.addWord(fWord);
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
*/
public String getAdditionalProposalInfo() {
- return MessageFormat.format(PHPUIMessages.getString("Spelling.add.info"), new String[] { WordCorrectionProposal.getHtmlRepresentation(fWord)}); //$NON-NLS-1$
+ return MessageFormat
+ .format(
+ PHPUIMessages.getString("Spelling.add.info"), new String[] { WordCorrectionProposal.getHtmlRepresentation(fWord) }); //$NON-NLS-1$
}
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
- return MessageFormat.format(PHPUIMessages.getString("Spelling.add.label"), new String[] { fWord }); //$NON-NLS-1$
+ return MessageFormat.format(PHPUIMessages
+ .getString("Spelling.add.label"), new String[] { fWord }); //$NON-NLS-1$
}
/*
}
/*
- * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance()
+ * @see net.sourceforge.phpdt.ui.text.java.IJavaCompletionProposal#getRelevance()
*/
public int getRelevance() {
return Integer.MIN_VALUE;
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
*/
public final Point getSelection(final IDocument document) {
- return new Point(fContext.getSelectionOffset(), fContext.getSelectionLength());
+ return new Point(fContext.getSelectionOffset(), fContext
+ .getSelectionLength());
}
}