2563 scriptName = script |
2563 scriptName = script |
2564 elif self.lastDebuggedFile: |
2564 elif self.lastDebuggedFile: |
2565 scriptName = self.lastDebuggedFile |
2565 scriptName = self.lastDebuggedFile |
2566 else: |
2566 else: |
2567 scriptName = "" |
2567 scriptName = "" |
|
2568 if ( |
|
2569 scriptName |
|
2570 and FileSystemUtilities.isRemoteFileName(scriptName) |
|
2571 and not self.ui.isEricServerConnected() |
|
2572 ): |
|
2573 self.__showNotConnectedWarning(title=cap, name=scriptName) |
|
2574 return |
|
2575 |
2568 dlg = StartDialog( |
2576 dlg = StartDialog( |
2569 cap, |
2577 cap, |
2570 self.lastUsedVenvName, |
2578 self.lastUsedVenvName, |
2571 self.argvHistory, |
2579 self.argvHistory, |
2572 self.wdHistory, |
2580 self.wdHistory, |
2659 |
2667 |
2660 if ( |
2668 if ( |
2661 FileSystemUtilities.isRemoteFileName(fn) |
2669 FileSystemUtilities.isRemoteFileName(fn) |
2662 and not self.ui.isEricServerConnected() |
2670 and not self.ui.isEricServerConnected() |
2663 ): |
2671 ): |
2664 self.__showNotConnectedWarning(title=cap) |
2672 self.__showNotConnectedWarning(title=cap, name=fn) |
2665 return |
2673 return |
2666 |
2674 |
2667 # save the filename for use by the restart method |
2675 # save the filename for use by the restart method |
2668 self.lastDebuggedFile = fn |
2676 self.lastDebuggedFile = fn |
2669 self.restartAct.setEnabled(True) |
2677 self.restartAct.setEnabled(True) |
3203 @return string for the project environment |
3211 @return string for the project environment |
3204 @rtype str |
3212 @rtype str |
3205 """ |
3213 """ |
3206 return self.debugServer.getProjectEnvironmentString() |
3214 return self.debugServer.getProjectEnvironmentString() |
3207 |
3215 |
3208 def __showNotConnectedWarning(self, title): |
3216 def __showNotConnectedWarning(self, title, name=""): |
3209 """ |
3217 """ |
3210 Private method to show a warning about a not connected eric-ide server. |
3218 Private method to show a warning about a not connected eric-ide server. |
3211 |
3219 |
3212 @param title title for the dialog |
3220 @param title title for the dialog |
3213 @type str |
3221 @type str |
|
3222 @param name name of the file (defaults to "") |
|
3223 @type str (optional) |
3214 """ |
3224 """ |
3215 EricMessageBox.warning( |
3225 EricMessageBox.warning( |
3216 None, |
3226 None, |
3217 title, |
3227 title, |
3218 self.tr( |
3228 self.tr( |
3219 "<p>The selected file is located on an eric-ide server but no such" |
3229 "<p>The selected file <b>{0}</b> is located on an eric-ide server but" |
3220 " server is connected. Aborting...</p>" |
3230 " no such server is connected. Aborting...</p>" |
3221 ), |
3231 ).format(name), |
3222 ) |
3232 ) |