beautypg.com

Scheme – Adobe Extending Dreamweaver CS4 User Manual

Page 51

background image

45

EXTENDING DREAMWEAVER CS4

Customizing Code view

The following excerpt from the CodeColoring.xml file illustrates the hierarchy of tags in a code coloring scheme file,
and it also illustrates the relationship between the code coloring styles file and the code coloring scheme file:

Notice that the

syntaxColor

and

tagColor

tags in the Colors.xml file assign color and style values to an

id

string

value. The

id

value is then used in the CodeColoring.xml file to assign a style to a scheme tag. For example, the

defaultTag

tag in the CodeColoring.xml excerpt has an

id

of

"CodeColor_HTMLComment"

. In the Colors.xml file,

the

id

value of "

CodeColor_HTMLComment"

is assigned a

text=

value of

"#999999"

, which is gray.

Dreamweaver includes the following code coloring schemes: Default, HTML, JavaScript, ASP_JavaScript,
ASP_VBScript, JSP, and ColdFusion. The Default scheme has an

id

value equal to

"Text"

, Dreamweaver uses the

Default scheme for document types that do not have a defined code coloring scheme.

A code coloring file contains the following tags, described below:

scheme, blockEnd, blockStart, brackets, charStart, charEnd, charEsc, commentStart, commentEnd,

cssImport/, cssMedia/, cssProperty/, cssSelector/, cssValue/, defaultAttribute, defaultTag,

defaultText/, endOfLineComment, entity/, functionKeyword, idChar1, idCharRest, ignoreCase,

ignoreMMTParams, ignoreTags, isLocked, keyword, keywords, numbers/, operators, regexp,

sampleText, searchPattern, stringStart, stringEnd, stringEsc, tagGroup

Description
The

scheme

tag specifies code coloring for a block of code text. You can have multiple schemes within a file to specify

different coloring for different scripting or tag languages. Each scheme has a priority that lets you nest a block of text
with one scheme inside a block of text with a different scheme.

Starting with Dreamweaver CS4, the Code Coloring parser now merges tags with the same id. All non-
conflicting tags are added to the existing . The scheme with the newest file date wins any conflicts.

This manual is related to the following products: