while(line.trim().length() == 0 && row > 0) { row--; line = area.getLineText(row); } line = line.trim(); if(line.endsWith("; end") || line.endsWith(";end")) { area.shiftIndentLeft(); }
    private void handleInsertEnter(String trimLine, int row, String line) {        boolean matchesDo = DO_REG_EXP.isMatch(line) && !isDoInComment(line);        boolean matchesSyntax = MATCH_REG_EXP.isMatch(line);        boolean ignore = IGNORE_REG_EXP.isMatch(line);        if (!ignore && (matchesDo || matchesSyntax)) {            handleInsertEnd(matchesDo, line);        } else if (END_REG_EXP.isMatch(trimLine)) {            handleEnd(trimLine, row);        } else if (COMMENT_REG_EXP.isMatch(trimLine)) {            handleComment(line, row);        } else {            area.insertEnterAndIndent();        }    }