Grouped function list search limits in UE v16.20

Grouped function list search limits in UE v16.20

27
Basic UserBasic User
27

    Oct 29, 2010#1

    Hello,
    I want to extend the usage from the function list.

    My result is to have this:
    Result.png (65.38KiB)

    I have this .UEW:
    eclipse.zip (10.9 KiB)   211
    eclipse.uew

    And here is the example file:
    Example.zip (1.7 KiB)   226
    Example.DATA


    In other words, I want to limit the search for Keywords

    Code: Select all

    /TGBegin "Keyword"
    /TGFindStr = "^[ \t]*(\u+)\>(?<!\<EDIT)(?<!\<GRID)(?<!\<OPTIMIZE)(?<!\<PROPS)(?<!\<REGIONS)(?<!\<RUNSPEC)(?<!\<SCHEDULE)(?<!\<SOLUTION)(?<!\<SUMMARY)"
    /TGEnd
    To start and finish on the Section.

    Keywords are almost any word wich is written in uppercase.
    Section are only this words:
    GRID
    EDIT END
    PROPS
    REGIONS RUNSPEC
    SCHEDULE SOLUTION SUMMARY
    OPTIMIZE

    Any ideas how to limit the search in a Perl expression?

    Thanks!
    UltraEdit 16.30.0.1003
    UltraCompare Professional 7.20.0.1009
    Windows Vista Enterprise, 64 bits, Spanish

    6,686585
    Grand MasterGrand Master
    6,686585

      Oct 29, 2010#2

      Sorry, but I think what you want is not possible with UltraEdit v16.20.0.1011 because of following reasons:
      • You can define function groups with the names Section, Dates, RUNSPEC, GRID, etc. But the group name is not a search string expression for finding the start of a block. It would be possible to define a group with name Sections which finds the blocks EDIT, END, GRID, OPTIMIZE, PROPS, REGIONS, RUNSPEC, SCHEDULE, SOLUTION, SUMMARY. However, even with the blocks listed in group Sections and therefore having the first requirement fulfilled, there are further problems for your list.
      • UltraEdit is supporting currently Perl regular expressions on top level. The open and close tags and the regular expression strings in second and lower levels must be UltraEdit regular expressions. I don't know if any user has this issue already reported to IDM or not. I think the first time documented was it in forum topic Subgroups in function list using Perl regular expressions. I don't have a problem with this for my own syntax highlighting languages and therefore did not report this issue. When no other user reported it, IDM perhaps even don't know that the Perl engine is not used for the regular expression strings in subgroups and the open/close tag strings.
      • With only the UltraEdit regular expression engine there is the problem that a case sensitive search is not possible. Only the Perl engine has modifiers for changing the case sensitivity in the search string itself.
      • With only the UltraEdit regular expression engine it is not possible to add more than 2 strings into an OR expression, but we would need definitely an OR expression with more than 2 strings.
      • But even when the Perl engine could be used for the open/close tags and the regular expressions in the subgroups the last problem is that UltraEdit currently does not support block definitions like in your file where a block ends where next block starts. The grouped function list feature currently requires that an open and a close tag (regular expression string) defines where the content of a (function) block starts and where this block ends, a requirement which is no problem for languages like C, C++, C#, Javascript. UltraEdit is smart enough to take nesting of those open/close tags into account because those programming languages require it. But the grouped function list feature mainly designed for programming languages with a good structure can't be easily applied to other file types where a block is not defined with an open and close tag. It would be currently necessary to help UltraEdit with marker strings in comments to mark begin and end of a block which most users don't accept. "Why should I add additional information to MY files or use a restricted subset of the rules supported by the syntax of MY files to help the editor to show me the informations I would like to see? The editor should be coded to highlight MY files like I want it and to show me the information I want to see according to MY rules!" Sure, a legitimate wish from a users point of view, but a requirement which can't be fulfilled by any programmer for any general text editor. Such a requirement can be fulfilled only by a text editor written for editing only the type of file such a user edits.
      You can and should report by email to IDM that /Regexp Type = Perl is not also used for the open/close tag expressions and for the regular expressions for subgroups.

      And you can suggest a feature request for an option like First level function strings define blocks which when enabled should result in splitting a file into blocks according to following rules:
      • The line below the line(s) a string is found with an expression of a top level function string group is the first line of this function block.
      • The line above the (first) line a string is found with an expression of a top level function string group is the last line of the previous function block if there is one.
      • The end of the file is the end of the last function block if any top level function string is found.
      • All lines from top of the file to first found top level function string do not belong to a block.
      It would be good to have this option for every top level group because in your case the group Sections would make use of this option, but the group Dates would not make use of it. Of course with multiple top level function groups the user would need to be careful with the function definitions and with usage of that option to avoid overlapping blocks for subgroup function string searches.
      Best regards from an UC/UE/UES for Windows user from Austria

      27
      Basic UserBasic User
      27

        Oct 30, 2010#3

        So... I have no luck.
        Today is not my day.

        I'll do your recomendation and send my suggestion to the guys at IDM.

        Mofi, as usual, thanks!
        UltraEdit 16.30.0.1003
        UltraCompare Professional 7.20.0.1009
        Windows Vista Enterprise, 64 bits, Spanish

        6,686585
        Grand MasterGrand Master
        6,686585

          Jun 02, 2013#4

          There is now full Perl regular expression support for tree-style function list with UE v19.10 / UES v13.10.

          So with the line

          /Regexp Type = Perl

          the Perl regular expression engine is set not only for the top level regular expression function strings as in previous versions of UltraEdit / UEStudio with a grouped function string definition, but also for the start and end search strings (/TGFindBStart, /TGFindBEnd) and the regular expression function strings in subgroups.

          This makes it possible to use the much more powerful Perl regular expression engine for all regular expressions used for finding strings for a tree-style function list view.

          Wordfiles containing tree-style function definitions with mixed regular expressions in Perl and UltraEdit syntax, as it was necessary to define with UE prior V19.10 and prior UES v13.10 if Perl regular expression function strings were needed at least for the top level function strings, must be rewritten after an upgrade so that all function strings use Perl syntax.