33 from EricUtilities.EricCache import EricCache |
33 from EricUtilities.EricCache import EricCache |
34 |
34 |
35 from .QsciScintillaCompat import QsciScintillaCompat |
35 from .QsciScintillaCompat import QsciScintillaCompat |
36 from .EditorMarkerMap import EditorMarkerMap |
36 from .EditorMarkerMap import EditorMarkerMap |
37 from .SpellChecker import SpellChecker |
37 from .SpellChecker import SpellChecker |
|
38 |
|
39 from Globals import recentNameBreakpointConditions |
38 |
40 |
39 import Preferences |
41 import Preferences |
40 import Utilities |
42 import Utilities |
41 from Utilities import MouseUtilities |
43 from Utilities import MouseUtilities |
42 |
44 |
236 self.lexer_ = None |
238 self.lexer_ = None |
237 self.apiLanguage = '' |
239 self.apiLanguage = '' |
238 |
240 |
239 self.__loadEditorConfig() |
241 self.__loadEditorConfig() |
240 |
242 |
241 self.condHistory = [] |
|
242 self.__lexerReset = False |
243 self.__lexerReset = False |
243 self.completer = None |
244 self.completer = None |
244 self.encoding = self.__getEditorConfig("DefaultEncoding") |
245 self.encoding = self.__getEditorConfig("DefaultEncoding") |
245 self.lastModified = 0 |
246 self.lastModified = 0 |
246 self.line = -1 |
247 self.line = -1 |
2515 index = self.breakpointModel.getBreakPointIndex(self.fileName, |
2516 index = self.breakpointModel.getBreakPointIndex(self.fileName, |
2516 ln) |
2517 ln) |
2517 if not index.isValid(): |
2518 if not index.isValid(): |
2518 return |
2519 return |
2519 |
2520 |
|
2521 # get recently used breakpoint conditions |
|
2522 rs = Preferences.Prefs.rsettings.value( |
|
2523 recentNameBreakpointConditions) |
|
2524 condHistory = ( |
|
2525 Preferences.toList(rs)[ |
|
2526 :Preferences.getDebugger("RecentNumber")] |
|
2527 if rs is not None else |
|
2528 [] |
|
2529 ) |
|
2530 |
2520 from Debugger.EditBreakpointDialog import EditBreakpointDialog |
2531 from Debugger.EditBreakpointDialog import EditBreakpointDialog |
2521 dlg = EditBreakpointDialog( |
2532 dlg = EditBreakpointDialog( |
2522 (self.fileName, ln), |
2533 (self.fileName, ln), |
2523 (cond, temp, enabled, ignorecount), |
2534 (cond, temp, enabled, ignorecount), |
2524 self.condHistory, self, modal=True) |
2535 condHistory, self, modal=True) |
2525 if dlg.exec() == QDialog.DialogCode.Accepted: |
2536 if dlg.exec() == QDialog.DialogCode.Accepted: |
2526 cond, temp, enabled, ignorecount = dlg.getData() |
2537 cond, temp, enabled, ignorecount = dlg.getData() |
2527 self.breakpointModel.setBreakPointByIndex( |
2538 self.breakpointModel.setBreakPointByIndex( |
2528 index, self.fileName, ln, |
2539 index, self.fileName, ln, |
2529 (cond, temp, enabled, ignorecount)) |
2540 (cond, temp, enabled, ignorecount)) |
|
2541 |
|
2542 if cond: |
|
2543 # save the recently used breakpoint condition |
|
2544 if cond in condHistory: |
|
2545 condHistory.remove(cond) |
|
2546 condHistory.insert(0, cond) |
|
2547 Preferences.Prefs.rsettings.setValue( |
|
2548 recentNameBreakpointConditions, condHistory) |
|
2549 Preferences.Prefs.rsettings.sync() |
|
2550 |
2530 break |
2551 break |
2531 |
2552 |
2532 self.line = -1 |
2553 self.line = -1 |
2533 |
2554 |
2534 def menuNextBreakpoint(self): |
2555 def menuNextBreakpoint(self): |