Debugger/DebuggerInterfaceRuby.py

changeset 2988
f53c03574697
parent 2953
703452a2876f
child 3020
542e97d4ecb3
child 3057
10516539f238
--- a/Debugger/DebuggerInterfaceRuby.py	Sun Oct 06 18:02:21 2013 +0200
+++ b/Debugger/DebuggerInterfaceRuby.py	Sun Oct 06 19:00:04 2013 +0200
@@ -67,7 +67,8 @@
         # set default values for capabilities of clients
         self.clientCapabilities = ClientDefaultCapabilities
         
-        self.codec = QTextCodec.codecForName(str(Preferences.getSystem("StringEncoding")))
+        self.codec = QTextCodec.codecForName(
+            str(Preferences.getSystem("StringEncoding")))
         
         if passive:
             # set translation function
@@ -111,7 +112,8 @@
         
         @param program name of the executable to start (string)
         @param arguments arguments to be passed to the program (list of string)
-        @param environment dictionary of environment settings to pass (dict of string)
+        @param environment dictionary of environment settings to pass
+            (dict of string)
         @return the process object (QProcess) or None
         """
         proc = QProcess()
@@ -163,7 +165,8 @@
                     E5MessageBox.critical(None,
                         self.trUtf8("Start Debugger"),
                         self.trUtf8(
-                            """<p>The debugger backend could not be started.</p>"""))
+                            """<p>The debugger backend could not be"""
+                            """ started.</p>"""))
                 
                 # set translation function
                 if Preferences.getDebugger("PathTranslation"):
@@ -208,7 +211,8 @@
                     E5MessageBox.critical(None,
                         self.trUtf8("Start Debugger"),
                         self.trUtf8(
-                            """<p>The debugger backend could not be started.</p>"""))
+                            """<p>The debugger backend could not be"""
+                            """ started.</p>"""))
                 return process, self.__isNetworked
         
         process = self.__startProcess(interpreter,
@@ -217,7 +221,8 @@
         if process is None:
             E5MessageBox.critical(None,
                 self.trUtf8("Start Debugger"),
-                self.trUtf8("""<p>The debugger backend could not be started.</p>"""))
+                self.trUtf8(
+                    """<p>The debugger backend could not be started.</p>"""))
         return process, self.__isNetworked
 
     def startRemoteForProject(self, port, runInConsole):
@@ -256,11 +261,14 @@
                     E5MessageBox.critical(None,
                         self.trUtf8("Start Debugger"),
                         self.trUtf8(
-                            """<p>The debugger backend could not be started.</p>"""))
+                            """<p>The debugger backend could not be"""
+                            """ started.</p>"""))
                 # set translation function
                 if project.getDebugProperty("PATHTRANSLATION"):
-                    self.translateRemote = project.getDebugProperty("REMOTEPATH")
-                    self.translateLocal = project.getDebugProperty("LOCALPATH")
+                    self.translateRemote = \
+                        project.getDebugProperty("REMOTEPATH")
+                    self.translateLocal = \
+                        project.getDebugProperty("LOCALPATH")
                     self.translate = self.__remoteTranslation
                 else:
                     self.translate = self.__identityTranslation
@@ -299,7 +307,8 @@
                     E5MessageBox.critical(None,
                         self.trUtf8("Start Debugger"),
                         self.trUtf8(
-                            """<p>The debugger backend could not be started.</p>"""))
+                            """<p>The debugger backend could not be"""
+                            """ started.</p>"""))
                 return process, self.__isNetworked
         
         process = self.__startProcess(interpreter,
@@ -308,7 +317,8 @@
         if process is None:
             E5MessageBox.critical(None,
                 self.trUtf8("Start Debugger"),
-                self.trUtf8("""<p>The debugger backend could not be started.</p>"""))
+                self.trUtf8(
+                    """<p>The debugger backend could not be started.</p>"""))
         return process, self.__isNetworked
 
     def getClientCapabilities(self):
@@ -388,21 +398,23 @@
         
         @param env environment settings (dictionary)
         """
-        self.__sendCommand('{0}{1}\n'.format(DebugProtocol.RequestEnv, str(env)))
+        self.__sendCommand('{0}{1}\n'.format(
+            DebugProtocol.RequestEnv, str(env)))
         
-    def remoteLoad(self, fn, argv, wd, traceInterpreter=False, autoContinue=True,
-                   autoFork=False, forkChild=False):
+    def remoteLoad(self, fn, argv, wd, traceInterpreter=False,
+                   autoContinue=True, autoFork=False, forkChild=False):
         """
         Public method to load a new program to debug.
         
         @param fn the filename to debug (string)
         @param argv the commandline arguments to pass to the program (string)
         @param wd the working directory for the program (string)
-        @keyparam traceInterpreter flag indicating if the interpreter library should be
-            traced as well (boolean)
-        @keyparam autoContinue flag indicating, that the debugger should not stop
-            at the first executable line (boolean)
-        @keyparam autoFork flag indicating the automatic fork mode (boolean) (ignored)
+        @keyparam traceInterpreter flag indicating if the interpreter library
+            should be traced as well (boolean)
+        @keyparam autoContinue flag indicating, that the debugger should not
+            stop at the first executable line (boolean)
+        @keyparam autoFork flag indicating the automatic fork mode (boolean)
+            (ignored)
         @keyparam forkChild flag indicating to debug the child after forking
             (boolean) (ignored)
         """
@@ -411,8 +423,9 @@
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
         self.__sendCommand('{0}{1}|{2}|{3}|{4:d}\n'.format(
-            DebugProtocol.RequestLoad, wd, fn, str(Utilities.parseOptionString(argv)),
-             traceInterpreter))
+            DebugProtocol.RequestLoad, wd, fn,
+            str(Utilities.parseOptionString(argv)),
+            traceInterpreter))
         
     def remoteRun(self, fn, argv, wd, autoFork=False, forkChild=False):
         """
@@ -421,14 +434,16 @@
         @param fn the filename to run (string)
         @param argv the commandline arguments to pass to the program (string)
         @param wd the working directory for the program (string)
-        @keyparam autoFork flag indicating the automatic fork mode (boolean) (ignored)
+        @keyparam autoFork flag indicating the automatic fork mode (boolean)
+            (ignored)
         @keyparam forkChild flag indicating to debug the child after forking
             (boolean) (ignored)
         """
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
         self.__sendCommand('{0}{1}|{2}|{3}\n'.format(
-            DebugProtocol.RequestRun, wd, fn, str(Utilities.parseOptionString(argv))))
+            DebugProtocol.RequestRun, wd, fn,
+            str(Utilities.parseOptionString(argv))))
         
     def remoteCoverage(self, fn, argv, wd, erase=False):
         """
@@ -451,7 +466,8 @@
         @param fn the filename to run (string)
         @param argv the commandline arguments to pass to the program (string)
         @param wd the working directory for the program (string)
-        @keyparam erase flag indicating that timing info should be cleared first (boolean)
+        @keyparam erase flag indicating that timing info should be cleared
+            first (boolean)
         @exception NotImplementedError raised to indicate that this interface
             is not supported
         """
@@ -497,7 +513,8 @@
         
         @param special flag indicating a special continue operation (boolean)
         """
-        self.__sendCommand('{0}{1:d}\n'.format(DebugProtocol.RequestContinue, special))
+        self.__sendCommand('{0}{1:d}\n'.format(
+            DebugProtocol.RequestContinue, special))
 
     def remoteBreakpoint(self, fn, line, set, cond=None, temp=False):
         """
@@ -511,7 +528,7 @@
         """
         fn = self.translate(fn, False)
         self.__sendCommand('{0}{1}@@{2:d}@@{3:d}@@{4:d}@@{5}\n'.format(
-                           DebugProtocol.RequestBreak, fn, line, temp, set, cond))
+            DebugProtocol.RequestBreak, fn, line, temp, set, cond))
         
     def remoteBreakpointEnable(self, fn, line, enable):
         """
@@ -519,7 +536,8 @@
         
         @param fn filename the breakpoint belongs to (string)
         @param line linenumber of the breakpoint (int)
-        @param enable flag indicating enabling or disabling a breakpoint (boolean)
+        @param enable flag indicating enabling or disabling a breakpoint
+            (boolean)
         """
         fn = self.translate(fn, False)
         self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format(
@@ -542,7 +560,8 @@
         Public method to set or clear a watch expression.
         
         @param cond expression of the watch expression (string)
-        @param set flag indicating setting or resetting a watch expression (boolean)
+        @param set flag indicating setting or resetting a watch expression
+            (boolean)
         @param temp flag indicating a temporary watch expression (boolean)
         """
         # cond is combination of cond and special (s. watch expression viewer)
@@ -554,7 +573,8 @@
         Public method to enable or disable a watch expression.
         
         @param cond expression of the watch expression (string)
-        @param enable flag indicating enabling or disabling a watch expression (boolean)
+        @param enable flag indicating enabling or disabling a watch expression
+            (boolean)
         """
         # cond is combination of cond and special (s. watch expression viewer)
         self.__sendCommand('{0}{1},{2:d}\n'.format(
@@ -562,7 +582,8 @@
     
     def remoteWatchpointIgnore(self, cond, count):
         """
-        Public method to ignore a watch expression the next couple of occurrences.
+        Public method to ignore a watch expression the next couple of
+        occurrences.
         
         @param cond expression of the watch expression (string)
         @param count number of occurrences to ignore (int)
@@ -614,7 +635,8 @@
         @param framenr framenumber of the variables to retrieve (int)
         """
         self.__sendCommand('{0}{1}, {2:d}, {3:d}, {4}\n'.format(
-            DebugProtocol.RequestVariable, str(var), framenr, scope, str(filter)))
+            DebugProtocol.RequestVariable, str(var), framenr, scope,
+            str(filter)))
         
     def remoteClientSetFilter(self, scope, filter):
         """
@@ -636,7 +658,8 @@
         
     def remoteEval(self, arg):
         """
-        Public method to evaluate arg in the current context of the debugged program.
+        Public method to evaluate arg in the current context of the debugged
+        program.
         
         @param arg the arguments to evaluate (string)
         """
@@ -644,7 +667,8 @@
         
     def remoteExec(self, stmt):
         """
-        Public method to execute stmt in the current context of the debugged program.
+        Public method to execute stmt in the current context of the debugged
+        program.
         
         @param stmt statement to execute (string)
         """
@@ -669,7 +693,8 @@
         
         @param text the text to be completed (string)
         """
-        self.__sendCommand("{0}{1}\n".format(DebugProtocol.RequestCompletion, text))
+        self.__sendCommand("{0}{1}\n".format(
+            DebugProtocol.RequestCompletion, text))
         
     def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase):
         """
@@ -679,11 +704,13 @@
         @param tn the testname to load (string)
         @param tfn the test function name to load tests from (string)
         @param failed list of failed test, if only failed test should be run
-                (list of strings)
-        @param cov flag indicating collection of coverage data is requested (boolean)
+            (list of strings)
+        @param cov flag indicating collection of coverage data is requested
+            (boolean)
         @param covname filename to be used to assemble the coverage caches
-                filename (string)
-        @param coverase flag indicating erasure of coverage data is requested (boolean)
+            filename (string)
+        @param coverase flag indicating erasure of coverage data is requested
+            (boolean)
         @exception NotImplementedError raised to indicate that this interface
             is not supported
         """
@@ -793,7 +820,8 @@
                         exctype = None
                         excmessage = ''
                         stack = []
-                    self.debugServer.signalClientException(exctype, excmessage, stack)
+                    self.debugServer.signalClientException(
+                        exctype, excmessage, stack)
                     continue
                 
                 if resp == DebugProtocol.ResponseSyntax:
@@ -808,7 +836,8 @@
                         fn = ''
                         ln = 0
                         cn = 0
-                    self.debugServer.signalClientSyntaxError(message, fn, ln, cn)
+                    self.debugServer.signalClientSyntaxError(
+                        message, fn, ln, cn)
                     continue
                 
                 if resp == DebugProtocol.ResponseExit:
@@ -829,7 +858,8 @@
                 
                 if resp == DebugProtocol.ResponseBanner:
                     version, platform, dbgclient = eval(line[eoc:-1])
-                    self.debugServer.signalClientBanner(version, platform, dbgclient)
+                    self.debugServer.signalClientBanner(
+                        version, platform, dbgclient)
                     continue
                 
                 if resp == DebugProtocol.ResponseCapabilities:

eric ide

mercurial