Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py

branch
Py2 comp.
changeset 3178
f25fc1364c88
parent 3161
06f57a834adf
parent 3175
1a6638ccce9d
child 3456
96232974dcdb
diff -r 06f57a834adf -r f25fc1364c88 Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Wed Jan 01 14:39:32 2014 +0100
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Sun Jan 05 23:22:17 2014 +0100
@@ -323,9 +323,6 @@
         self.checkProgress.setVisible(True)
         QApplication.processEvents()
         
-        self.__resetStatistics()
-        self.__clearErrors()
-        
         if save:
             self.__fileOrFileList = fn
         
@@ -351,6 +348,9 @@
                     [f for f in files
                      if not fnmatch.fnmatch(f, filter.strip())]
         
+        self.__resetStatistics()
+        self.__clearErrors(files)
+        
         py3files = [f for f in files
                     if f.endswith(
                         tuple(Preferences.getPython("Python3Extensions")))]
@@ -548,7 +548,6 @@
             QApplication.processEvents()
             self.statisticsButton.setEnabled(False)
             self.showButton.setEnabled(False)
-            self.__clearErrors()
         else:
             self.statisticsButton.setEnabled(True)
             self.showButton.setEnabled(True)
@@ -803,13 +802,16 @@
         elif button == self.statisticsButton:
             self.on_statisticsButton_clicked()
     
-    def __clearErrors(self):
+    def __clearErrors(self, files):
         """
-        Private method to clear all warning markers of open editors.
+        Private method to clear all warning markers of open editors to be
+        checked.
+        
+        @param files list of files to be checked (list of string)
         """
         vm = e5App().getObject("ViewManager")
         openFiles = vm.getOpenFilenames()
-        for file in openFiles:
+        for file in [f for f in openFiles if f in files]:
             editor = vm.getOpenEditor(file)
             editor.clearStyleWarnings()
     

eric ide

mercurial