Archive

Archive for the ‘DXCore’ Category

DXCore Text Commands overall list

January 28th, 2011 Comments off

Here is the list of text commands provided by the DXCore Framework.

Read more…

How to detect if DXCore is loaded from another add-in

January 17th, 2011 Comments off

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.

Here is a sample code illustrating how to detect if the DXCore is installed and loaded from another add-in (without static dependencies on the DXCore assemblies) using reflection. This could be helpful if your add-in functionality somehow intersects with the DXCore’s.

From inside a usual DXCore plug-in, you can detect if the DXCore is loaded by calling the “CodeRush.IsLoaded” property. In case you are not going to reference the DXCore assemblies inside your add-in, this sample might help.

Read more…

DXCore Services – TextExpansions

January 14th, 2011 Comments off

Text Expansions DXCore service provides methods and properties for expanding dynamic text containing encoded text commands and/or string providers. CodeRush Templates is an example of such a feature. Note that the service is hidden from Intellisense.

One of the most important methods is “Insert” (with various overloads), which allows you to expand the text you prepared. All Insert methods return the SourceRange of the expanded text. For example, when you expand the “ai” template in CSharp (to create a new auto-implemented property), the following text is being expanded:

Read more…

DXCore abstract source tree structure

January 12th, 2011 Comments off

DXCore supports lots of programming languages provided by the language services in Visual Studio. These services provide language-specific support (such as CSharp, Visual Basic, C++) for editing source code in the integrated development environment (IDE). DXCore includes appropriate source code parsers for these programming languages. When the source code is parsed, DXCore builds an abstract syntax tree (AST) that is a representation of the syntactic structure of the source code of a particular programming language. This abstract syntax tree is unified for all languages supported by IDETools. That’s why it is easy to develop a language-independent feature as a DXCore plug-in – in most cases your feature will be available in all corresponding languages automatically.

Read more…

DXCore plug-in Option Pages overview

December 28th, 2010 Comments off

You can add custom user-friendly option pages that will automatically be integrated into the IDETools Options Dialog. If your DXCore plug-in has any kind of user-configuration, the options page will allow you and other developers easily customize the features of your plug-in.

Read more…

DXCore Services – LinkedIdentifiers

December 27th, 2010 Comments off

Linked Identifiers are a built-in feature of DXCore, which allows you to simultaneously change similar pieces of the text (code) located in different places. The service provides access to the Linked Identifiers engine.

Read more…

How to perform an existing refactoring from another one

December 25th, 2010 12 comments

Refactor! Pro has numerous refactorings which perform a single task. What if we could run several refactorings at once?

For example, there is a support for optimizing namespace references added to the Move Type to File refactoring: after the new file is created, the Optimize Namespace References refactoring does its job. Here are other examples of refactoring (code provider) combinations, which can be performed:

  • Introduce Local and Promote to Parameter will create a new refactoring, called something like “Introduce Parameter”.
  • Declare Class (Struct) and Declare Method (Property) will create a new multi-declare code provider, which will declare everything at once.
  • Introduce Parameter Object and Move Type to File will add a new option for the first refactoring to create a new file.
  • And so much more…

Read more…

DXCore Linked Identifiers feature

December 25th, 2010 Comments off

Linked Identifiers are a built-in feature of DXCore, which allows you to simultaneously change similar pieces of the text (code) located in different places. If you change one linked identifier, the others that are associated with it will automatically be changed as well. For instance, linked identifiers are enabled when you apply the Rename refactoring.

DXCore Linked identifiers preview

Read more…