src/eric7/RemoteServerInterface/EricServerInterface.py

branch
server
changeset 10574
622e59b51640
parent 10568
399d81a784a4
child 10597
fbe93720ee9f
diff -r c4f503f40caf -r 622e59b51640 src/eric7/RemoteServerInterface/EricServerInterface.py
--- a/src/eric7/RemoteServerInterface/EricServerInterface.py	Wed Feb 14 10:24:23 2024 +0100
+++ b/src/eric7/RemoteServerInterface/EricServerInterface.py	Thu Feb 15 13:59:02 2024 +0100
@@ -38,6 +38,8 @@
 
     @signal remoteReply(category:int, request:str, params:dict) emitted to deliver the
         reply of an unknown category
+    @signal remoteCoverageReply(request:str, params:dict) emitted to deliver the reply
+        of a remote server code coverage request
     @signal remoteDebuggerReply(request:str, params:dict) emitted to deliver the reply
         of a remote server debugger request
     @signal remoteEchoReply(request:str, params:dict) emitted to deliver the reply of
@@ -57,6 +59,7 @@
 
     remoteReply = pyqtSignal(int, str, dict)
 
+    remoteCoverageReply = pyqtSignal(str, dict)
     remoteDebuggerReply = pyqtSignal(str, dict)
     remoteEchoReply = pyqtSignal(str, dict)
     remoteFileSystemReply = pyqtSignal(str, dict)
@@ -75,6 +78,7 @@
         self.__ui = parent
 
         self.__categorySignalMapping = {
+            EricRequestCategory.Coverage: self.remoteCoverageReply,
             EricRequestCategory.Debugger: self.remoteDebuggerReply,
             EricRequestCategory.Echo: self.remoteEchoReply,
             EricRequestCategory.FileSystem: self.remoteFileSystemReply,
@@ -107,21 +111,27 @@
         try:
             return self.__serviceInterfaces[lname]
         except KeyError:
-            if lname not in ("debugger", "filesystem", "project"):
+            if lname not in ("coverage", "debugger", "filesystem", "project"):
                 raise ValueError(f"no such service supported ({name})")
             else:
                 # instantiate the service interface
                 if lname == "filesystem":
                     from .EricServerFileSystemInterface import (  # noqa: I101
-                        EricServerFileSystemInterface
+                        EricServerFileSystemInterface,
                     )
                     self.__serviceInterfaces[lname] = (
                         EricServerFileSystemInterface(self)
                     )
                 elif lname == "debugger":
-                    from .EricServerDebuggerInterface import EricServerDebuggerInterface
-                    # noqa: I101
+                    from .EricServerDebuggerInterface import (  # noqa: I101
+                        EricServerDebuggerInterface,
+                    )
                     self.__serviceInterfaces[lname] = EricServerDebuggerInterface(self)
+                elif lname == "coverage":
+                    from .EricServerCoverageInterface import (  # noqa: I101
+                        EricServerCoverageInterface,
+                    )
+                    self.__serviceInterfaces[lname] = EricServerCoverageInterface(self)
                 elif lname == "project":
                     # TODO: 'Project Interface' not implemented yet
                     pass

eric ide

mercurial