private static ProcessingResult tryToIndentToRight(@NotNull ChangeIndentContext context){
  int targetLineIndent=getLineIndent(context,context.targetLine);
  List<LineInfo> lineInfos=collectIndentsGreaterOrEqualToCurrent(context,context.targetLine);
  int newIndent=-1;
  for (int i=lineInfos.size() - 1; i >= 0; i--) {
    LineInfo lineInfo=lineInfos.get(i);
    if (lineInfo.indent == targetLineIndent) {
      continue;
    }
    newIndent=lineInfo.indent;
    break;
  }
  if (newIndent == targetLineIndent || newIndent < 0) {
    return ProcessingResult.CONTINUE;
  }
  changeIndent(context,newIndent);
  return ProcessingResult.STOP_SUCCESSFUL;
}

private static ProcessingResult tryToIndentToRight ( @ NotNull ChangeIndentContext context ) { int targetLineIndent = getLineIndent ( context , context . targetLine ) ; List < LineInfo > lineInfos = collectIndentsGreaterOrEqualToCurrent ( context , context . targetLine ) ; int newIndent = - 1 ; for ( int i = lineInfos . size ( ) - 1 ; i >= 0 ; i -- ) { LineInfo lineInfo = lineInfos . get ( i ) ; if ( lineInfo . indent == targetLineIndent ) { continue ; } newIndent = lineInfo . indent ; break ; } if ( newIndent == targetLineIndent || newIndent < 0 ) { return ProcessingResult . CONTINUE ; } changeIndent ( context , newIndent ) ; return ProcessingResult . STOP_SUCCESSFUL ; }
tries to indent active line to the right .
