static String getLineUpToCaret(JEditTextArea textArea) {
private static String getLineUpToCaret(JEditTextArea textArea) {
    static String getLineUpToCaret(JEditTextArea textArea) {        int lineIndex = textArea.getCaretLine();        int start = textArea.getLineStartOffset(lineIndex);        int end = textArea.getCaretPosition();        String line = textArea.getText(start, end - start);        return line;    }