Announcement

Collapse
No announcement yet.

FireFly 3 and Embedded Code Comments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • FireFly 3 and Embedded Code Comments

    I have built into the next version of FireFly Visual Designer the ability for the programmer to embed special comments into his code that will later display in a grid (sort of a way to track to-do items throughout the code base).

    I know that this idea is certainly not new, but I have never used it in other products such as Visual Studio. I would like to know if the way that I have it implemented is consistent with other products that have this functionality. Your comments are appreciated.

    Here is how I have it working:

    (1) The programmer inserts a special series of characters (prefaced by the comment character and two double forward slahes). For example:
    Code:
    '//TODO  Fix up the options for the popup men
    - or -

    Code:
    '//HACK  Optimize the payment searching algorithm.
    (2) FireFly parses the code and identifies the special tags (currently the only tags that are searched for are '//TODO and '//HACK.... are there others?)

    (3) When a special tag is found, FireFly saves the tag type (e.g. TODO, HACK), the description (e.g. Fix up the options...), the source file (e.g. modGeneral.inc), and the line number in the source file where the tag occurs.

    (4) The programmer selects "Project Notes/Tasks" where a popup dialog presents the user with a ListView showing each found tag.

    (5) The programmer can double-click on a Listview entry (or press ENTER) to close the popup dialog and then position itself at the point in the code editor where the special comment tag exists.

    Sound reasonable? Am I missing something else?

    Thanks!
    Paul Squires
    FireFly Visual Designer (for PowerBASIC Windows 10+)
    Version 3 now available.
    http://www.planetsquires.com

  • #2
    2)... the special tags (currently the only tags that are searched for are '//TODO and '//HACK.... are there others?)
    A "User Comment Tag Maintenance" function comes to mind.......each user builds his own list of "comment tag strings" and you look for those.

    (Hey, I don't have to code it, do I?)




    MCM
    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      One of my VB6 addons (CodeSMART) does what you are trying to do and all I have to type is 'TODO: and it puts it in my task list.

      Comment


      • #4
        >type is 'TODO: and it puts it in my task list...

        Good idea... when Paul does that "User Tag Maintenance" he can add a "what to do with these kinds of comments" field, too....eg, "put in task list", etc...

        (Now I'm really glad I don't have to code this.)

        MCM
        Michael Mattias
        Tal Systems Inc. (retired)
        Racine WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Hi Michael,

          The code that I've implemented is exactly as Sean describes. As source files are saved, it modifies a linked list of found "todo's" that get eventually get displayed in a task list. Double clicking the task in the task list takes you to the position in the code where the 'TODO: resides. It's a nice way to self-document your code for trouble areas and quickly be able to find them over time as your project grows.

          I guess that I could allow the user to define different types of tags other than 'TODO: or 'HACK: but in the end, the only action that I see is to add them to a task list. Do you envision the tag doing something more? If so, could you elaborate just a little on your idea? I'm not quite following.

          If you mean having the tag expand into something else once typed then I already have something like that in place. I call it 'Code Snippets' (real original, hey?) Basically, you can define code that will automagically get inserted into the code editor when the user types a user defined word. For example, you could have the WinMain function template as a snippet.... type the word WinMain and press Ctrl+Enter and then the word WinMain is replaced by the entire WinMain function/end function. Kind of neat - it's a real time saver.
          Paul Squires
          FireFly Visual Designer (for PowerBASIC Windows 10+)
          Version 3 now available.
          http://www.planetsquires.com

          Comment


          • #6
            Hi Paul,

            Are you using some kind of home-brew editor ? If so, have you considered in
            offering the editor as a dll ? I would surely take it into consideration for buying this since CodeMax 4.0 is not longer supported.

            Cheers
            Steven
            So here we are, this is the end.
            But all that dies, is born again.
            - From The Ashes (In This Moment)

            Comment


            • #7
              Hi Steven,

              I am using a modified version of EDM32 (Borje's gem). I modified it to handle code folding and other things such as line numbering and virtual line ends (with the help of friend Bruce Brown). I also greatly changed the keyword parser and screen painting. It still has its share of bugs but having an all PB code base certainly makes it much easier to do things that I need when integrating into FireFly.

              When FireFly 3 is out and things settle down then I'll be more than happy to pump out the editing DLL and even source code to whomever would like it.
              Paul Squires
              FireFly Visual Designer (for PowerBASIC Windows 10+)
              Version 3 now available.
              http://www.planetsquires.com

              Comment


              • #8
                What about a '//DOCU or '//DOCUMENTATION tag? Not sure what to make of it, though (well, I have ideas, but don't know how FireFly should handle/represent those).

                Another idea that justed pop up in my mind. Just spitting out my thought here, no idea if this is even remotly possible: What about making FF work with a source code documentation software? http://en.wikipedia.org/wiki/List_of...ion_generators

                Comment


                • #9
                  In my work, I use three action type comments that I can use Lynx to Find.
                  Code:
                  Tag Code Used:
                  '   @Fix     - Used for something isn't done or working well
                  '   @Wish    - Used to expand the capabilities or performance
                  '   @Help    - Used to get the Info in the Help file
                  When these are in place, Lynx easily generates a search list making the process finding the action items easy.

                  Having that be part of FireFly, would make FireFly even nicer.
                  Roger...

                  Comment


                  • #10
                    Thanks Roger, I like those additional options and will add them to the list that i already in place. (I will combine Knuth's 'DOCU with 'HELP).

                    'TODO:
                    'HACK:
                    'FIX:
                    'WISH:
                    'HELP:
                    Paul Squires
                    FireFly Visual Designer (for PowerBASIC Windows 10+)
                    Version 3 now available.
                    http://www.planetsquires.com

                    Comment


                    • #11
                      ...the only action that I see is to add them to a task list. Do you envision the tag doing
                      something more? If so, could you elaborate ..
                      I do the Big ideas.

                      Details are left to staff.
                      Michael Mattias
                      Tal Systems Inc. (retired)
                      Racine WI USA
                      [email protected]
                      http://www.talsystems.com

                      Comment


                      • #12
                        :d
                        Paul Squires
                        FireFly Visual Designer (for PowerBASIC Windows 10+)
                        Version 3 now available.
                        http://www.planetsquires.com

                        Comment

                        Working...
                        X