# About the XML Source Editor

The XML Source Editor is a full-featured text editor that is integrated with other parts of the IDE.

The XML editor has the following features:

Element | Description
--- | ---
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. Note: You must close the split file if you want the editor to return to its unsplit state. You can right-click a tab to access the following commands:
Close All | Closes all files that are open in the Source Editor area.
Close Other | Closes all files except for the selected file.
Save | Saves the selected file.
Clone | Opens a new tab for the same document. This command is particularly useful in combination with splitting the window so that you can view different parts of the same file simultaneously.
Close Window | Closes the selected file.
Maximize Window/Restore Window | Maximize Window hides other windows and expands the Source Editor to use all of the window space in the IDE. Restore Window returns the windows to the state that they were before you chose Maximize Window. You can also maximize and restore the Source Editor by double-clicking a tab.
Float/Dock Window | Opens document in an editor in a new window. If window is already floating, the Dock Window option appears instead.
New Document Tab Group/Collapse Document Tab Group | Splits the editor window into two groups of tabs and separates the selected tab into the new group. If a separate group of tabs exists, Collapse Document Tab Group combines these groups into one group.
Select in Projects | Highlights the file's node in the Projects window.
Local History | Opens a menu from which you can view the changes you made to the file or revert those changes.
[version control] | If the file is under version control, a menu item with the name of the version control system appears. The option opens a menu of relevant version control commands.
Diff To... | Diffs the file to another file in its folder or another file open in the editor.
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 popup 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. Note: If code completion does not appear, press Ctrl+Space. 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. Note: If the Source Editor beeps when you try to enter new text, the file is a read-only file.

Related Topics

Developing Applications with NetBeans IDE,
"

Developing Applications with NetBeans IDE,
s"

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.