You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This refactoring is required to enable setting/clearing breakpoints, using linenumbering( whether using a Canvas implementation or a Text implementation http://bugs.python.org/issue17535)
The patch ensures consistency between the set_breakpoint(_here) and
clear_breakpoint(_here) methods. The clear_breakpoint_here, which is not present currently has been added.
No functionality has been added or removed, so I think it should be safe to go forward.
The _here methods are the event handlers for the right click context menu options. Set_breakpoint, as a separate method, is only needed in the restore_file_breaks (from breakpoint file) method. I gather that you are thinking of using set/clear_breakpoint when a line number is clicked.
You have elsewhere suggested a different refactoring - replacing set and clear with toggle. That seems plausible as a good idea. If text will have no breakpoints set after
self.text.update() # this enables setting "BREAK" tags to be visible
in restore_file_breaks(), there would be no problem. If not, toggle would need a force_set option. We need to know when the circumstances of when restore_file_breaks is called.
The bell is both undependable and uniformative. If breakpoints are not allowed for unnamed files, the context menu items should be grayed out (if possible, as done, for instance, for 'cut' when there is no selectionj). If a line numbers is clicked for unnamed, we should display a message box explaining.
Activity
SaimadhavHeblikar commentedon Jul 26, 2014
This refactoring is required to enable setting/clearing breakpoints, using linenumbering( whether using a Canvas implementation or a Text implementation http://bugs.python.org/issue17535)
The patch ensures consistency between the set_breakpoint(_here) and
clear_breakpoint(_here) methods. The clear_breakpoint_here, which is not present currently has been added.
No functionality has been added or removed, so I think it should be safe to go forward.
terryjreedy commentedon Aug 6, 2014
The _here methods are the event handlers for the right click context menu options. Set_breakpoint, as a separate method, is only needed in the restore_file_breaks (from breakpoint file) method. I gather that you are thinking of using set/clear_breakpoint when a line number is clicked.
You have elsewhere suggested a different refactoring - replacing set and clear with toggle. That seems plausible as a good idea. If text will have no breakpoints set after
self.text.update() # this enables setting "BREAK" tags to be visible
in restore_file_breaks(), there would be no problem. If not, toggle would need a force_set option. We need to know when the circumstances of when restore_file_breaks is called.
The bell is both undependable and uniformative. If breakpoints are not allowed for unnamed files, the context menu items should be grayed out (if possible, as done, for instance, for 'cut' when there is no selectionj). If a line numbers is clicked for unnamed, we should display a message box explaining.
SaimadhavHeblikar commentedon Aug 11, 2014
This patch does two things
As in pyshell-breakpoint-refactor.diff, the set/clear(_here) breakpoint methods are refactored into logical methods.
[-]Refactor PyShell's breakpoint related methods[/-][+]IDLE: Refactor breakpoint related methods[/+]