src/eric7/QScintilla/Lexers/LexerJava.py

branch
eric7
changeset 10431
64157aeb0312
parent 10069
435cc5875135
child 10439
21c28b0f9e41
equal deleted inserted replaced
10430:e440aaf179ce 10431:64157aeb0312
22 def __init__(self, parent=None): 22 def __init__(self, parent=None):
23 """ 23 """
24 Constructor 24 Constructor
25 25
26 @param parent parent widget of this lexer 26 @param parent parent widget of this lexer
27 @type QWidget
27 """ 28 """
28 QsciLexerJava.__init__(self, parent) 29 QsciLexerJava.__init__(self, parent)
29 Lexer.__init__(self) 30 Lexer.__init__(self)
30 31
31 self.commentString = "//" 32 self.commentString = "//"
58 59
59 def isCommentStyle(self, style): 60 def isCommentStyle(self, style):
60 """ 61 """
61 Public method to check, if a style is a comment style. 62 Public method to check, if a style is a comment style.
62 63
63 @param style style to check (integer) 64 @param style style to check
64 @return flag indicating a comment style (boolean) 65 @type int
66 @return flag indicating a comment style
67 @rtype bool
65 """ 68 """
66 return style in [ 69 return style in [
67 QsciLexerJava.Comment, 70 QsciLexerJava.Comment,
68 QsciLexerJava.CommentDoc, 71 QsciLexerJava.CommentDoc,
69 QsciLexerJava.CommentLine, 72 QsciLexerJava.CommentLine,
72 75
73 def isStringStyle(self, style): 76 def isStringStyle(self, style):
74 """ 77 """
75 Public method to check, if a style is a string style. 78 Public method to check, if a style is a string style.
76 79
77 @param style style to check (integer) 80 @param style style to check
78 @return flag indicating a string style (boolean) 81 @type int
82 @return flag indicating a string style
83 @rtype bool
79 """ 84 """
80 return style in [ 85 return style in [
81 QsciLexerJava.DoubleQuotedString, 86 QsciLexerJava.DoubleQuotedString,
82 QsciLexerJava.SingleQuotedString, 87 QsciLexerJava.SingleQuotedString,
83 QsciLexerJava.UnclosedString, 88 QsciLexerJava.UnclosedString,
86 91
87 def defaultKeywords(self, kwSet): 92 def defaultKeywords(self, kwSet):
88 """ 93 """
89 Public method to get the default keywords. 94 Public method to get the default keywords.
90 95
91 @param kwSet number of the keyword set (integer) 96 @param kwSet number of the keyword set
92 @return string giving the keywords (string) or None 97 @type int
98 @return string giving the keywords or None
99 @rtype str
93 """ 100 """
94 return QsciLexerJava.keywords(self, kwSet) 101 return QsciLexerJava.keywords(self, kwSet)
95 102
96 def maximumKeywordSet(self): 103 def maximumKeywordSet(self):
97 """ 104 """
98 Public method to get the maximum keyword set. 105 Public method to get the maximum keyword set.
99 106
100 @return maximum keyword set (integer) 107 @return maximum keyword set
108 @rtype int
101 """ 109 """
102 return 4 110 return 4
103 111
104 112
105 def createLexer(variant="", parent=None): # noqa: U100 113 def createLexer(variant="", parent=None): # noqa: U100

eric ide

mercurial