Changed code of annotation support to make it easier to extend for more annotation types.

Fri, 19 Nov 2010 19:32:32 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 19 Nov 2010 19:32:32 +0100
changeset 730
772666a0a05d
parent 729
090203934c19
child 733
a7fdfe0b9222

Changed code of annotation support to make it easier to extend for more annotation types.

QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- a/QScintilla/Editor.py	Fri Nov 19 08:52:51 2010 +0100
+++ b/QScintilla/Editor.py	Fri Nov 19 19:32:32 2010 +0100
@@ -4608,15 +4608,18 @@
                     errorAnnotations.append(
                         self.trUtf8("Error: {0}").format(self.syntaxerrors[handle]))
             
+            wLen = len(warningAnnotations)
+            eLen = len(errorAnnotations)
             annotations = []
-            if len(warningAnnotations):
+            
+            if wLen:
                 annotationWarningTxt = "\n".join(warningAnnotations)
-                if len(errorAnnotations) > 0:
+                if eLen:
                     annotationWarningTxt += "\n"
                 annotations.append(QsciStyledText(annotationWarningTxt, 
                     self.annotationWarningStyle))
             
-            if len(errorAnnotations) > 0:
+            if eLen:
                 annotationErrorTxt = "\n".join(errorAnnotations)
                 annotations.append(QsciStyledText(annotationErrorTxt, 
                     self.annotationErrorStyle))

eric ide

mercurial