Adapted the plugin to remote (server) development because the eric IDE server does not support remote plugins yet. eric7 release-10.3.0

Sun, 19 May 2024 18:10:31 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 19 May 2024 18:10:31 +0200
branch
eric7
changeset 112
df1e86e89b24
parent 111
897c71cbc967
child 113
ab0e46f963ee

Adapted the plugin to remote (server) development because the eric IDE server does not support remote plugins yet.

ChangeLog file | annotate | diff | comparison | revisions
PluginMetricsRadon.py file | annotate | diff | comparison | revisions
PluginMetricsRadon.zip file | annotate | diff | comparison | revisions
--- a/ChangeLog	Sat Dec 23 16:11:05 2023 +0100
+++ b/ChangeLog	Sun May 19 18:10:31 2024 +0200
@@ -1,5 +1,9 @@
 ChangeLog
 ---------
+Version 10.3.0
+- adapted the plugin to remote (server) development because the eric IDE server
+  does not support remote plugins yet
+
 Version 10.2.1:
 - bug fixes
 
--- a/PluginMetricsRadon.py	Sat Dec 23 16:11:05 2023 +0100
+++ b/PluginMetricsRadon.py	Sun May 19 18:10:31 2024 +0200
@@ -18,6 +18,7 @@
 from eric7.EricWidgets import EricMessageBox
 from eric7.EricWidgets.EricApplication import ericApp
 from eric7.Project.ProjectBrowserModel import ProjectBrowserFileItem
+from eric7.SystemUtilities import FileSystemUtilities
 
 try:
     from eric7.SystemUtilities.PythonUtilities import determinePythonVersion
@@ -30,7 +31,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "10.2.1"
+version = "10.3.0"
 className = "RadonMetricsPlugin"
 packageName = "RadonMetrics"
 shortDescription = "Code metrics plugin using radon package"
@@ -649,6 +650,9 @@
             for act in self.__projectMetricsActs[1:]:
                 act.setEnabled(
                     ericApp().getObject("Project").getProjectLanguage() == "Python3"
+                    and not FileSystemUtilities.isRemoteFileName(
+                        ericApp().getObject("Project").getProjectPath()
+                    )
                 )
 
     def __projectBrowserShowMenu(self, menuName, menu):
@@ -664,6 +668,9 @@
         if (
             menuName == "Show"
             and ericApp().getObject("Project").getProjectLanguage() == "Python3"
+            and not FileSystemUtilities.isRemoteFileName(
+                ericApp().getObject("Project").getProjectPath()
+            )
             and self.__projectBrowserMenu is None
         ):
             self.__projectBrowserMenu = menu
@@ -803,7 +810,10 @@
         @type Editor
         """
         if menuName == "Show":
-            enable = editor.isPyFile()
+            enable = (
+                editor.isPyFile()
+                and not FileSystemUtilities.isRemoteFileName(editor.getFileName())
+            )
             for act in self.__editorMetricsActs:
                 act.setEnabled(enable)
 
Binary file PluginMetricsRadon.zip has changed

eric ide

mercurial