DevExpress DXCore framework services list
Here is the list of services (and a few properties) DevExpress DXCore provides, which are accessible through the main CodeRush object:
Here is the list of services (and a few properties) DevExpress DXCore provides, which are accessible through the main CodeRush object:
The context determines if a particular feature is appropriate for use when working inside Visual Studio IDE. It is useful for distinguishing conditions where a feature should be available. If a feature with a specified context is available, then it means that the context is satisfied. For example, you may apply a context for a feature to be available while editing a source code, but not while IDE is in design-time or a model dialog is open.
The ContextPicker component allows users to specify sophisticated context expressions. It is populated from the context providers registered in the DXCore. For example, take a look at the Shortcuts options page and the context picker used on this page where you can bind a context for any shortcut available.
The ContextProvider component provides a new context entry for the ContextPicker component. Context is automatically registered in the DXCore when a plug-in containing the corresponding ContextProvider is loaded.
You can drop the ContextProvider onto your plug-in design surface from the “DXCore: Extensions & Providers” category of Visual Studio Toolbox:
Here’s a sample code of how to programmatically verify a particular context inside of your DXCore plug-in. You may achieve this using the Context service like this:
CSharp code:
ContextResult result = CodeRush.Context.Satisfied(@"Focus\Documents\Source\Code Editor"); bool editorHasFocus = result == ContextResult.Satisfied;
Almost all refactorings have a preview hint which allows you to see the resulting code before a particular refactoring is performed. This is very useful, because it is a great help to understand what will happen in the code once an action is taken. Moving among available refactorings in the Refactor! popup menu or a SmartTag popup menu will be reflected in the preview for each one. Here are previews of some possible refactorings you can perform using the Refactor! popup menu:
It can be easily accomplished from the “Shortcuts” options page in the Options Dialog. Follow these steps to get to the Shortcuts options page:
1. From the DevExpress menu, select Options…
2. In the tree view on the left, navigate to this folder: IDE.
3. Select the Shortcuts options page.
Good code style suggests limiting the length of a code line to 80 characters, and only 70 characters for indented code examples to be used in documentation. The Right Margin Line helps you to visually indicate the specified line length. It doesn’t prevent typing to the right of it, but lets you to identify and break long expressions over multiple lines.