TextPad integration with Flex

来源:互联网 发布:爱笑会议室德柏 知乎 编辑:程序博客网 时间:2024/05/24 06:39
This TechNote provides instructions for configuring an MXML-specific syntax file in the TextPad editor, and provides a link to a pre-defined MXML.syn file. The TextPad editor allows you to customize your editing environment through the use of syntax definition files. Syntax files contain the information TextPad uses to highlight keywords in different colors. A number of pre-defined syntax files are provided for common programming languages such as Java, and you can also create and customize your own syntax files. If you want to implement syntax highlighting for a document class that has not been catered for (for example MXML), you simply create a file of keywords that you want to be colored, and save it as "MXML.syn" in the configured Syntax folder. There are three basic steps required: 1.Create the document class. 2.Specify which files are members of that class. 3.Optionally, specify which syntax definition file is required. These steps can be performed for you with the New Document Class wizard, using the command on the Configure menu, or as explained below. 1.First, create the document class: a.Close any open documents in the TextPad editor, even blank ones. b.From the Configure menu, choose Preferences. c.Select Document Classes. d.Click the empty box at the bottom of the list of classes. e.Type the name "MXML" and press Enter. f.Click Apply. g.Click the "+" next to Document Classes. h.Select the new entry for MXML. i.Change any properties, such as "Create new files as UNIX", if the defaults are not appropriate. j.Click Apply. 2.Second, specify which files are members of this class: a.Click the empty box at the end of the list of class members. b.Type "*.mxml" and press Enter. c.Click Apply. 3.Finally, specify which syntax definition file is required (optional): a.Click the "+" next to the MXML document class. b.Select "Syntax". c.Check "Enable syntax highlighting". d.From the list of syntax definition files, choose "MXML.syn". e.Click OK. Now, open a file with extension ".mxml" and it will be syntax highlighted. A pre-defined MXML.syn file has been created by the Flex Development Team for TextPad users and is available for download and customization from the Adobe web site.
原创粉丝点击