Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Codemarks plugin

Plugins
2005-08-08
2013-04-26
  • updated Codemarks to 0.0.6.
    (Bug fix Release)
    - updated plugin for DrPython 3.10.3
        (thanks to Laszlo Zsolt Nagy for bug report)
    possible extensions:
    - open close codemarks: Save the codemarks
      (now, after reopening, panel is empty)
    - sort after linenumbers
    - possibility to remove bookmarks

     
    • Ok now I have 0.0.6 and shortcuts configured. I can open the source browser or another file in a panel but nothing happens when I press CTRL+0 or CTRL+1 (my shortcut to add/show code marks). I bet this is my fault. Please help me out.

       
    • The menus are working (Add Codemark, Show Codemark)?

      I tried out.

      There must be a bug (I think, I myself reported it some time ago).
      The update shortcut doesn't work.
      I assigned these 2 shortcuts, update, save them => exit =>
      restart, then they work.
      Anyway Better would be Toggle Codemarks and save
      the codemarks, as to show and close them (only with the close button now).
      A "Remove Codemark" function is also missing.
      As I'm not the author of this plugin, I don't want
      to change it completly.
      Anyway in line 126, you can add the title, so in the
      notebook tab, the "codemark" appears.

      target, i = DrFrame.mainpanel.GetTargetNotebookPage(DrFrame.CodemarksPanelPositon, 'CodeMarks')

       
    • Ok, you are right. I'll keep in mind that after changing a setting in DrPython I need to restart it. However, it is not what I would expect. The CodeMarks plugin is so easy to understand even from the source. Maybe I'll write my own with delete function. :-)

        Les

       
    • You could report a bug (the "not" updating of the shortcuts (without restarting))

      Do you provide the code, if you are changing the
      shortcut? :)
      Or if you have other ideas?
      Toggle would be also nice (same as Toggle Sourcebrowser).
      Would it make sense to add a plugin option:
      Sort after linenumber?
      (Option=>plugin preferences)

      Anyway I changed the last lines
      (To display the shortcuts in the menu):
          ID_SHOW_CODEMARKS = DrFrame.GetNewId()
          ID_ADD_CODEMARK = DrFrame.GetNewId()

          DrFrame.Bind(wx.EVT_MENU, OnShowCodemarks, id=ID_SHOW_CODEMARKS)
          DrFrame.Bind(wx.EVT_MENU, OnAddCodemark, id=ID_ADD_CODEMARK)

          DrFrame.AddPluginFunction("Codemarks", "Show Codemarks", OnShowCodemarks)
          DrFrame.AddPluginFunction("Codemarks", "Add Codemark", OnAddCodemark)
         
          DrFrame.AddPluginPopUpMenuFunction("Codemarks", "Show Codemarks", OnShowCodemarks)
          DrFrame.AddPluginPopUpMenuFunction("Codemarks", "Add Codemark", OnAddCodemark)
         
          DrFrame.LoadPluginShortcuts('Codemarks')
         
          DrFrame.viewmenu.AppendSeparator()
          DrFrame.viewmenu.Append(ID_SHOW_CODEMARKS, DrFrame.GetPluginMenuLabel("Codemarks", "Show Codemarks", "Show Codemarks"))
          DrFrame.viewmenu.Append(ID_ADD_CODEMARK, DrFrame.GetPluginMenuLabel("Codemarks", "Add Codemark", "Add Codemark"))