DXCore Services – Serialization
The Serialization DXCore service provides methods for objects serialization (saving and loading). It can be used to load CodeRush Code tempalates.
The Serialization DXCore service provides methods for objects serialization (saving and loading). It can be used to load CodeRush Code tempalates.
CodeRush code templates are stored inside serialized objects (binary and XML files) as opposed to usual DXCore plug-ins settings storage mechanism. If you’d like to load templates (e.g. to dump and print some templates categories) you can use the DXCore Templates and Serialization services.
Sometimes, when developing a DXCore plug-in, you might need to know what settings other CodeRush or Refactor! features have. For example, it might be necessary to know if the particular feature is enabled or disabled to not intersect with it; or change a feature’s default settings from inside your own plug-in. This way, you can tweak any settings programmatically without opening the Options Dialog.
This is the third and the latest part of a topic about adding an options page into your DXCore plug-in. See the other parts, to learn more:
In this post, we are going to read plug-in settings from the decoupled storage and update them when they are changed on the options page.
Here’s the second part of the post about adding an options page into your DXCore plug-in. See the other parts, to learn more:
This topic is about adding a DXCore Options page. It has three parts to make it easier to read and follow:
Here’s the first part of the topic, and the steps we need to accomplish, to add an options page to your plug-in, and make it work:
This DXCore service provides methods and properties for manipulation of options pages and decoupled storages for persisting plug-in settings.
To persist your data using the DecoupedStorage object, use the appropriate ReadXXX and WriteXXX methods. In case your settings are language dependant, DecoupledStorage includes a property “LanguageID” that can create and select child storage objects for the purposes of language-specific storage (e.g., to support independent settings for C#, C++, Basic, etc.). Just set the LanguageID to the appropriate Language identifier (e.g., “CSharp”, “C/C++”, “Basic”, etc.), and then read and write normally. To activate the language-neutral storage object, set the LanguageID to an empty string. If your code is inside a CodeRush Options Page, you can get the LanguageID through the Options page’s LanguageID property (also, you can handle the LanguageChanged event in your Options page to find out when the user wants to create settings for another programming language).