Debugger/DebugUI.py

branch
jsonrpc
changeset 5124
1ba8ee313b57
parent 5123
d07dd3cf0dc3
child 5130
27fe451262bf
diff -r d07dd3cf0dc3 -r 1ba8ee313b57 Debugger/DebugUI.py
--- a/Debugger/DebugUI.py	Thu Sep 01 18:28:27 2016 +0200
+++ b/Debugger/DebugUI.py	Thu Sep 01 19:00:46 2016 +0200
@@ -13,8 +13,7 @@
 
 from PyQt5.QtCore import pyqtSignal, QObject, Qt
 from PyQt5.QtGui import QKeySequence
-from PyQt5.QtWidgets import QMenu, QToolBar, QApplication, QDialog, \
-    QInputDialog
+from PyQt5.QtWidgets import QMenu, QToolBar, QApplication, QDialog
 
 from UI.Info import Program
 
@@ -104,8 +103,6 @@
         self.forkIntoChild = Preferences.toBool(
             Preferences.Prefs.settings.value('DebugInfo/ForkIntoChild', False))
         
-        self.evalHistory = []
-        self.execHistory = []
         self.lastDebuggedFile = None
         self.lastStartAction = 0    # 0=None, 1=Script, 2=Project
         self.clientType = ""
@@ -428,36 +425,6 @@
         act.triggered.connect(self.__stepQuit)
         self.actions.append(act)
         
-        self.debugActGrp2 = createActionGroup(self)
-
-        act = E5Action(
-            self.tr('Evaluate'),
-            self.tr('E&valuate...'),
-            0, 0, self.debugActGrp2, 'dbg_evaluate')
-        act.setStatusTip(self.tr('Evaluate in current context'))
-        act.setWhatsThis(self.tr(
-            """<b>Evaluate</b>"""
-            """<p>Evaluate an expression in the current context of the"""
-            """ debugged program. The result is displayed in the"""
-            """ shell window.</p>"""
-        ))
-        act.triggered.connect(self.__eval)
-        self.actions.append(act)
-        
-        act = E5Action(
-            self.tr('Execute'),
-            self.tr('E&xecute...'),
-            0, 0, self.debugActGrp2, 'dbg_execute')
-        act.setStatusTip(
-            self.tr('Execute a one line statement in the current context'))
-        act.setWhatsThis(self.tr(
-            """<b>Execute</b>"""
-            """<p>Execute a one line statement in the current context"""
-            """ of the debugged program.</p>"""
-        ))
-        act.triggered.connect(self.__exec)
-        self.actions.append(act)
-        
         self.dbgFilterAct = E5Action(
             self.tr('Variables Type Filter'),
             self.tr('Varia&bles Type Filter...'), 0, 0, self,
@@ -585,7 +552,6 @@
         self.actions.append(act)
 
         self.debugActGrp.setEnabled(False)
-        self.debugActGrp2.setEnabled(False)
         self.dbgSetBpActGrp.setEnabled(False)
         self.runAct.setEnabled(False)
         self.runProjectAct.setEnabled(False)
@@ -627,8 +593,6 @@
         
         dmenu.addActions(self.debugActGrp.actions())
         dmenu.addSeparator()
-        dmenu.addActions(self.debugActGrp2.actions())
-        dmenu.addSeparator()
         dmenu.addActions(self.dbgSetBpActGrp.actions())
         self.menuBreakpointsAct = dmenu.addMenu(self.breakpointsMenu)
         dmenu.addSeparator()
@@ -806,7 +770,6 @@
         self.profileAct.setEnabled(False)
         self.coverageAct.setEnabled(False)
         self.debugActGrp.setEnabled(False)
-        self.debugActGrp2.setEnabled(False)
         self.dbgSetBpActGrp.setEnabled(False)
         self.lastAction = -1
         if not self.projectOpen:
@@ -978,7 +941,6 @@
         """
         self.lastAction = -1
         self.debugActGrp.setEnabled(False)
-        self.debugActGrp2.setEnabled(False)
         if not self.passive:
             if self.editorOpen:
                 editor = self.viewmanager.activeWindow()
@@ -1016,7 +978,6 @@
             self.__getClientVariables()
 
         self.debugActGrp.setEnabled(True)
-        self.debugActGrp2.setEnabled(True)
         
     def __clientExit(self, status):
         """
@@ -1192,7 +1153,6 @@
                 self.__getClientVariables()
                 self.ui.setDebugProfile()
                 self.debugActGrp.setEnabled(True)
-                self.debugActGrp2.setEnabled(True)
                 return
             elif res == E5MessageBox.Ignore:
                 if exceptionType not in self.excIgnoreList:
@@ -2192,64 +2152,6 @@
             aw.getFileName(), line, 1, None, 1)
         self.debugServer.remoteContinue()
     
-    def __eval(self):
-        """
-        Private method to handle the Eval action.
-        """
-        # Get the command line arguments.
-        if len(self.evalHistory) > 0:
-            curr = 0
-        else:
-            curr = -1
-
-        arg, ok = QInputDialog.getItem(
-            self.ui,
-            self.tr("Evaluate"),
-            self.tr("Enter the statement to evaluate"),
-            self.evalHistory,
-            curr, True)
-
-        if ok:
-            if not arg:
-                return
-
-            # This moves any previous occurrence of this expression to the head
-            # of the list.
-            if arg in self.evalHistory:
-                self.evalHistory.remove(arg)
-            self.evalHistory.insert(0, arg)
-            
-            self.debugServer.remoteEval(arg)
-            
-    def __exec(self):
-        """
-        Private method to handle the Exec action.
-        """
-        # Get the command line arguments.
-        if len(self.execHistory) > 0:
-            curr = 0
-        else:
-            curr = -1
-
-        stmt, ok = QInputDialog.getItem(
-            self.ui,
-            self.tr("Execute"),
-            self.tr("Enter the statement to execute"),
-            self.execHistory,
-            curr, True)
-
-        if ok:
-            if not stmt:
-                return
-
-            # This moves any previous occurrence of this statement to the head
-            # of the list.
-            if stmt in self.execHistory:
-                self.execHistory.remove(stmt)
-            self.execHistory.insert(0, stmt)
-            
-            self.debugServer.remoteExec(stmt)
-            
     def __enterRemote(self):
         """
         Private method to update the user interface.
@@ -2259,7 +2161,6 @@
         """
         # Disable further debug commands from the user.
         self.debugActGrp.setEnabled(False)
-        self.debugActGrp2.setEnabled(False)
         
         self.viewmanager.unhighlight(True)
 

eric ide

mercurial