Editor

Use these options to configure the visual aspect, formatting parameters, and behaviour of the content assistant.

 

Figure 15.4. The Editor preferences panel

The Editor preferences panel

Editor background color

Use this option to set the background color of the editor.

Editor caret color

Use this option to set the background color of the editor.

Selection foreground color

Use this option to set the text color of selected text.

Selection background color

Use this option to set the background color of selected text.

Line highlight color

Use this option to set the highlight color for the line on which the caret is situated.

Completion proposal background

Use this option to set the background color for the content completion window.

Completion proposal foreground

Use this option to set the foreground color for the content completion window.

Documentation window background

Use this option to set the background color for the window containing documentation for the content completion elements.

Documentation window foreground

Use this option to set the foreground color for the window containing documentation for the content completion elements.

Line number foreground

Use this option to set the foreground color for the line numbers displayed at the right of editor panel.

Line Wrap (disables folding)

This option will do a soft wrap of long lines, that is automatically wrap lines in edited documents. When this option is checked line folding will be disabled.

Show TAB/NBSP/EOL/EOF marks

Marks the TAB/NBSP/EOL/EOF using small icons, for a better visualisation of the document.

Show line numbers in editor

This option enables the line numbers column located in the left part of the editing space. When unchecked, line numbers option is disabled.

Show line numbers in results

This option enables the line numbers column located in the left part of the Results panel in the Debugger perspective.

Show fold bar

This options enables the display of the document folding bar.

Highlight matching tag

This option enables highlight for the tag matching the one on which the caret is situated.

Matching tag highlight color

Use this option to set the color of the matching tag highlight.

Highlight current line

Enables highlight for the current line.

Show print margin

Enables displaying a vertical line in the editor panel representing the paper margin if the current content of the editor panel is printed with the action FilePrint

Print margin column

The number of characters included on a line which the print format allows.

Print margin color

The color used to paint the print margin line in the <oXygen/>'s editor panel.

 Format

 

Figure 15.5. The Format preferences panel

The Format preferences panel

Detect indent on open

The editor tries to detect the indent settings of the opened XML document. In this way you can correctly format (pretty-print) files that were created with different settings, without changing your options. More than that you can activate the advanced option for detecting the maximum line width to be used for formatting and hard wrap. These features were designed to minimize the differences created by the pretty print operation when working with a versioning system, like CVS for example.

Indent with tabs

When checked enables 'Indent with tabs' to sets the indent to a tab unit. When unchecked, 'Indent with tabs' is disabled and the indent will measure as many spaces as defined by the 'Indent size' option.

Indent size

Sets the number of spaces or the tab size that will equal a single indent. The Indent can be spaces or a tab, select the preference using the Indent With Tabs option. If set to 4 one tab will equal 4 white spaces or 1 tab with size of 4 characters depending on which option was set in the Indent With Tabs option.

Indent on paste

Indent paste text corresponding to the indent settings set by the user. This is useful for keeping the indent style of text copied from other document.

Hard line wrap

This feature saves time when writing a reach text XML document. You can set a limit for the length of the lines in your document. When this limit is exceeded the editor will insert a new line before the word that breaks the limit, and indent the next line. This will minimize the need of reformatting the document.

Enable Smart Enter

If checked, it inserts a new indented line between start and end tag.

Detect line width on open

If checked, it detects the line width automatically when the document is opened.

Line width - pretty print

Defines the point at which the "Format and Indent" (Pretty-Print) function will perform hard line wrapping. So if set to 100 Pretty-Print will wrap lines at the 100th space inclusive of white spaces, tags and elements.

 XML Format
 

Figure 15.6. The XML format preferences panel

The XML format preferences panel

Format and indent the document on open

When checked, the Format and indent the document on open operation will format and indent the document before opening it in the editor panel.

Preserve empty lines

When checked the Format and Indent operation will preserve all empty lines found in the document on which the pretty-print operation os applied.

Expand empty elements

When checked the Format and Indent operation will output empty elements with a separate closing tag, ex. <a atr1="v1"></a>. When not checked the same operation will represent an empty element in a more compact form: <a atr1="v1"/>

Add space before slash in empty elements

When checked the Format and Indent operation will add a space before the closing slash of an empty element, for instance an empty br will appear as <br />.

Sort attributes

When checked the Format and Indent operation will sort the attributes of an element alphabetically. When not checked the same operation will leave them in the same order as before applying the operation.

Break line before attribute's name

If checked, the "Format and Indent" (Pretty-Print) function will break the line before the attribute's name.

Preserve line breaks in attributes

If checked, the "Format and Indent" (Pretty-Print) function will preserve the line breaks found in attributes. When this option is checked, Break long lines option will be disabled.

Preserve text as it is

If checked, the "Format and Indent" (Pretty-Print) function will preserve text nodes as they are without removing or adding any whitespace.

Break long attributes

If checked, the "Format and Indent" (Pretty-Print) function will break long attributes.

Preserve space elements (XPath)

This list contains simplified XPath expressions for the names of the elements for which the contained white spaces like blanks, tabs and newlines are preserved by the Format and Indent operation exactly as before applying the operation. The allowed XPath expressions are of one of the form:

  • author
  • //listing
  • /chapter/abstract/title
  • //xs:documentation

The namespace prefixes like xs in the previous example are treated as part of the element name without taking into account its binding to a namespace.

Strip space elements (XPath)

This list contains the names of the elements for which contiguous white spaces like blanks, tabs and newlines are merged by the Format and Indent operation into one blank.

Indent (when typing) in preserve space elements

If checked, automatic tags indentation while editing will take place for all elements including the ones that are excluded from Pretty Print (default behaviour). When unchecked, indentation while editing will not take place in elements that have the 'xml:space' attribute set on 'preserve' or are in the list of Preserve Space Elements.

 CSS Format
 

Figure 15.7. The CSS format preferences panel

The CSS format preferences panel

Indent class content

If checked, the class content is indented during a "Format and Indent" (Pretty-Print) operation.

Class body on new line

If checked, the class body (including the curly brackets) are placed on a new line after a Pretty-Print operation.

Add new line between classes

If checked, an empty line is added between two classes after a Pretty-Print operation is performed.