Project/DebuggerPropertiesDialog.py

changeset 5100
2c193da9b94f
parent 4631
5c1a96925da4
child 5254
c89ecaa0eda3
equal deleted inserted replaced
5099:175b36822cc9 5100:2c193da9b94f
52 52
53 if self.project.debugProperties["INTERPRETER"]: 53 if self.project.debugProperties["INTERPRETER"]:
54 self.interpreterPicker.setText( 54 self.interpreterPicker.setText(
55 self.project.debugProperties["INTERPRETER"]) 55 self.project.debugProperties["INTERPRETER"])
56 else: 56 else:
57 if self.project.pdata["PROGLANGUAGE"][0] in \ 57 if self.project.pdata["PROGLANGUAGE"] in \
58 ["Python", "Python2", "Python3"]: 58 ["Python", "Python2", "Python3"]:
59 self.interpreterPicker.setText(sys.executable) 59 self.interpreterPicker.setText(sys.executable)
60 elif self.project.pdata["PROGLANGUAGE"][0] == "Ruby": 60 elif self.project.pdata["PROGLANGUAGE"] == "Ruby":
61 self.interpreterPicker.setText("/usr/bin/ruby") 61 self.interpreterPicker.setText("/usr/bin/ruby")
62 if self.project.debugProperties["DEBUGCLIENT"]: 62 if self.project.debugProperties["DEBUGCLIENT"]:
63 self.debugClientPicker.setText( 63 self.debugClientPicker.setText(
64 self.project.debugProperties["DEBUGCLIENT"]) 64 self.project.debugProperties["DEBUGCLIENT"])
65 else: 65 else:
66 if self.project.pdata["PROGLANGUAGE"][0] in ["Python", "Python2"]: 66 if self.project.pdata["PROGLANGUAGE"] in ["Python", "Python2"]:
67 debugClient = os.path.join( 67 debugClient = os.path.join(
68 getConfig('ericDir'), 68 getConfig('ericDir'),
69 "DebugClients", "Python", "DebugClient.py") 69 "DebugClients", "Python", "DebugClient.py")
70 elif self.project.pdata["PROGLANGUAGE"][0] == "Python3": 70 elif self.project.pdata["PROGLANGUAGE"] == "Python3":
71 debugClient = os.path.join( 71 debugClient = os.path.join(
72 getConfig('ericDir'), 72 getConfig('ericDir'),
73 "DebugClients", "Python3", "DebugClient.py") 73 "DebugClients", "Python3", "DebugClient.py")
74 elif self.project.pdata["PROGLANGUAGE"][0] == "Ruby": 74 elif self.project.pdata["PROGLANGUAGE"] == "Ruby":
75 debugClient = os.path.join( 75 debugClient = os.path.join(
76 getConfig('ericDir'), 76 getConfig('ericDir'),
77 "DebugClients", "Ruby", "DebugClient.rb") 77 "DebugClients", "Ruby", "DebugClient.rb")
78 else: 78 else:
79 debugClient = "" 79 debugClient = ""
110 def on_debugClientPicker_aboutToShowPathPickerDialog(self): 110 def on_debugClientPicker_aboutToShowPathPickerDialog(self):
111 """ 111 """
112 Private slot to perform actions before the debug client selection 112 Private slot to perform actions before the debug client selection
113 dialog is shown. 113 dialog is shown.
114 """ 114 """
115 filters = self.project.dbgFilters[ 115 filters = self.project.dbgFilters[self.project.pdata["PROGLANGUAGE"]]
116 self.project.pdata["PROGLANGUAGE"][0]]
117 filters += self.tr("All Files (*)") 116 filters += self.tr("All Files (*)")
118 self.debugClientPicker.setFilters(filters) 117 self.debugClientPicker.setFilters(filters)
119 118
120 def storeData(self): 119 def storeData(self):
121 """ 120 """
122 Public method to store the entered/modified data. 121 Public method to store the entered/modified data.
123 """ 122 """
124 self.project.debugProperties["INTERPRETER"] = \ 123 self.project.debugProperties["INTERPRETER"] = \
125 self.interpreterPicker.text() 124 self.interpreterPicker.text()
126 if not self.project.debugProperties["INTERPRETER"]: 125 if not self.project.debugProperties["INTERPRETER"]:
127 if self.project.pdata["PROGLANGUAGE"][0] in \ 126 if self.project.pdata["PROGLANGUAGE"] in \
128 ["Python", "Python2", "Python3"]: 127 ["Python", "Python2", "Python3"]:
129 self.project.debugProperties["INTERPRETER"] = sys.executable 128 self.project.debugProperties["INTERPRETER"] = sys.executable
130 elif self.project.pdata["PROGLANGUAGE"][0] == "Ruby": 129 elif self.project.pdata["PROGLANGUAGE"] == "Ruby":
131 self.project.debugProperties["INTERPRETER"] = "/usr/bin/ruby" 130 self.project.debugProperties["INTERPRETER"] = "/usr/bin/ruby"
132 131
133 self.project.debugProperties["DEBUGCLIENT"] = \ 132 self.project.debugProperties["DEBUGCLIENT"] = \
134 self.debugClientPicker.text() 133 self.debugClientPicker.text()
135 if not self.project.debugProperties["DEBUGCLIENT"]: 134 if not self.project.debugProperties["DEBUGCLIENT"]:
136 if self.project.pdata["PROGLANGUAGE"][0] in ["Python", "Python2"]: 135 if self.project.pdata["PROGLANGUAGE"] in ["Python", "Python2"]:
137 debugClient = os.path.join( 136 debugClient = os.path.join(
138 getConfig('ericDir'), 137 getConfig('ericDir'),
139 "DebugClients", "Python", "DebugClient.py") 138 "DebugClients", "Python", "DebugClient.py")
140 elif self.project.pdata["PROGLANGUAGE"][0] == "Python3": 139 elif self.project.pdata["PROGLANGUAGE"] == "Python3":
141 debugClient = os.path.join( 140 debugClient = os.path.join(
142 getConfig('ericDir'), 141 getConfig('ericDir'),
143 "DebugClients", "Python3", "DebugClient.py") 142 "DebugClients", "Python3", "DebugClient.py")
144 elif self.project.pdata["PROGLANGUAGE"][0] == "Ruby": 143 elif self.project.pdata["PROGLANGUAGE"] == "Ruby":
145 debugClient = os.path.join( 144 debugClient = os.path.join(
146 getConfig('ericDir'), 145 getConfig('ericDir'),
147 "DebugClients", "Ruby", "DebugClient.rb") 146 "DebugClients", "Ruby", "DebugClient.rb")
148 else: 147 else:
149 debugClient = "" 148 debugClient = ""

eric ide

mercurial