Dreamweaver CS4的代码提功能比cS3要好很多,但是现在WEB开发过程中一般都会用到一些JS框架。如何对这些框架提供的方法,或是属性增加代码提示,对于用dreamweaver作为开发工作的人来说显得很重要。经过几翻周折,大至理清了dreamweaver在代码提示的原理。
Dreamweaver CS4是通过加载其安装目录下的configuration\CodeHints的XML文件实现代码提示。
XML文件的所用的标签以及功能,示例:
<codehints>
<menugroup name="HTML Entities" enabled="true" id="CodeHints_HTML_Entities">
<description>
<![CDATA[ When you type a '&', a pop-up menu shows
a list of HTML entities. The list of HTML entities
is stored in Configuration/CodeHints.xml. ]]>
</description>
<menu pattern="&">
<menuitem value="&amp;" texticon="&"/>
<menuitem value="&lt;" icon="lessThan.gif"/>
</menu>
</menugroup>
<menugroup name="Tag Names" enabled="true" id="CodeHints_Tag_Names">
<description>
<![CDATA[ When you type '<', a pop-up menu shows
all possible tag names.0You can edit the list of tag
names using the
<a href="javascript:dw.popupTagLibraryEditor()"> Tag Library
Editor </a>]]>
</description>
</menugroup>
<menugroup name="Function Arguments" enabled="true"
id="CodeHints_Function_Arguments">
<description>
...
</description>
<function pattern="ArraySort(array, sort_type, sort_order)"
doctypes="CFML"/>
<function pattern="Response.addCookie(Cookie cookie)"
doctypes="JSP"/>
</menugroup>
</codehints>
以上xml来自http://help.adobe.com/en_US/Dreamweaver/10.0_Extending/WS5b3ccc516d4fbf351e63e3d117f508c8de-7fe3.html
对于xml标签http://help.adobe.com/en_US/Dreamweaver/10.0_Extending/WS5b3ccc516d4fbf351e63e3d117f53d62b7-7fd7.html


好冷清,捧场来了~
YUI提示快上来吧~