Once you obtained an instance of a class, structure or an interface, for example, by using the DXCore SourceModel service:
CodeRush.Source.ActiveClass
CodeRush.Source.ActiveClassInterfaceOrStruct
CodeRush.Source.ActiveClassInterfaceStructOrModule
CodeRush.Source.ActiveStruct
CodeRush.Source.ActiveInterface
and would like to analyze its hierarchy by retrieving its base and/or derived types, you can use the following APIs:
Read more…
Note, this article has been moved to the official DevExpress Support Center site. Please refer to the moved article as it might have further updates or additional comments. Thank you.
If you use the CodeRush code templates heavily, and they specify the author of the source code, you may find the IDE | User Info options page interesting. On this page, you can specify your first, last and middle name, and then use them inside the text expansions, for example, to create a file header and specify its author.
Read more…
DXCore string providers are functions that return strings, and can be used to provide calculated information (e.g., date/time stamps, user names, active file name, etc) inside text expansions or DXCore plug-ins.
Read more…
Recently, we have created a console application that parses an entire solution and shows summary information about declared types and the number of members in each type. Let’s tweak it a bit, so it provides more meaningful and useful information, such as a report of Maintenance Complexity (MC) code metric for a solution source code.
Read more…
The Synchronization DXCore service provides methods for synchronizing thread code on Visual Studio’s foreground thread. The service is used by the CodeRush Code Issues technology for example.
Read more…
The RegEx DXcore service provides access to the DXCore regular expressions and aliases engine.
Read more…
The Issues DXCore service provides methods and properties for manipulating the CodeRush Code Issues Analysis.
Read more…
Usually, simple edits of text files are accomplished using the TextDocument object, which represents an open source file inside the IDE. The text document object is easy to access through the Documents DXCore service. It has lots of useful methods for editing a text like InsertText, DeleteText and SetText, which take a source code coordinates and a new text for replacement as a parameters. However, to use a text document object, it is required for the file to be opened inside the Visual Studio environment. If a file is closed, there’s no TextDocument object assigned to the file and you simply can’t use its methods. In case you are going to edit closed and/or multiple files, there’s a better way – the FileChange object (in the DevExpress.CodeRush.Core.Replacement namespace).
Read more…