Detect code references


This feature helps finding orphan strings that are no longer used. If enabled it shows a new column beside the key, displaying the count of possible references to this key found in code. If you hover the mouse over the column, a tool tip shows the location and context of the detected reference.
The engine does not fully parse the source code, but is using a simple text look up algorithm searching for several patterns like ResourceFile.ResourceKey or ResourceFile->ResourceKey; it may also count references in commented code, or maybe other occurrences of any of the patterns, so even if a resources count is greater than zero it may not be used.
On the other hand it will not find indirect references like ResourceFile["ResourceKey"] or even ResourceFile["Resource" + "Key"]. So be aware that a count of zero is no guarantee that this resource is not used; e.g. resources of localized WinForms controls always have a count of zero!

The patterns the algorithm is looking for are configurable on the configuration tab:

Only patterns that appear on a single line are detected. Patterns that span more than one line are not detected.

Last edited Mar 22, 2015 at 2:34 PM by tomenglert, version 3


Jerior Aug 26, 2015 at 5:28 AM 
Would be nice to have a regular expression for aspx file within devExpress controls and their resources.
<dx:ASPxTextBox ID="TextBox" runat="server" meta:resourcekey="TextBoxResource1" Caption="Bla-bla-blah">
TextBoxResource1.Caption = Blah-Blah-Blah