code: def tryCondition(self, block):
          
          currentBlock = self._prevNonEmptyBlock(block)
          if not currentBlock.isValid():
              return None
  
          # found non-empty line
          currentText = currentBlock.text()
          if currentText.rstrip().endswith(';') and \
             re.search(r'^\s*(if\b|[}]?\s*else|do\b|while\b|for)', currentText) is None:
              # idea: we had something like:
              #   if/while/for (expression)
              #       statement();  <-- we catch this trailing ';'
              # Now, look for a line that starts with if/for/while, that has one
              # indent level less.
              currentIndentation = self._lineIndent(currentText)
              if not currentIndentation:
                  return None
  
              for block in self.iterateBlocksBackFrom(currentBlock.previous()):
                  if block.text().strip(): # not empty
                      indentation = self._blockIndent(block)
  
                      if len(indentation) < len(currentIndentation):
                          if re.search(r'^\s*(if\b|[}]?\s*else|do\b|while\b|for)[^{]*$', block.text()) is not None:
                              dbg("tryCondition: success in line %d" % block.blockNumber())
                              return indentation
                          break
  
          return None
docs: Search for if, do, while, for, ... as we want to indent then.
          Return null, if nothing useful found.
          Note: The code is written to be called *after* tryCComment and tryCppComment!