/** * Tells whether the given string is a continuation expression. * * @param offset the offset for which the check is done * @return <code>true</code> if the offset is part of a string continuation, <code>false</code> * otherwise * @since 3.7 */ private boolean isStringContinuation(int offset) { int nextNonWSCharPosition= fScanner.findNonWhitespaceBackwardInAnyPartition(offset - 1, JavaHeuristicScanner.UNBOUND); try { if (nextNonWSCharPosition != JavaHeuristicScanner.NOT_FOUND && fDocument.getChar(nextNonWSCharPosition) == '"') return true; else return false; } catch (BadLocationException e) { JavaPlugin.log(e); return false; } }
/** * Tells whether the given string is a continuation expression. * * @param offset the offset for which the check is done * @return <code>true</code> if the offset is part of a string continuation, <code>false</code> * otherwise * @since 3.7 */ private boolean isStringContinuation(int offset) { int nextNonWSCharPosition= fScanner.findNonWhitespaceBackwardInAnyPartition(offset - 1, JavaHeuristicScanner.UNBOUND); try { if (nextNonWSCharPosition != JavaHeuristicScanner.NOT_FOUND && fDocument.getChar(nextNonWSCharPosition) == '"') return true; else return false; } catch (BadLocationException e) { JavaPlugin.log(e); return false; } }