Tuesday, March 31, 2009 11:19 PM
krisho
Controlling DSL Formatting In Intellipad
A couple people have asked how to get Intellipad to do custom text formatting of the DSL. You do this by creating a new Classification for Intellipad. There are 3 steps. Here they are for a classification I created called X10.CommandCode.
- Add a new ClassificationType to [Oslo SDK]\Bin\Intellipad\Settings\ClassificationTypes.xcml
<act:Export Type='mvstc:ClassificationTypeDefinition'>
<ls:ClassificationType Name='X10.CommandCode' DerivesFrom='text' />
</act:Export>
- Add a new ClassificationFormat to [Oslo SDK]\Bin\Intellipad\Settings\ClassificationFormats.xcml
<act:Export Name='{}{Microsoft.Intellipad}ClassificationFormat'>
<ls:ClassificationFormat Name='X10.CommandCode'
FontFamily='Consolas'
Foreground='#FFcc3333'
FontWeight='Bold'/>
- In your grammar add a Classification attribute to the token you want the formatting applied to.
@{Classification["X10.CommandCode"]}
token CommandCode = ...
TIP: When in Intellipad you can press CTRL+ALT+F5 to reload the settings instead of having to bounce the tool.