private static String getPrefix(IDocument doc, int offset) throws BadLocationException {
int docLen = doc.getLength();
if (doc == null || offset > docLen || docLen == 0)
private static String getPrefix(IDocument doc, int offset) throws BadLocationException {
int docLen = doc.getLength();
if (doc == null || offset > docLen || docLen == 0)