Javascript code hinting – Adobe Extending Dreamweaver CS4 User Manual

Page 37

Advertising
background image

31

EXTENDING DREAMWEAVER CS4

Customizing Code view

The description for each menu group

The description appears in the Preferences dialog box for the code hints category when you select the menu group
in the list. The description for the selected entry appears below the menu group list.

code hints menus

A menu consists of a pattern that triggers the code hints menu and a list of commands. For example, a pattern such
as

&

could trigger a menu such as

&

,

>

,

<

.

The following example shows the format of the CodeHints.xml file (The tags in bold are described in

Code hints

tags

” on page 35):

<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="&amp;">

<menuitem value="&amp;amp;" texticon="&amp;"/>
<menuitem value="&amp;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>

JavaScript code hinting

Dreamweaver supports code hinting for the Spry framework. The Spry code hinting file (SpryCodeHints.xml) has the
same basic format as CodeHints.xml. It uses certain new keywords, such as

method

, and there is a new attribute

classpattern

to associate the class member list with the class (for example, Spry.Data.XMLDataSet). The class

member list for the classes is nested inside the menu (methods, properties, and events).

Advertising
This manual is related to the following products: