Exemple #1
0
 def __init__(self, parent=None):
     """
     Constructor
     
     @param parent parent widget of this lexer
     """
     QsciLexerCSharp.__init__(self, parent)
     Lexer.__init__(self)
     
     self.commentString = "//"
     self.streamCommentString = {
         'start': '/* ',
         'end': ' */'
     }
     self.boxCommentString = {
         'start': '/* ',
         'middle': ' * ',
         'end': ' */'
     }
     
     self.keywordSetDescriptions = [
         self.tr("Primary keywords and identifiers"),
         self.tr("Secondary keywords and identifiers"),
         self.tr("Documentation comment keywords"),
         self.tr("Global classes and typedefs"),
         self.tr("Preprocessor definitions"),
         self.tr("Task marker and error marker keywords"),
     ]
Exemple #2
0
    def __init__(self, parent=None):
        """
        Constructor
        
        @param parent parent widget of this lexer
        """
        QsciLexerCSharp.__init__(self, parent)
        Lexer.__init__(self)

        self.commentString = "//"
        self.streamCommentString = {'start': '/* ', 'end': ' */'}
        self.boxCommentString = {'start': '/* ', 'middle': ' * ', 'end': ' */'}
Exemple #3
0
 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 QsciLexerCSharp.keywords(self, kwSet)
Exemple #4
0
 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 QsciLexerCSharp.keywords(self, kwSet)
Exemple #5
0
 def __init__(self, parent=None):
     """
     Constructor
     
     @param parent parent widget of this lexer
     """
     QsciLexerCSharp.__init__(self, parent)
     Lexer.__init__(self)
     
     self.commentString = "//"
     self.streamCommentString = {
         'start': '/* ',
         'end': ' */'
     }
     self.boxCommentString = {
         'start': '/* ',
         'middle': ' * ',
         'end': ' */'
     }
Exemple #6
0
    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))