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.

  1. Add a new ClassificationType to [Oslo SDK]\Bin\Intellipad\Settings\ClassificationTypes.xcml
  2. <act:Export Type='mvstc:ClassificationTypeDefinition'>
        <ls:ClassificationType Name='X10.CommandCode' DerivesFrom='text' />
    </act:Export>
  3. Add a new ClassificationFormat to [Oslo SDK]\Bin\Intellipad\Settings\ClassificationFormats.xcml
  4. <act:Export Name='{}{Microsoft.Intellipad}ClassificationFormat'>
        <ls:ClassificationFormat Name='X10.CommandCode'
                                 FontFamily='Consolas'
                                 Foreground='#FFcc3333' 
                                 FontWeight='Bold'/>
  5. In your grammar add a Classification attribute to the token you want the formatting applied to.
  6. @{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.

Technorati Tags: