Here's a quick guide to get you started on writing your own Code Layout.
Code Layouts are simply XML files which follow the Code Layout Schema.
The Code Layout Schema (CodeLayoutSchema.xsd) can be found in your installation directory.
If you are using Visual Studio, the Code Layout Schema is copied during installation into your Visual Studio Schemas directory.
Here are the steps neccesary to start writing a custom Code Layout in Visual Studio:
- Create a new XML file in Visual Studio (File->New->File->XML File->Open)
- Type in "<CodeLayout xmlns="http://regionerate.net/schemas/0.6/CodeLayout.xsd">" (substitue 0.6 to the current version you are working with).
If you are using Visual Studio, the file should be linked to the Code Layout Schema immediatly, and you should be able to receive intellisense assistance.
If you are not using Visual Studio, or for some reason you are not getting intellisense assitance:
- Open the Properties window for the XML file.
- Choose "Schemas" and click on the button.
- Click on "Add" and browse for the CodeLayoutSchema.xsd file under your installation directory. (typically C:\Program Files\Regionerate)
- Click OK. The XML file is now validated by the Code Layout Schema.
The Code Layout Schema structure is pretty simple, I'm sure you'll manage from here.
Once you have your Code Layout all ready, you can easily load it into the Visual Studio add-in by following these steps:
- Click on Tools->Regionerate Settings.
- Under "Code Layout" check "Use Custom".
- Hit the "Browse" button and browse for your custom Code Layout.
- Click "Save".