In eXo IDE, you can edit some local files with the registered type within the Code editor or WYSIWYG editor. During opening, you can directly define the correct file type.

Edit the local file content in eXo IDE

1. Go to File --> Open Local File... from the top menu.

2. Click Browse... in the Open file form to select the required local file.

3. Check the file's MIME type, based on the file extension. If needed, select another MIME type from the list.

4. Press Open to open the selected file content in the default editor of the Content pane with the local file name.

The following table is the list of MIME types registered in the eXo IDE.

File Type MIME Type Default File Extension Default Editor
Text text/plain .txt Code Editor
XML text/xml; application/xml .xml Code Editor
REST Service application/x-jaxrs+groovy .grs Code Editor
POGO application/x-groovy .groovy Code Editor
Template application/x-groovy+html .gtmpl Code Editor
HTML text/html .html Code Editor
Google Gadget application/x-google-gadget .xml Code Editor
JavaScript text/javascript; application/javascript; application/x-javascript .js Code Editor
CSS text/css .css Code Editor
Netvibes Widget application/x-uwa-widget .html Code Editor
Data Object application/x-chromattic+groovy .groovy Code Editor
<unrecognized> binary/octet-stream

To load the Google Gadget file, you should set the MIME Type as "application/x-google-gadget" in the Open file form as figured out in the below illustration.

Project template helps you create folders and files with the predefined structure and content. You can create, update or remove your project template and add new folders and files from your template.

1. Go to File --> New --> Project Template... from the top menu;

Or, click on the toolbar and select the Project Template... command.

The Create project template form appears.

2. Enter the name and brief description in the Create project template form.

Optionally, you can restructure the project by clicking Add Folder, Add File, Delete at the right part of the Create project template form.

3. Click Create to complete your project template.

You can make changes for your project template structure by adding new folders/files or deleting some elements.

Make modifications for your project template structure

1. Open the Create project template form as described in the Create a project template section above.

2. Select the target folder in the project template tree.

Now you can:

Add a folder

i. Click Add Folder to open the Add folder form.

ii. Enter your desired folder name into the Name of new folder field and then click Add.

Your newly added folder then will be added to the project template.

Add a new file

i. Click Add File to open the Add file form.

ii. Select your desired file template in the templates list.

ii. Enter the file name into the File Name field, and then click the Add.

Delete some elements

i. Select your desired item (folder/file) in the template project tree.

ii. Click Delete.

Once a file has been created/opened, its content is displayed in the separate tab on the Content pane in the default Code editor. eXo IDE Code Editor parses and colors the code. You can indent code, search text, locate open/close braces and brackets, see line numbers and more.

This feature enables you to auto-complete the word, including keywords, statements, declared variables, properties and methods, functions, objects, classes, tags, attributes, annotations in context of JavaScript, HTML, XML, Google Gadget, REST Service, Template, POGO, Netvibes Widget, Data Object files simply by clicking Ctrl+Space hotkeys. The Auto-complete form is shown as below:

In the files of Google Gadget, HTML and Template types, the auto-complete list displays various content for each case, depending on the cursor position within the file. If the cursor is put between <script> tags, or between <style> tags, there will be the auto-complete list for JavaScript content, or for CSS content respectively. In the other places, the auto-complete list for the HTML content is displayed.

Use the Auto-complete function

1. Open the target file with supported file types (JavaScript, CSS, HTML, Google Gadget, ECM Template and others) with the Code editor.

2. Put the cursor on the needed position in the document.

3. Press Ctrl+Space to get the Auto-complete form.

4. Select the token in the list of this form; or type first letters of the token to reduce the token list and then select the appropriate token.

5. Press Enter or double-click the selected token to complete the word next to the cursor.

eXo IDE currently supports special features for the Groovy code auto-complete list, including REST Service ("application/x-jaxrs+groovy"), POJO ("application/x-groovy") and Data Object ("application/x-chromattic+groovy"). The auto-complete list varies, depending on Java types and is shown in the following cases:

IDE compiles classes, which are described in the project's classpath, before generation of the auto-complete list. If the compilation of some class is failed, the error message will appear in the Output pane instead of Auto-complete form as shown below:

To display classes from folder described as folder source in the project's classpath, in the Auto-complete form, the files with such classes must fulfill the following conditions:

The code outline is used to create codes productively. The outline is available for all types of files, expect for Text or CSS files.

The Outline pane is opened automatically once a file has been created or opened. You can close the Outline pane by clicking on the tab header. Also, you can show/hide the Outline pane by pressing on the toolbar or select View from the top menu and then select/deselect Outline from the drop-down menu.

In the Outline pane, you can see the tree of variables, functions, classes, objects, methods, fields, parameters, annotations, HTML and XML tags with "< >" icon, and special code delimiters like "<% ... %>" in the ECM Template file, or "CDATA" in the Google Gadget file as the illustrations below.

The outline tree is refreshed automatically every two seconds after you stop typing the code. When you click the item in the outline tree, the cursor will be set on the respective line where this item is defined. When you move the cursor into the file content, the respective node is selected in the outline tree.