Function List - Multiple Levels

Syntax highlighting, code folding, brace matching, code indenting, and function list

Function List - Multiple Levels

Postby peteb » Wed Aug 18, 2010 1:04 pm

I've just updated to 10.10.0.1012 and am keen to use multiple levels in the Function List.
I unchecked flat list and in Configuration added something along the lines of:
Groups
....My Code
........Procedures
........Functions
....Messages
The Messages were displayed but not the Procedures or Functions.

If I change the Configuration to:
Groups
....Procedures
....Functions
....Messages
The Procedures and Functions are displayed.

I don't get any +/- to expand/compress the tree nodes.

Anyone know what I'm missing?

As an aside I find the Help pretty useless, is the a more detailed Help file that I can download.
peteb
Newbie
 
Posts: 3
Joined: Mon Apr 26, 2010 6:55 am

Re: Function List - Multiple Levels

Postby Mofi » Thu Aug 19, 2010 12:14 am

For what type of files do you use the function list (HTML, PHP, JAVA, C/C++)? Which wordfile is used containing the regular expressions to find the strings displayed in the function list? Or do you have setting Use Function Tips data (if available) for Function List checked at Advanced - Configuration - IDE - Function Tips?

peteb wrote:Is the a more detailed help file that I can download?

I agree that the explanation how to setup grouped function strings is not the best. But in each field on right side of the configuration dialog regular expression search strings must be entered. There are two regexp engines available, the UltraEdit engine used by default and the Perl compatible engine which is used when adding manually to the wordfile the line

/Regexp Type = Perl

for example below the first line in a wordfile.

There is a help page explaining the special characters of the UltraEdit regexp engine and a second one explaining the most needed subset of Perl special characters. For full documentation of the Perl regexp other pages on WWW must be read, see readme announcement of the Find/Replace/Regular Expressions forum which contains a list for good websites explaining the Perl regular expression syntax.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Function List - Multiple Levels

Postby peteb » Mon Aug 23, 2010 7:39 am

Thanks Mofi for your reply

I use a local wordfile.uew file so I can sync it easily between my laptop and desktop.

If I use the Configuration Tools and create a 2 nested list it updates my wordfile to:

/L20"Progress" Nocase NestBlockComments Escape Char = ~ Block Comment On Alt = /* Block Comment Off Alt = */ File Extensions = p i w bat cls
/TGBegin "Procedure Group"
/TGBegin "Procedure"
/TGFindStr = "%*PROCEDURE ^(*^):$"
/TGEnd
/TGEnd

and does not display any PROCEDUREs in the FUNCTION List.

If I use the Configuration Tools and create a single nested list it updates my wordfile to:

/L20"Progress" Nocase NestBlockComments Escape Char = ~ Block Comment On Alt = /* Block Comment Off Alt = */ File Extensions = p i w bat cls
/TGBegin "Procedure"
/TGFindStr = "%*PROCEDURE ^(*^):$"
/TGEnd

and does display all the PROCEDUREs in the FUNCTION List.
peteb
Newbie
 
Posts: 3
Joined: Mon Apr 26, 2010 6:55 am

Re: Function List - Multiple Levels

Postby Mofi » Mon Aug 23, 2010 10:14 am

Ah, now I understand your problem. You wanted to create a group which contains only subgroups and no regular expression strings. Sorry, but that is not possible.

A group like Procedure Group must have 1 or more regular expression strings to find something. When there are no regular expressions defined in a "root" group or nothing found by these expressions, all the searches defined by the regular expressions of all subgroups are not executed at all.

The regular expression strings defined for a subgroup are executed only from the line found by one of the regular expressions of the parent group to bottom of file. (Better would be to next line found with the regular expression strings of the parent group, but that is currently (UE v16.10.0.1036) not the case.)

For a subgroup UltraEdit first runs a regular expression search with the string defined for Open Tag starting from the line found before with the parent regular expression string. When a string is found, it searches again for the regular expression string defined with Close Tag to explain it simple. In real it is a bit more difficult because nesting of the tags is taken into account, required for example for C/C++ when local variables should be found also inside a nested block defined by { ... }. Inside this block the regular expression search of the subgroup is executed.

A good example to understand that behavior is following useless C++ function:

Code: Select all
void int myclass::foo (int iVar1, long lVar2)
{
 int iLocalVar;

 if((long)iVar1 * 16 == lVar2)
 {
  iLocalVar = iVar1 >> 2;
 }
 else
 {
  int iTempVar;
  iTempVar = (int)(lVar2 >> 16);
  iLocalVar = iTempvar + iVar1;
 }
}


The function list shows with standard c_cplusplus.uew for this function:

function_list.png
Function list view for the small useless C++ function.
function_list.png (683 Bytes) Viewed 1716 times
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Function List - Multiple Levels

Postby peteb » Tue Aug 24, 2010 3:20 am

Thanks Mofi, explains everything!
peteb
Newbie
 
Posts: 3
Joined: Mon Apr 26, 2010 6:55 am


Return to Syntax Highlighting