public boolean isValidFor(IDocument document, int offset) { try { int length = offset - fReplacementOffset; return completionProposal .getDisplayString() .toLowerCase() .contains(document.get(fReplacementOffset, length).toLowerCase()); } catch (BadLocationException e) { // ignore } return false; }
public String getDisplayString() { return completionProposal.getDisplayString(); }