String (@NotNull Project project, @NotNull Editor editor, @Nullable Language language, int offset) { if (offset > 0) { ShSemanticEditorPosition position = getPosition(editor, offset - 1); if (position.isAt(ShTypes.LINEFEED) || position.isAt(ShTokenTypes.WHITESPACE)) { moveAtEndOfPreviousLine(position); if (position.isAtAnyOf(ShTypes.DO, ShTypes.LEFT_CURLY, ShTypes.ELSE, ShTypes.THEN)) { return getIndentString(editor, position.getStartOffset(), true); } else if (position.isAt(ShTypes.CASE_END)) { return getIndentString(editor, position.getStartOffset(), false); } else if (isInCasePattern(editor, position)) { return getIndentString(editor, position.getStartOffset(), true); } } } return null; }