CodeStyleCheckerDialog: further improvements to the progress tab.

Fri, 19 Jun 2020 14:18:31 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 19 Jun 2020 14:18:31 +0200
changeset 7632
7ac16bf7695b
parent 7631
2c7ccb4484bf
child 7633
96382cbe1d43

CodeStyleCheckerDialog: further improvements to the progress tab.

eric6/APIs/Python3/eric6.api file | annotate | diff | comparison | revisions
eric6/Documentation/Help/source.qch file | annotate | diff | comparison | revisions
eric6/Documentation/Source/eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog.html file | annotate | diff | comparison | revisions
eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py file | annotate | diff | comparison | revisions
--- a/eric6/APIs/Python3/eric6.api	Fri Jun 19 13:46:58 2020 +0200
+++ b/eric6/APIs/Python3/eric6.api	Fri Jun 19 14:18:31 2020 +0200
@@ -2982,7 +2982,7 @@
 eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog.CodeStyleCheckerDialog.positionRole?7
 eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog.CodeStyleCheckerDialog.prepare?4(fileList, project)
 eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog.CodeStyleCheckerDialog.start?4(fn, save=False, repeat=None)
-eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog.CodeStyleCheckerDialog?1(styleCheckService, parent=None)
+eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog.CodeStyleCheckerDialog?1(styleCheckService, project=None, parent=None)
 eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCodeSelectionDialog.CodeStyleCodeSelectionDialog.getSelectedCodes?4()
 eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCodeSelectionDialog.CodeStyleCodeSelectionDialog?1(codes, categories, showFixCodes, parent=None)
 eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleFixer.CodeStyleFixer.finalize?4()
Binary file eric6/Documentation/Help/source.qch has changed
--- a/eric6/Documentation/Source/eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog.html	Fri Jun 19 13:46:58 2020 +0200
+++ b/eric6/Documentation/Source/eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog.html	Fri Jun 19 14:18:31 2020 +0200
@@ -285,7 +285,7 @@
 
 <a NAME="CodeStyleCheckerDialog.__init__" ID="CodeStyleCheckerDialog.__init__"></a>
 <h4>CodeStyleCheckerDialog (Constructor)</h4>
-<b>CodeStyleCheckerDialog</b>(<i>styleCheckService, parent=None</i>)
+<b>CodeStyleCheckerDialog</b>(<i>styleCheckService, project=None, parent=None</i>)
 
 <p>
         Constructor
@@ -296,6 +296,11 @@
 <dd>
 reference to the service
 </dd>
+<dt><i>project</i> (Project)</dt>
+<dd>
+reference to the project if called on project or project
+            browser level
+</dd>
 <dt><i>parent</i> (QWidget)</dt>
 <dd>
 reference to the parent widget
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Fri Jun 19 13:46:58 2020 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Fri Jun 19 14:18:31 2020 +0200
@@ -90,12 +90,15 @@
     noFiles = 1
     hasResults = 2
     
-    def __init__(self, styleCheckService, parent=None):
+    def __init__(self, styleCheckService, project=None, parent=None):
         """
         Constructor
         
         @param styleCheckService reference to the service
         @type CodeStyleCheckService
+        @param project reference to the project if called on project or project
+            browser level
+        @type Project
         @param parent reference to the parent widget
         @type QWidget
         """
@@ -103,6 +106,8 @@
         self.setupUi(self)
         self.setWindowFlags(Qt.Window)
         
+        self.__project = project
+        
         self.optionsTabWidget.setCurrentIndex(0)
         
         self.excludeMessagesSelectButton.setIcon(
@@ -561,7 +566,13 @@
             self.checkProgressLabel.setVisible(len(self.files) > 1)
             self.checkProgress.setVisible(len(self.files) > 1)
             if len(self.files) > 1:
-                self.progressList.addItems(self.files)
+                if self.__project:
+                    self.progressList.addItems([
+                        os.path.join("...", self.__project.getRelativePath(f))
+                        for f in self.files
+                    ])
+                else:
+                    self.progressList.addItems(self.files)
         
         QApplication.processEvents()
     
@@ -969,6 +980,9 @@
         @param fn filename of the just checked file
         @type str
         """
+        if self.__project:
+            fn = os.path.join("...", self.__project.getRelativePath(fn))
+        
         self.checkProgress.setValue(self.progress)
         self.checkProgressLabel.setPath(fn)
         

eric ide

mercurial