def setSyntax(self, syntax):
        """Choose smart indentation algorithm according to syntax"""
        self._smartIndenter = self._chooseSmartIndenter(syntax)
def limitStrLessThen128Char(self, strStr=None):
        if len(strStr) > 128:
            logging.info("limit str less then 128 char")
            return strStr[:127] + u"_"
        else:
            return strStr