Filter rules - Bookmark based


As described in Dynamic Link Manager filter rules, filters can refer to the source code from where the link is going (i.e. the bookmark) using a Regular Expression string:

  • <leftStringFromCode regexp="string"/> - the text before the link, from the first column of the same line
  • <rightStringFromCode regexp="string"/> - the text after the link, to the last column of the same line
  • <rawStringFromCode regexp="string"/> - the whole text, including the left part and the right part

This can be explained using the following image:

Tab setting

The default tab setting value is set to 4 and this cannot be modified. For programming languages that work with a different tab setting value, the filters leftStringFromCode and rightStringFromCode may NOT work correctly. In this case, as a workaround, CAST suggests using only rawStringFromCode, which is not tab sensitive.

Example

Take the following code:

This would give the following:

  • Left string: + " in module/impl/application/
  • Right string: ");
  • Raw string: + " in module/impl/application/currencies");
  • CalleeName: currencies
See Also

Dynamic Link Manager filter rules


CAST Website