Categories


Popular topics

(Created page with "The '''Modify groups''' dialog allows you to define regular expressions that provide grouped, hierarchical listing of items in the function list on a per-language basis. T...")
 
(No difference)

Latest revision as of 14:47, 26 October 2017

The Modify groups dialog allows you to define regular expressions that provide grouped, hierarchical listing of items in the function list on a per-language basis. The coding languages supported here are based on the installed wordfiles for syntax highlighting.

This dialog includes the following components.

"Define group parsing rules for" drop down
This drop down contains the list of installed syntax highlighting languages. The drop down will default to the syntax highlighting type of the active file. You can select any language from this drop down to modify its regular expressions.

Group text box
You can use this text box to name and create new groups. After you've typed a name for the new group, click Add to add it to the hierarchical tree. If an existing item in the tree is selected, clicking Add will add the new group as a sub-group of the selected item.

Existing groups
The "Existing groups" tree control allows you to see all existing groups and sub-groups and the hierarchy of how they will be displayed in the function list. From here you can rename, reorder, and delete groups. Delete an existing group by selecting it and clicking Delete above. You can rename an existing group by slowly double-clicking it to make it editable. You can move groups up and down using the Move up and Move down buttons.

"Define regular expressions for selected group" list box
When a group is selected in the "Existing groups" tree control, the regular expression(s) associated with that group is shown in this list box. You can define multiple regular expressions for each group, but keep in mind that more regular expressions will affect the time required to scan and parse files.

When defining regular expressions for function list groups, the following rules apply:

  • UltraEdit (legacy) style regular expressions should be used unless the wordfile includes the /Regexp Type = Perl flag, in which case Perl regular expressions should be used. (Perl regular expressions are recommended.)
  • The portion of the regular expression that matches the name / text that should be shown in the function list should be tagged using the appropriate tagging / backreference syntax for the regular expression type used.
  • Top-level groups do not need to have a scope defined, and this area of the regular expression row can be left empty for these.
  • Sub-groups do require a scope definition. The scope can be a regular expression, and it should match the opening and closing portion of the parent group in which the sub-group string appears.

For example, to match parameters in a function definition, you could use the following sub-group definition:

Regular expression Open tag Close tag
[ \t\r\n]++([^,]+) \( \)

This would specify that within a matched function, the editor will search for strings surrounded by "(" and ")" and test for matches of the specified expression between these points.

As another example, to match variables within the function body, you could use:

Regular expression Open tag Close tag
^[ \t]+([\w\d]+[ \t\*]+[\w\d\[\]_]+.*;) \{ \}

You can use the Add button to make the next empty field in the regular expressions list box editable and add a new regular expression. You can modify existing expressions by slowly double-clicking it to make it editable, or by selecting it and clicking the Modify button. You can delete existing expressions by clicking the Delete button.

MediaWiki spam blocked by CleanTalk.