src/eric7/QScintilla/Lexers/LexerJava.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/QScintilla/Lexers/LexerJava.py
--- a/src/eric7/QScintilla/Lexers/LexerJava.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/QScintilla/Lexers/LexerJava.py	Wed Jul 13 14:55:47 2022 +0200
@@ -17,26 +17,20 @@
     """
     Subclass to implement some additional lexer dependant methods.
     """
+
     def __init__(self, parent=None):
         """
         Constructor
-        
+
         @param parent parent widget of this lexer
         """
         QsciLexerJava.__init__(self, parent)
         Lexer.__init__(self)
-        
+
         self.commentString = "//"
-        self.streamCommentString = {
-            'start': '/* ',
-            'end': ' */'
-        }
-        self.boxCommentString = {
-            'start': '/* ',
-            'middle': ' * ',
-            'end': ' */'
-        }
-        
+        self.streamCommentString = {"start": "/* ", "end": " */"}
+        self.boxCommentString = {"start": "/* ", "middle": " * ", "end": " */"}
+
         self.keywordSetDescriptions = [
             self.tr("Primary keywords and identifiers"),
             self.tr("Secondary keywords and identifiers"),
@@ -45,7 +39,7 @@
             self.tr("Preprocessor definitions"),
             self.tr("Task marker and error marker keywords"),
         ]
-    
+
     def initProperties(self):
         """
         Public slot to initialize the properties.
@@ -60,44 +54,48 @@
             indentStyle |= QsciScintilla.AiClosing
         self.setAutoIndentStyle(indentStyle)
         self.setFoldCompact(Preferences.getEditor("AllFoldCompact"))
-    
+
     def isCommentStyle(self, style):
         """
         Public method to check, if a style is a comment style.
-        
+
         @param style style to check (integer)
         @return flag indicating a comment style (boolean)
         """
-        return style in [QsciLexerJava.Comment,
-                         QsciLexerJava.CommentDoc,
-                         QsciLexerJava.CommentLine,
-                         QsciLexerJava.CommentLineDoc]
-    
+        return style in [
+            QsciLexerJava.Comment,
+            QsciLexerJava.CommentDoc,
+            QsciLexerJava.CommentLine,
+            QsciLexerJava.CommentLineDoc,
+        ]
+
     def isStringStyle(self, style):
         """
         Public method to check, if a style is a string style.
-        
+
         @param style style to check (integer)
         @return flag indicating a string style (boolean)
         """
-        return style in [QsciLexerJava.DoubleQuotedString,
-                         QsciLexerJava.SingleQuotedString,
-                         QsciLexerJava.UnclosedString,
-                         QsciLexerJava.VerbatimString]
-    
+        return style in [
+            QsciLexerJava.DoubleQuotedString,
+            QsciLexerJava.SingleQuotedString,
+            QsciLexerJava.UnclosedString,
+            QsciLexerJava.VerbatimString,
+        ]
+
     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 QsciLexerJava.keywords(self, kwSet)
-    
+
     def maximumKeywordSet(self):
         """
         Public method to get the maximum keyword set.
-        
+
         @return maximum keyword set (integer)
         """
         return 4

eric ide

mercurial