Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Web Tools Guide
Previous Page Home Next Page

Using XML content assist

You can use content assist to help you finish a tag or line of code in the Source view of the XML editor. You can also use content assist to insert templates into your XML code.

The placement of the cursor in your source file provides the context for the content assist to offer suggestions for completion.

You can launch content assist in either of the following ways:

  • From the Edit menu, click Content Assist, or
  • Press Ctrl+Space

In addition, you can set up an option that causes content assist to pop up automatically when certain characters are typed. To set up this option, click Window > Preferences to open the Preferences window, then select XML > XML Files > Editor . In the Content assist group box, select the Automatically make suggestions check box, and supply any additional characters that should trigger content assist.

If your cursor is in a position where content assist is available, a pop-up list of available choices is displayed when you launch content assist. The list is based on the context and whether a DTD or XML schema is associated with the XML file being edited. For example, if you have an Address element that can contain any of the following children elements: Name, Street, City, Zip Code, Country, and Province, and you place your cursor after any of them and launch content assist, all of the child elements will be listed in the content assist list.

The content assist list displays all valid tags for the current cursor position, including templates. If your grammar constraints are turned off, all available tags, not just valid ones, are displayed.

As you type the first one or two letters of the tag that you want, the list automatically refreshes with alphabetized choices that match your input. Scroll down and select the tag that you want to use by double-clicking on it.

Note: The list only refreshes as described if you first type < before prompting for content assist.

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire