Skip to content

IDLE: Refactor breakpoint related methods #66281

Open

Description

@SaimadhavHeblikar
BPO 22083
Nosy @terryjreedy
Files
  • pyshell-breakpoint-refactor.diff
  • pyshell-breakpoint-refactor-v2.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2014-07-26.15:06:23.497>
    labels = ['expert-IDLE', 'type-feature', '3.9']
    title = 'IDLE: Refactor breakpoint related methods'
    updated_at = <Date 2019-09-19.18:18:00.349>
    user = 'https://bugs.python.org/SaimadhavHeblikar'

    bugs.python.org fields:

    activity = <Date 2019-09-19.18:18:00.349>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2014-07-26.15:06:23.497>
    creator = 'Saimadhav.Heblikar'
    dependencies = []
    files = ['36112', '36348']
    hgrepos = []
    issue_num = 22083
    keywords = ['patch']
    message_count = 3.0
    messages = ['224062', '224909', '225194']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'jesstess', 'Saimadhav.Heblikar']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue22083'
    versions = ['Python 3.9']

    Activity

    1. SaimadhavHeblikar commented on Jul 26, 2014

      SaimadhavHeblikarmannequin
      MannequinAuthor

      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.

    2. terryjreedy commented on Aug 6, 2014

      @terryjreedy
      Member

      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.

    3. SaimadhavHeblikar commented on Aug 11, 2014

      SaimadhavHeblikarmannequin
      MannequinAuthor

      This patch does two things

      1. Refactor pyshell-breakpoint-refactor.diff to reflect changes in pyshell-breakpoint-refactor.diff

      As in pyshell-breakpoint-refactor.diff, the set/clear(_here) breakpoint methods are refactored into logical methods.

      1. If the filename is not set, text.bell() is replaced with a dialog to prompt the user to save the file.
    4. changed the title [-]Refactor PyShell's breakpoint related methods[/-] [+]IDLE: Refactor breakpoint related methods[/+] on Sep 19, 2019
    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions