About the XML Source Editor

The XML Source Editor is a full-featured text editor that is integrated with other parts of the IDE. You open the Source Editor by creating a new XML file or double-clicking a XML file node in the Projects window, Files window, or Navigator window.

The XML editor has the following features:

Tabs
Toolbar
Left Margin
Error Stripe
Status Line
Syntax Coloring
Code Completion
Insert Mode and Overwrite Mode

Source Editor Tabs

The top of the Source Editor has a tab for each open document. Each tab shows the name of the document. If the document has been modified and has not been saved, there is an asterisk (*) after its name.

If multiple files are open, you can split the Source Editor view by clicking and dragging the tab. As you drag to different parts of the editing area, you see a red outline that shows you where the new window will open. When one of these boxes appears, you can drop the document and split the pane.

You can right-click a tab to access the following commands:

Toolbar

The editor toolbar is at the top of the Source Editor window. The toolbar has buttons for various navigating and editing shortcuts, which vary according to the type of file you are editing. Hold the cursor over a button to display a description of the command.

Left Margin

The left margin displays annotation glyphs that indicate line status, such as warnings.

You can right-click the left margin to display a pop-up menu. The margin can also optionally display line numbers.

Error Stripe

The error stripe is the strip to the right of the right scroll bar and contains marks for various things in your file, such as errors, bookmarks, and comments for the To Do list. The error stripe represents the whole file, not just the lines currently displayed. You can immediately identify whether your file has any errors without having to scroll through the entire file. You can double-click a mark in the error stripe to jump to the line that the mark refers to.

Status Line

The Source Editor status line is in the bottom right corner of the IDE. The first area of the status line shows the current line number and row number in the form line:row. The second area of the status line indicates the insertion mode (INS or OVR). The text area on the right is used for status messages.

Syntax Coloring

Source code displayed in the Source Editor is syntactically colored. For example, all XML keywords are shown in blue and all XML comments in light gray.

Code Completion and Text Hints

The IDE's code completion feature helps you fill in code and tags as you are typing. Code completion is available for PHP, HTML, and XML files. Code completion applies both to tag names and attributes. If your document is defined by a DTD and the IDE can access the DTD, the Source Editor also offers code completion for all supported elements, attributes, and entities. As you type, a combo box displays all matching elements in the DTD. Press Enter to enter only the element name, or press Shift-Enter to enter a start tag and end tag for the element.

After you select an item, code completion closes. Press Ctrl-Space to reopen code completion.

Insert Mode and Overwrite Mode

When the Source Editor is in insert mode, the default insertion point is a vertical bar, and text that you type is inserted. In overwrite mode, the default insertion point is a solid block, and text that you type replaces the existing text.

Use the Insert key to toggle between the two modes.

Whenever the insertion point in the Source Editor is located immediately after a brace, bracket, or parenthesis, the matching brace, bracket, or parenthesis is highlighted.


Legal Notices