Fixed a few issues related to showing coverage info.

Thu, 07 Jan 2010 13:42:05 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 07 Jan 2010 13:42:05 +0000
changeset 30
9513afbd57f1
parent 29
391dc0bc4ae5
child 31
744cd0b4b8cd

Fixed a few issues related to showing coverage info.

Project/Project.py file | annotate | diff | comparison | revisions
QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- a/Project/Project.py	Thu Jan 07 13:13:31 2010 +0000
+++ b/Project/Project.py	Thu Jan 07 13:42:05 2010 +0000
@@ -4200,8 +4200,9 @@
                 os.path.isfile("%s.profile" % basename) or \
                 os.path.isfile("%s.profile" % tbasename))
             self.codeCoverageAct.setEnabled(\
-                os.path.isfile("%s.coverage" % basename) or \
-                os.path.isfile("%s.coverage" % tbasename))
+                self.pdata["PROGLANGUAGE"][0] == "Python3" and \
+                (os.path.isfile("%s.coverage" % basename) or \
+                 os.path.isfile("%s.coverage" % tbasename)))
         else:
             self.codeProfileAct.setEnabled(False)
             self.codeCoverageAct.setEnabled(False)
--- a/QScintilla/Editor.py	Thu Jan 07 13:13:31 2010 +0000
+++ b/QScintilla/Editor.py	Thu Jan 07 13:42:05 2010 +0000
@@ -3867,6 +3867,10 @@
                 os.path.isfile("%s.coverage" % basename) or \
                 os.path.isfile("%s.coverage" % tbasename)
         
+        # now check for syntax errors
+        if self.hasSyntaxErrors():
+            coEnable = False
+        
         self.profileMenuAct.setEnabled(prEnable)
         self.coverageMenuAct.setEnabled(coEnable)
         self.coverageShowAnnotationMenuAct.setEnabled(\
@@ -5322,4 +5326,4 @@
         word = self.getWord(line, index)
         self.spell.ignoreAlways(word)
         if Preferences.getEditor("AutoSpellCheckingEnabled"):
-            self.spell.checkDocumentIncrementally()
\ No newline at end of file
+            self.spell.checkDocumentIncrementally()

eric ide

mercurial