24.7 Preferences: Web and XML

The Web and XML preferences let you specify how Designer should handle editing and creation of CSS, HTML, and JavaScript* files.

24.7.1 CSS Files

The CSS Files preferences allow you to specify how Designer displays and manages CSS files.

Figure 24-19 CSS Files

Table 24-36 CSS Files

Preference

Description

Creating or saving files: Line Delimiter

Sets the type of line delimiter applied to newly created files. The options are:

  • Windows

  • Unix

  • Mac

  • No translation

Creating files: Add this suffix

The file suffix the editor adds when creating files. The default is CSS.

Creating files: Encoding

The encoding used for new files.

CSS Source

Figure 24-20 CSS Source

Table 24-37 CSS Source

Setting

Description

Formatting: Line width

Specifies the number of characters in a line.

Formatting: Insert line between properties

Specifies whether the editor should insert a line between the CSS properties.

Formatting: Disable wrapping in style attribute of HTML

Specifies whether the HTML editor (used in the e-mail notification template editor) should allow wrapping of the value of a style attribute.

Formatting: Indent using tabs > or Formatting Indent using spaces and

Formatting: Indentation size

Specifies how the first line of text indents.

Specifies the size of the indent.

Formatting: Capitalization style

Specifies the default case for identifiers, property names, and property values.

CSS Styles

Figure 24-21 CSS Styles

Table 24-38 CSS Styles

Setting

Description

Content type

Choose the content type for which you want to define a style.

Foreground/Background/Bold

Specifies the syntax highlighting (foreground and background color) and whether the text should be bold for individual CSS constructs.

24.7.2 HTML Files

The HTML Files preferences allow you to specify how Designer displays and manages HTML files and content.

Figure 24-22 HTML Files

Table 24-39 HTML Files

Preference

Description

Creating or saving files: Line Delimiter

Choices are:

  • Windows

  • Unix

  • Mac

  • No translation

Creating files: Add this suffix

Specifies the file suffix the editor should add when creating a new file. The default is html.

Creating files: Encoding

Specifies the editor’s encoding for new files.

Loading files

Choose the encoding for files opened in the editor. Click Use workbench encoding to accept the default UTF-8, or select one from the list.

HTML Source

Figure 24-23 HTML Source

Table 24-40 HTML Source

Setting

Description

Formatting: Line Width

Specifies the number of characters for each line.

Formatting: Clear all blank lines

Specifies what the editor should do with blank lines

Formatting: Split multiple attributes each on a new line

Specifies what the editor should do with multiple attributes.

Formatting: Indent

Specifies whether the indent should be using tabs or spaces and also the indentation size.

Content assist: Automatically make suggestions

Specifies whether to do automatic code completion.

Content assist: Prompt when these characters are inserted

Specifies the characters that initiate the content assist.

Content assist: Suggestion strategy

Specifies whether to use Lax or Strict grammar when making suggestions

Preferred markup: Tag Names/Attribute Names

Specifies if the editor’s suggestions should be in uppercase or lowercase.

HTML Styles

Figure 24-24 HTML Styles

Table 24-41 HTML Styles

Setting

Description

Content type/Foreground/Background/Bold

Specifies how the editor performs syntax highlighting (foreground and background color) and bolding for the selected HTML content type.

HTML Templates

Figure 24-25 HTML Templates

Table 24-42 HTML Templates

Setting

Description

Templates

The templates are used in the code completion in source editor.

Use this preference to add, remove or edit templates.

24.7.3 JavaScript Files

Changes how JavaScript files are created.

Figure 24-26 JavaScript Files

Table 24-43 JavaScript Files

Setting

Description

Creating or saving files: Line delimiter

Sets what type of line delimiter is applied to the file. The options are:

  • No translation

  • UNIX

  • Mac

  • Windows

Creating files: Add this suffix (if not specified)

Sets the suffix for the file. The default value is js. It can be set to any value.

JavaScript Source

Changes the formatting for the JavaScript files.

Figure 24-27 JavaScript Source

Table 24-44 JavaScript Source

Setting

Description

Formatting

Sets the formatting for the editor. The options are:

  • Indent using tabs

  • Indent using spaces

  • Indentation size: Changes the indentation size by setting a numeric value.

Content assist

Helps with prompts when creating the files.

Automatically make suggestions: Can be enabled or disabled if the check box is selected.

Prompt when these characters are inserted: Allows you to receive prompts when the specified characters are entered.

JavaScript Styles

Customizes the content of the JavaScript files.

Figure 24-28 JavaScript Styles

Table 24-45 JavaScript Styles

Setting

Description

Content type

Selects the content to be customized. You can change each element independently. The sections that can be changed are:

  • Comments

  • Default Code

  • Keywords

  • Literal Strings

  • Unfinished Strings and Comments

If you select the element in the sample text field, the content type changes to what is selected.

Foreground

Displays the color that is set for the foreground. Double-click the color field to select another color.

Background

Displays the color that is set for the background. Double-click the color field to select another color.

Bold

Allows you to bold an element. Select the element, the click the Bold check box.

Sample text

Displays a sample file to see the changes.

JavaScript Validation

Allows the editor to validate the JavaScript as it is entered. To automatically validate the scripts, select Automatically validate scripts. Otherwise, the JavaScript is not validated.

24.7.4 Task Tags

The Task Tag Preferences allow you to specify whether Designer should search for task tags and which task tags to display in the Task view. If Enable searching for Task Tags is not selected, Designer does not search for task tags. If you do not use the Task view, make sure this option is not selected because the search can affect Designer’s performance.

The TODO and FIXME task tags are defined by default, but you can specify additional tags by selecting New and completing the Task Tag dialog box. Use the Filters tab to specify the file types that Designer should search for the selected task tags.

24.7.5 XML Catalog

The XML Catalog Preferences allow you to manage the WST XML Catalog implementation. You can add, edit, or delete user-specified catalogs. You cannot use this preference to manage the plug-in specified entries.The XML editor uses the WST XML catalogs implementation to resolve XML schema and DTD references for associating URLs, system and public identifiers with URLs.

Figure 24-29 XML Catalog Preferences

To add a user-specified entry:

  1. Click Add.

  2. Fill in the fields as follows:

    Field

    Description

    URI

    Specify a location on disk or a URL of the schema or DTD.

    Key Type

    Specify the key type. Values are public identifiers for DTDs or URIs for XML schemas.

    Key

    Specify a unique key

    Specify alternative web address

    Optionally, specify an alternative Web address for locating the schema or DTD.

  3. Click OK to save.

24.7.6 XML Files

You can set the following general XML File preferences:

Figure 24-30 XML File Preferences

Table 24-46 XML Files Preferences

Category

Preference

Description

Creating or saving files

Line delimiter

Choices are:

  • Windows

  • Unix

  • Mac

  • No translation

Creating files

Add this suffix

The file suffix. The default is XML.

 

Encoding

The encoding used by the editor

Validating files

Warn when no grammar is specified

Specifies whether to display a warning when no grammar (such as XML Schema or DTD) is associated with the XML document.

XML Source

You can set the following XML Source preferences:

Figure 24-31 XML Source

Figure 24-32 XML Source

Table 24-47 XML Source Preferences

Category

Preference

Description

Formatting

Line width

Specifies the number of characters in a line.

 

Split multiple attributes each on a new line

Specifies how attributes are formatted (whether to show each attribute on a separate line).

 

Clear all blank lines

Specifies whether blank lines are removed when formatting.

 

Indent using tabs/Indent using spaces, Indentation size

Specifies whether to use tabs or spaces as indentation and indentation size.

Content Assist

Automatically make suggestions

Specifies whether to do automatic code completion.

 

Prompt when these characters are inserted

The list of characters that initiate code completion.

 

Suggestion strategy

Specifies whether to use Lax or Strict grammar when making suggestions

Grammar constraints

Use inferred grammar in absence of DTD/Schema

Specifies whether to display code completion suggestions based on existing content of the XML document.

XML Styles

The XML Styles preferences allow you to specify the syntax highlighting (foreground and background color) and whether the text should be bold for individual XML constructs.

XML Templates

Use the XML Templates preference page to define XML templates. The templates are used in the code completion in the XML Source Editor. For example, selecting the XSL Processing Instruction template in the code completion inserts <?xml-stylesheet type=”text/xsl” href=””?> in the source editor and places the cursor in the href value.

Figure 24-33 XML Templates Preference