def __init__(self, parent=None): """ Constructor @param parent parent widget of this lexer """ QsciLexerBatch.__init__(self, parent) Lexer.__init__(self) self.commentString = "REM "
def __init__(self, parent=None): """ Constructor @param parent parent widget of this lexer """ QsciLexerBatch.__init__(self, parent) Lexer.__init__(self) self.commentString = "REM " self.keywordSetDescriptions = [ self.tr("Internal Commands"), self.tr("External Commands") ]
def defaultKeywords(self, kwSet): """ Public method to get the default keywords. @param kwSet number of the keyword set (integer) @return string giving the keywords (string) or None """ return QsciLexerBatch.keywords(self, kwSet)
def checkExtensionToHighlight(self, path, editor): _, extension = os.path.splitext(path) if extension == '.py': editor.setLexer(QsciLexerPython(self)) elif extension == '.html': editor.setLexer(QsciLexerHTML(self)) elif extension == '.java': editor.setLexer(QsciLexerJava(self)) elif extension == '.cs': editor.setLexer(QsciLexerCSharp(self)) elif extension == '.bat': editor.setLexer(QsciLexerBatch(self))