How to get IF conditions in C source code files not listed in the function list view?

How to get IF conditions in C source code files not listed in the function list view?

1
NewbieNewbie
1

    14:31 - Feb 29#1

    Hello!

    I'm new of UE. I write code in C. When I write:

    Code: Select all

    #ifdef ABC
    if (var1 == 1)
        {
        var2 = 0;
        }
    #endif
    
    I get a "function" in function list (tagged with "if").
    Immagine.png (7.45KiB)

    I see in my c_cplusplus.uew file: 

    Code: Select all

    /TGFindStr = "(?!if|else|while)(?:\w+\s+)*(\w+)\s*\((?:[^{;}]*)\)[\t\r\n]*\{"
    How can I remove this kind of expression from the function list?

    Thanks,
    m20

    6,612548
    Grand MasterGrand Master
    6,612548

      18:34 - Feb 29#2

      The wordfiles really used are those in the directory %APPDATA%\IDMComp\UltraEdit\wordfiles respectively in the directory displayed at top at Advanced - Settings or Configuration - Editor display - Syntax highlighting. This configuration dialog has also the button Open right to the list item for selecting an installed wordfile like C/C++ for editing a wordfile directly in UltraEdit.

      The regular expressions for finding strings to list in the Function list can be edited by opening Advanced - Settings or Configuration - Function list, selecting a language and clicking on button Modify groups. The same configuration window can be opened by right clicking into the Function list for opening the context menu and clicking on last context menu item Configuration.

      However, the posted regular expression is not the cause for the if condition displayed in the function list view. The Perl regular expression (?!if|else|while) is a negative lookahead checking if the string matched next is neither if nor else nor while. I don't see if in the function list using c_cplusplus.uew as installed with UltraEdit for Windows v2023.2.0.33.

      I suppose that in your case the items in the function list view are not from the Perl regular expressions in the syntax highlighting wordfile.

      There is enabled most likely IntellliTips and your *.c source code files are parsed by the integrated symbol parser. I recommend opening Advanced - Settings or Configuration - Auto-complete - IntelliTips - Advanced on look on the settings. Is the setting Enable IntelliTips checked? Go to next configuration window Function tips and look if Use function tips data (if available) for function list is checked or not. Last go to next configuration window Parser and look if Parse non-project files is checked or not. I enabled all three settings but the IF condition of the small posted code snippet is nevertheless not listed in the Function list view of UltraEdit for Windows v2023.2.0.33.

      I cannot reproduce your problem with the false positive listing of if in the Function list with neither the default configuration of UltraEdit for Windows v2023.2.0.33 nor with using IntelliTips which I use in general for C/C++ code writing as being very helpful for efficient C/C++ code writing.
      Best regards from an UC/UE/UES for Windows user from Austria