Tapatalk

Function List Updating

Function List Updating

4
NewbieNewbie
4

    Jan 08, 2009#1

    How can I make the Function List update every time I insert or delete a line in the Editor so that it would always be up to date (not only after pressing F8 or reloading)? I am using 14.20.1.1006 with my own language definition.

    6,685587
    Grand MasterGrand Master
    6,685587

      Jan 08, 2009#2

      That is simply not possible.
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

        Jan 09, 2009#3

        How can I request (wish) this from IDM? Have others had this concern too? I can't find anything in the forums.

        6,685587
        Grand MasterGrand Master
        6,685587

          Jan 09, 2009#4

          crusy wrote:How can I request (wish) this from IDM?
          See top of this page.
          crusy wrote:Have others had this concern too?
          I don't think so because the performance loss will be dramatically. To scan whole file with several complex regular expression searches every time a line is inserted/deleted would cause a significant delay when typing. And lines can be inserted/deleted not only by you with the keyboard, it can be also done with clipboard copy/cut/paste, replace (all) command, macros, scripts, tags, templates, HTML toolbar commands, ...

          UEStudio is an IDE specialized for writing programs and scripts. It's IDE configuration has an option to scan for functions every time a file is saved and updates the function list accordingly which makes more sense then update the function list on every line insertion/deletion.

          4
          NewbieNewbie
          4

            Jan 09, 2009#5

            I don't think the technical implementation is that difficult, but I'll leave that up to IDM. I don't think you would have to research the whole file every time a line is inserted or deleted, all you need to do is move the address of all the pointers in the function list to the file up or down by the number of lines being changed (for those functions after the lines being changed). We would still refresh the regular way if there is a new function or if one has been removed.

            What do you think, Mofi?
            Greetings from a neighbor in Switzerland.

            I'll send an email to IDM support with a link to this thread.

            6,685587
            Grand MasterGrand Master
            6,685587

              Jan 09, 2009#6

              Aha, you just want that UltraEdit updates the line numbers of the functions already present in the function list for the current file (and ignoring the other project files) depending on the line number of current cursor position and how many lines were inserted or deleted and not update the list of found function names. That would not cause a high performance loss, but is nevertheless not really simple to implement.

              A more easier method for updating the line numbers would be the method which I think is used by some IDEs. When a function in the function list is activated, the cursor is always set to the correct function definition line because the IDE in the background checks if this function name can be found on the remembered line (= 1st and fast test) and if not search whole file to find it on a new position (= 2nd test - fast for small files, problematic for large files with hundreds of MB) if the function name is still present in the file at all (last condition - use remembered line number if not found anymore). The line number of this function could then be updated too.

              The disadvantage of this method is that the feature which highlights the name of the function in the function list where the cursor is currently located will not really benefit on this "test and find on activation" method.

              However, ideas and suggestions are accepted always by IDM at all.

                Feb 02, 2009#7

                Hotfix info for UE v14.20.1.1008 contains the line:

                Function list now automatically updates

                and indeed the line number for every function in the function list is updated in the background when inserting/deleting lines with the keys RETURN, DEL or BACKSPACE, when cutting/pasting 1 or more lines, when inserting a multi-line template, when duplicating a line or delete an entire line, when undo/redo a multi-line modification, and maybe also when using other features which modify the line count.

                The line numbers of the functions in the function list are not updated when a replace is executed which changes the number of lines in the file. So in this case a manual update of the function list is still required.

                But I think you and many other users are very happy now, I too. That is a great enhancement hidden in a hotfix version. I can only recommend that all users of UE v14.xx using daily the function list should update to this version.
                Best regards from an UC/UE/UES for Windows user from Austria

                4
                NewbieNewbie
                4

                  Mar 12, 2009#8

                  Its a pity I only just today noticed the fix!

                  By the way of interest, when I sent my message to support I tried this in V11.20a and there it had already worked. So it must have been broken since V11.20a. We only just updated to V14.20 because of Vista :roll: :wink: and then noticed the missing of this functionality.

                  Well the three of us working with UE here are happy campers again!