Tapatalk

Almost empty function list for C++ .h file

Almost empty function list for C++ .h file

1
NewbieNewbie
1

    Apr 30, 2006#1

    The function list for my .cpp files correctly shows all the functions. However the associated .h file shows only a void function. Is there a way to modify the function string to correctly list the function names in the function list for my .h files?

    I'm sure I could spend the rest of the afternoon figuring this out but I was hoping someone already had the solution and could just post the correct function string.

    6,685587
    Grand MasterGrand Master
    6,685587

      May 01, 2006#2

      Well, the function list should not show anything for a .h file because in a .h file only function declarations (function prototypes) should exist and no function definitions. If you see in the function list for a .h file something other than the UltraEdit text "No Functions!", you have a wrong function declaration in your .h file.

      If you open the standard wordfile.txt in the UltraEdit program directory you will see at top of this file the syntax highlighting language definition for "C/C++". You see also 6 Function String regular expressions. If you take a closer look at these regex strings, you will see that all have the same ending: [~;]. This regex means that after the closing ) bracket no semicolon should exist. If there is a ; after the ), this is not a function definition because it is either a function declaration (in .h files) or a function call (in .cpp files).

      You could remove the [~;] from all regex strings to see the function names also for .h files, but then UltraEdit will also find function calls and list it in the function list. And I'm sure, you don't want that.

      Not tested! You could insert a space between the ) and the ; at every function declaration in the .h files. This dirty trick is valid for C/C++ and UE will find the functions in .h files too.
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

        May 01, 2006#3

        Mofi,

        Is the Function List working in version 12.00a?

        I opened a ".c" file and see no functions in the function list window.

        I recall it working in version 12, but all I see with version 12.00a is a blank function list window.

        Joe

          May 02, 2006#4

          I've discovered the issue with the Function List and it affects version 12.00+4 and 12.00a.

          If you have "Unix style Regular Expressions" enabled in configuration, you'll get a blank function list.

          I've e-mailed IDM because I don't think this is intended behavior. The workaround is to enable UltraEdit style Regular Expressions.

          Joe

          206
          MasterMaster
          206

            May 02, 2006#5

            Using 12.00a.

            Once you have the function list showing with UE regex active, you can switch to Unix regex and the list appears to stay visible.
            Software For Metalworking
            http://closetolerancesoftware.com

            4
            NewbieNewbie
            4

              May 02, 2006#6

              mrainey56,

              I noticed that too.

              It looks like if you startup UltraEdit with Unix Style enabled, it doesn't work. Even switching back to UltraEdit style won't bring the list back until you restart UltraEdit.

              Joe

              6,685587
              Grand MasterGrand Master
              6,685587

                May 03, 2006#7

                Here is my email I sent on April, 30th to IDM support about the problems I still can see with v12.00a of UE. I have not looked at the function list during my big regex setting test. Thanks to jdhagen and mrainex56 to point out this too.

                I have to report 3 problems with the setting for regular expression which still exist with UltraEdit v12.00a at Win98 and most probably also at WinXP (not tested).


                1) Switching from UltraEdit to legacy Unix style and reverse
                Switching from the UltraEdit to the Unix style in the configuration dialog makes the Unix engine not immediately active. I have to

                -) either close UltraEdit and start it again or
                -) open again the configuration dialog - Regular Search Engine page is already selected - and close the dialog with button OK without doing anything in the configuration dialog.

                This is needed when switching from

                UltraEdit to Unix
                Unix to UltraEdit
                turn off Perl engine and at the same time also change the legacy style.

                This should be fixed with the next release because it could be very confusing for the users. A change of the legacy regexp style should be always immediatelly active without restarting UltraEdit or reopening and closing the configuration dialog.
                Edit 2006-05-09: The quoted part is fixed with hotfix 12.00a+1.

                When enabling the Perl engine in the configuration dialog, it will be immediately active for the next regular find via the find/replace dialogs. But it is not active for recording a macro. For example I switch in the configuration dialog from UltraEdit style to Perl style, close the dialog with OK and immediately quick record a macro. The recorded macro code contains at line 4 the command UnixReOff instead of PerlReOn. If a regular expression search would be executed via the find dialog after closing the configuration dialog with OK and before recording a macro, the Perl engine is also active for the macro environment and PerlReOn is recorded.

                Edit 2006-05-13: The problem described above is also fixed in UES v5.50 Beta 2. So it will also not exist anymore in next release of UE (current version is 12.00a+1).


                2) Perl engine not active for macros after start of UE

                If the Perl engine is selected in the configuration dialog, it is also always immediately active after starting of UltraEdit, but only for the find/replace dialogs, not for the macro environment. Recording a macro after start of UltraEdit, the command PerlReOn is recorded - fine. But using a Perl regexp find in a macro after starting UltraEdit with Perl engine enabled is not working until once the macro command PerlReOn is used after starting UltraEdit.

                Well, normally a macro which uses regexp finds and replaces should always contain the appropriate command for specifying the engine needed for the regexp finds of this macro. And in my macros I always have the search engine selecting command at top of the macro. But it is a little bit mysterious why the Perl engine is active for the find/replace dialogs after start of UE, but not for the macro environment where the UltraEdit search engine is active until the macro command PerlReOn is used.


                3) Different configuration results when switching the style with the macro commands UnixReOff, UnixReOn and PerlReOn

                If macro command UnixReOff or UnixReOn is used in a macro and the Perl engine is not set in the configuration dialog, these 2 macro commands switches also the engine permanently as it is also visible in the configuration dialog now with v12.00a. So these 2 macro commands acts like in UE prior v12.00. After switching the engine with the macro commands, the new engine is also active for the find/replace dialogs.

                But if the Perl engine is set in the configuration dialog and also active, UnixReOff/UnixReOn changes the regexp engine only for the macro environment. The Perl engine in the configuration is still enabled and the find/replace dialogs still use the Perl engine, but for all macros executed after UnixReOff/UnixReOn, the appropriate legacy regexp engine is active until again a search engine setting macro command is used.

                A similar problem with PerlReOn, which enables the Perl engine for the macro environment for the current macro and all other macro executions, but not for the find/replace dialogs or the saved configuration.

                This handling of the engine setting by the macro commands UnixReOff, UnixReOn and PerlReOn is extremly confusing. Although I always wanted and also requested in the past that UnixReOff/UnixReOn enables the engine for the CURRENT macro execution only and not permanently (or UE/UES offers additional macro commands to save and restore the environment), this behaviour of the engines by the 2 macro commands is mysterious for the users.

                  May 09, 2006#8

                  mrainey56 wrote:Using 12.00a.

                  Once you have the function list showing with UE regex active, you can switch to Unix regex and the list appears to stay visible.
                  jdhagen wrote:It looks like if you startup UltraEdit with Unix Style enabled, it doesn't work. Even switching back to UltraEdit style won't bring the list back until you restart UltraEdit.
                  It looks like this problem is fixed with hotfix v12.00a+1 available via ftp download since 2006-05-03.
                  Best regards from an UC/UE/UES for Windows user from Austria