eXo Platform 3.5

## Chapter 1. Basic Actions

This chapter includes the following topics:

- eXo IDE interface

  Introduction to the eXo IDE interface that will help you easily use eXo IDE.

- Select a workspace

  How to go to your desired workspace.

- Copy/Cut/Paste files and folders

  How to copy/cut and paste files and folders.

- Manage folders

  How to do actions on folders in eXo IDE, including opening, creating/deleting, renaming and downloading/uploading a file.

- Manage files

  How to work with files in eXo IDE, such as opening, viewing and copying, creating a file, and more.

- Search

  How to search for files in eXo IDE and to specify the location of an opened file in the Content tab.

- Versioning

  How to use the versioning feature that enables you to realize the versions history of a file.

## 1.1. eXo IDE interface

Before using eXo IDE, you should familiarize yourself with the application interface:

eXo IDE has customizable interface with enhanced windows and editors. The Virtual File System is the physical location (file path) you are working in. It is displayed as the Workspace pane containing folders and files.

The Content pane consists of two horizontal sub-panes:

- The Top pane shows files in several file tabs with their content.

- The Bottom Operation pane may contain several tabs showing the list of file properties, REST Service, Google Gadget or Netvibes Widget output messages, HTML, Google Gadget, ECM Template or Netvibes Widget files preview.

  - To show the file properties tab, click on the toolbar or go to View → Properties.

  - To show the file preview, go to Run → Show Preview from the top menu.

These panes are divided by the Horizontal Resize bar. Also, both Workspace pane and Content pane are divided by the Vertical Resize bar and the Vertical Resize bar.

At the right column are the Outline pane and Version pane:

- The Outline pane enables you to access tags, variables, functions and other file elements quickly.

- The Version pane is to navigate to the file versions.

### Tip

- The active pane is highlighted with a blue border.

- You can maximize or minimize one of the panes by clicking at the top right corner of this panel.

- You can do some basic actions, such as browsing, creating, editing, coping, renaming, uploading, downloading, moving, deleting files and folders via the toolbar or the top menu.

`See also`

- Select a workspace

- Copy/Cut/Paste files and folders

- Mange folders

- Manage files

- Search

- Versioning

## 1.2. Select a workspace

eXo IDE may provide access to one or more workspaces on the server. Each workspace has its unique URL.

### Note

In case the system allows only one workspace, the Select Workspace option will be hidden.

Select a workspace

1. Go to Window → Select Workspace... from the top menu.

2. Select your desired workspace and click OK to go to the appropriate workspace;

Or, simply double-click your desired workspace.

If you open eXo IDE without any current workspaces, the dialog asking you to go to Window → Select Workspace... appears as below.

Click Yes to open the Workspace form.

`See also`

- eXo IDE interface

- Copy/Cut/Paste files and folders

- Mange folders

- Mange files

- Search

- Versioning

## 1.3. Copy/Cut/Paste files and folders

1. Click your desired files/folders in the Workspace pane.

2. Select corresponding icons on the toolbar;

Or, select Edit on the top menu and then click your desired action from the drop-down menu.

Use the Paste function to paste your selected files or folders from one folder to another.

### Note

- The Paste function can only be enabled once Cut or Copy has been performed.

- eXo IDE does not support Copy and Cut functions for folders and/or files placed in the different folders. These functions are disabled if any item is selected at different levels.

`See also`

- eXo IDE interface

- Select a workspace

- Mange folders

- Mange files

- Search

- Versioning

## 1.4. Manage folders

- Open a folder

  How to open a folder in the Workspace pane.

- Create a folder

  How to create a folder in your desired target folder in the Workspace pane.

- Delete a folder

  How to remove a folder from the Workspace pane.

- Rename a folder

  How to rename a folder in the Workspace pane.

- Download a zipped folder

  How to download a zipped folder from the JCR Repository.

`See also`

- eXo IDE interface

- Select a workspace

- Copy/Cut/Paste files and folders

- Manage files

- Search

- Versioning

### 1.4.1. Open a folder

1. Select your desired folder in the Workspace pane.

2. Click the plus icon located next to the folder name, or double-click the folder item.

The path pointing to the current folder is displayed at the left corner of the Status bar.

### Note

To refresh content of a selected folder in the Workspace pane, click on the toolbar; or go to File → Refresh from the top menu.

### 1.4.2. Create a folder

1. Click your desired target folder in the Workspace pane.

2. Click on the toolbar, then select Folder... from the drop-down menu;

Or, go to File → New → Folder... from the top menu.

3. Enter the folder name in the Create folder form.

4. Click Create to complete creating your new folder.

### Note

- If any file is selected in the Workspace pane, there will be a folder created in the parent folder of this file.

- In case no item is selected in the Workspace pane, the created folder is placed in the root folder.

- In case of multiple selections, this function is disabled.

### 1.4.3. Delete a folder

1. Click your desired folder in the Workspace pane.

2. Click on the toolbar;

Or, go to File → Delete... from the top menu.

3. Click Yes to confirm your deletion in the Delete Item(s) form.

Files opened in the Content pane are closed after the folder containing them has been removed.

### Note

You cannot remove:

- Workspace root folder.

- Multiple items from different hierarchical levels at the same time.

The Delete Item(s) function is disabled in case of selecting the root item and/or multiple items on different levels in the Workspace pane.

### 1.4.4. Rename a folder

1. Click the folder you want to rename in the Workspace pane.

2. Go to File → Rename... from the top menu to open the Rename item form.

3. Enter the new name into the Rename item to field.

4. Click Rename to accept.

You can rename folders and sub-folders containing opened but unsaved files. You can save them after renaming the folder, no data will be lost.

If the new folder name already exists in the target folder, you will receive an error message as below.

### Note

You cannot rename the workspace root folder.

### Warning

Remember to undeploy all earlier deployed REST Services within the moved folder or sub-folder before renaming the folder.

### 1.4.5. Download/Upload a zipped folder

Download a folder from the JCR Repository

1. Click the target folder in the Workspace pane.

2. Go to File → Download Zipped Folder... from the top menu.

The zip-archive with folder content is prepared on the server and sent to the client. There will be a suggestion window for you to save the archive on your local device.

### Note

The archive uses UTF-8 encoding in entry names. Be sure that your zip extractor supports UTF-8 in file names. The Windows Explorer does not support it, you may use 7zip to unzip the archive. In Linux, the unzip (6.0 or below) command also does not support UTF-8 (depending on distributive). If you use KDE 4 as DE, you may configure Dolphin to use archive as folder by going to Settings → Configure Dolphin.. → Navigation, then selecting the Open archive as folder checkbox.

Upload a zipped folder

To upload a zipped folder to the workspace on the server, the folder must be packaged as the .zip archive.

1. Select a parent folder in the Workspace pane.

2. Go to File → Upload Zipped Folder... from the top menu.

3. Click Browse... in the Upload folder form to select a zipped folder from your local device.

4. Click Upload.

The zipped folder is uploaded to the server and automatically unzipped in the parent folder selected in Step 1.

## 1.5. Manage files

- Open a file

  How to display the content of a file in the Content pane, such as opening HTML and Google gadget files with the WYSIWYG editor instead of the default Code editor, opening and editing local files with the registered type within the Code editor or the WYSIWYG editor, or simply opening a file by its path.

- View and Copy a file's URL

  How to copy a target URL to the clipboard.

- Create a file

  How to create a file in a target folder in the Workspace pane.

- Save/Save As... a file

  How to save a file into another folder or with another name, and to save all files simultaneously created, opened or changed in the Content pane.

- Delete a file

  How to remove a file from the Workspace pane.

- Rename a file

  How to rename a file in the Workspace pane.

- Change the MIME type of a file

  How to change the MIME type of a file.

- Lock/Unlock a file

  How to lock/unlock a file.

- Download/Upload a file

  How to download a file from the server and to upload a file from your local device to the IDE Workspace.

- Use a file template

  How to save a file as template, to create a file from a template, and to remove a non-default file template.

- Use a project template

  How to use a project template which helps you create folders and files with the predefined structure and content.

- Open/Select/Close/Browse tabs

  How to open/select/close/browse tabs in the Content tab.

- Undo/Redo editing

  How to use the Undo/Redo function that allows you to restore your edited file content.

- Edit a file by Code Editor

  How to edit a file with the Code editor and WYSIWYG editor in the Content pane.

- Preview file properties/HTML files

  How to preview the file properties displayed in the Properties tab at the bottom of Content pane, and to preview the HTML file stored in the JCR.

`See also`

- eXo IDE interface

- Select a workspace

- View and Copy a file's URL

- Copy/Cut/Paste files and folders

- Mange folders

- Search

- Versioning

### 1.5.1. Open a file

To open a file in the Content pane, double-click the file item in the Workspace pane.

#### Open a file with the non-default editor

HTML and Google gadget files can be opened in either the default Code editor or WYSIWYG editor.

Open a file in the WYSIWYG Editor

1. Click the needed HTML or Google Gadget file in the Workspace pane.

2. Go to File → Open With from the top menu.

3. Select WYSIWYG editor and then click Open to show the selected file in the WYSIWYG editor.

If the target file has been opened in the Content pane before, the confirmation message will be shown.

Your selected file will be opened in the WYSIWYG editor as below.

If you want to change the default editor, simply select your desired editor and tick the Use as default editor checkbox in the Open File With form.

The new settings are stored in the User Settings File at the server. The selected editor will be the default editor in next sessions. The default editor is marked with the "Default" text in the Open File With form.

#### Open a local file

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.

#### Open a file by path

To open a file by its path, for example Example.groovy, do as follows:

1. Go to File → Open File By Path... from the top menu.

2. Enter the path of the target file into the File URL field.

3. Click Open to show the Example.groovy file in the new file tab of the Content pane.

You can select View → Get URL... from the top menu to obtain the file path.

### Note

- The target file should be placed at the same domain as the IDE.

### 1.5.2. View and Copy a file's URL

1. Select the appropriate item in the Workspace pane.

2. Go to View → Get URL... from the top menu to open the Item URL form.

3. Click OK to accept copying the target URL to the clipboard.

### Note

eXo IDE does not support copying multiple URLs to the clipboard at once. The Get URL... function is disabled in case of multiple files/folders selected.

### 1.5.3. Create a file

1. Click on the toolbar. Select a file type in drop-down menu.

2. Save the new file in some folders of the repository by selecting the target folder in the Workspace pane, then click on the toolbar;

Or, go to File → Save As... from the top menu;

Or, press Ctrl+S keys.

3. Type the name of the new file in the Save file as form.

4. Click Yes to accept creating the new file.

### 1.5.4. Save/Save As... a file

Save a file into another folder or with another name

1. Select the target folder in the Workspace pane.

2. Click on the toolbar;

Or, go to File → Save As... from the top menu;

Or, press Ctrl+S keys.

### Note

- If there is any file with the same name in the target folder, it will be rewritten by the Save As... command.

- If more than one file is created, opened and changed in the Content pane, you can save all of them simply by selecting File → Save All from the top menu. The Save All command does not have any effect on new files.

### 1.5.5. Delete a file

1. Select the target file in the Workspace pane.

2. Click on the toolbar;

Or, go to File → Delete... from the top menu.

3. Confirm the deletion in the Delete form.

Files opened in the Content pane are closed after being removed.

### Note

In eXo IDE, you cannot delete items from different folders simultaneously. The Delete... function is disabled in such cases.

### Tip

You can view the full path to the opened file when hovering your cursor over the file tab in the Content pane.

### 1.5.6. Rename a file

1. Select your desired file in the Workspace pane.

2. Go to File → Rename... from the top menu.

3. Enter the new name into the Rename item to field.

4. Click Rename to take effect.

### Note

If your new file name has been existing in the target folder, you will receive an error message.

### Warning

Do not forget to undeploy the REST Services if they were deployed before renaming.

### 1.5.7. Change the MIME type of a file

1. Select the desired file in the Workspace pane.

2. Go to File → Rename... from the top menu.

3. Select the new MIME type from Select mime-type combo-box;

Or, type another non-registered MIME type in this field.

4. Click Rename to change the MIME type.

### Note

You cannot open the file with the non-registered MIME type in eXo IDE.

### 1.5.8. Lock/Unlock a file

This feature is used to protect your files from being changed or removed by another users.

You can lock or unlock the file by clicking on the toolbar;

Or, going to Edit → Lock/Unlock File from the top menu.

The icon is located next to the title of the locked file in the Workspace pane and at the title of this file tab in the Content pane.

Another users can open the locked files in the only-read format, but cannot edit, save, delete, move or rename them.

### Warning

If you open the locked file with the WYSIWYG editor, you can edit its content, but the Save function is disabled.

### 1.5.9. Download/Upload a file

Download a file from server

1. Select the target file in the Workspace pane.

2. Go to File → Download... from the top menu.

The file will be sent to the client and the suggestion window will be shown for you to save the file into your local device.

Upload a file

You can upload a file from your local device to the IDE Workspace.

1. Select the Gadget folder in the Workspace pane.

2. Go to File → Upload File... from the top menu.

3. Click Browse... to select your desired file from the local device.

4. Select the appropriate MIME type if needed.

5. Click Upload.

The `gadget.xml` gadget is uploaded to the server and placed in the Gadget folder.

### 1.5.10. Use a file template

File Template is stored in the IDE registry file, and then can be used to create another files with the same MIME type.

#### Save a file as template

1. Go to File → Save As Template... from the top menu.

2. Enter the template name.

3. Define the brief description of the template.

4. Click Save to accept.

You can also save the uploaded file as template.

### Note

The template will have the same MIME type as the selected file.

#### Create a file from a template

The File From Template... function enables you to create a file from the predefined template.

Create a simple gadget XML file

1. Click on the toolbar and select File From Template... from the pop-up to open the form;

Or, press Ctrl+N hotkeys.

2. Select your desired type and template for the file.

3. Enter the name into the File Name field, and click Create to complete adding your new file.

The newly created file is opened automatically in the Content pane.

#### Remove a non-default file template

1. Click on the toolbar.

2. Select File From Template...;

Or, press Ctrl+N hotkeys.

3. Select the needed non-default template in black and click Delete.

The confirmation message will appear for you to verify your deletion.

### Warning

After deleting the file template which has been used in the project template, a new project will be created from such project template without this file.

### 1.5.11. Use a project template

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.

#### Create a project template

1. Go to File → 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.

#### Modify the project template structure

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 File to open the Add file 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.

iii. 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.

#### Create new project from template

1. Select the parent folder in the Workspace pane.

2. Click on the toolbar and then select Project From Template... from the drop-down menu;

Or, go to File → New → Project From Template... from the top menu.

3. Select your desired project template from the templates list.

4. Enter the project name into the Project name field.

5. Click Create.

#### Remove a project template

1. Click New → Project From Template... on the toolbar;

Or, go to File → New → Project From Template... from the top menu.

2. Select your desired target project template from the list.

3. Click Delete.

### 1.5.12. Open/Select/Close/Browse tabs

To switch to the necessary file, click the tab title with the appropriate name.

To close the file, just click on the tab title.

Click , or at the top right corner of the Content pane to browse tabs.

### Note

You can view the full path to the opened file when hovering your mouse over the tab title.

You can see some useful commands represented with special buttons on the toolbar and in the Edit from the top menu: Undo/Redo Typing, Format, Show/Hide Line Numbers.

### 1.5.13. Undo/Redo editing

Your actions performed with the text are added to the history as a distinct batch after each pause, saving you from fear of doing something wrong. So, you can restore your file content by using the Undo or Redo functions.

Undo editing

The Undo command in eXo IDE helps you obtain your desired changes, such as formatted text, moved blocks, deleted text by following either of two handy ways:

- Press Ctrl+Z.

- Click on the toolbar.

### Note

The Undo function is disabled in case of no new changes in your text. To undo the Undone action, use the Redo function.

Redo editing

After you have undone your performed action on the text but unfortunately what recovered is not satisfactory, simply click the Redo function to set back. The Redo function is used in the following cases:

- Get exactly whatever the Undo command does. For example, if you type some text, Undo deletes the text, and Redo recovers the deleted text.

- If you use Undo to recover your deleted text, Redo will delete the text again.

The Redo function can be performed via one the two following ways:

- Press Ctrl+Y.

- Click on the toolbar.

### Note

- Redo is available only after Undo was performed.

- In the Code editor, the Undo/Redo functions are disabled in case of no changes in the Undo/Redo history.

- Each file opened in the editor has its own history.

### 1.5.14. Edit a file by Code Editor

### Note

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.

Format a file

In the Code editor, Format is to adjust row indentations of the HTML, Groovy, JavaScript, XML content with two spaces by default. To do this, click on the toolbar, or go to Edit → Format from the top menu.

Watch the cursor position in the Status bar

When the editor is opened, the current cursor position is shown in the Status bar. The first number is the line number and the second is the column position.

### Edit a file with the WYSIWYG Editor

Besides the Code editor, you can open and edit HTML files and Google Gadgets with the WYSIWYG editor based on the CKEditor. You can set the WYSIWYG editor for those files by default.

Currently, the WYSIWYG editor can be used to edit the HTML, Google Gadget or Groovy Template files.

The WYSIWYG editor does not support the line numbering, auto-indentation and format, code coloring, auto-complete, code outline or type error validation. However, the text edited with the WYSIWYG editor looks similar to published results. This editor has many common editing features as working in Microsoft Word, or OpenOffice.

To open a file with the WYSIWYG editor, see the Open a file with the non-default editor section above.

#### Show/Hide Line Numbers & Go to/Delete a line

Show Line Numbers

Go to Edit → Show Line Numbers from the top menu.

The Show Line Numbers is turned into Hide Line Numbers. You will see the left vertical grey area in all opened files.

Hide Line Numbers

Go to Edit → Show Line Numbers from the top menu.

The last selected settings are saved in the browser cookies for next sessions.

Go to a line

1. Open the Go to Line form by following one of the listed below ways:

- Select Edit → Go to Line... from the top menu.

- Double-click the area showing the current cursor position in the Status bar.

- Press Ctrl+L.

2. In the Line number, type a number within the allowable range, and click Go. If you enter the out of range number, there will be an error message.

### Note

If Ctrl+L does not work, use the hot key manager to customize your hotkeys.

Delete a line

1. Put the cursor on the desired line.

2. Use Edit → Delete Current Line command from the top menu;

Or, press Ctrl+D to remove the highlighted line from the file.

#### Find/Replace

This function is commonly used in text files to quickly search for a specific word/phrase and to replace the text as follows:

1. Open your desired file.

2. Open the Find/Replace form by following one of the ways described below:

Select on the toolbar;

Or, go to Edit → Find/Replace... from the top menu;

Or, press Ctrl+F.

3. Enter the word/phrase for which you want to search into the Find field.

4. Click to do the search.

Once the text has been found, and if you want to replace the found phrase, continue doing the next steps:

5. Enter the replacement text into the Replace with field.

6. Click Replace or Replace/Find to replace the current selected found word/phrase, or select Replace All to replace all the matched phrase.

### Note

- All functions in the Find/Replace form are only effective with the lines from the current position of the cursor to the end of the file.

- Replace and Replace/Find are only active if the text is found.

- Check the Case sensitive field to do the search based on differing the use of uppercase and lowercase letters.

- If you do the Find/Replace action with one file and then switch to another, this form will save the status of performed actions of the opened file in each editor.

#### Code auto-complete

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.

### Note

- Use Alt+Space hotkeys instead of Ctrl+Space in the Mac OS.

- Click the outside area of the form to quit the Auto-complete form.

- Press Esc to discard the Auto-complete form.

##### JavaScript Specific auto-complete list

There are some special template tokens in the auto-complete list to insert the code template. For example, the if-condition template is shown as below:

    if (condition)
    {

    }

Template tokens have the special icon as shown in the Auto-complete form and tokens of different types are marked with different colors, including:

Token | Marked color
--- | ---
Function name | Green
Variable name | Red
Javascript key | Grey

##### CSS specific auto-complete list

In the CSS file, the auto-complete list contains all the properties of Cascading Style Sheets. They are marked with the yellow token icons.

##### HTML specific auto-complete list

There are two HTML auto-complete lists: one of all HTML tags, and the other of all properties of the pointed tag.

Also, you can call the CSS properties and JavaScript auto-complete list if your current cursor position is inside <style> or <script> tags respectively.

##### XML specific auto-complete list

For the XML files, there is only one auto-complete list for the previously typed tag. There is no schema or namespace analysis.

##### ECM template auto-complete list

Currently, the auto-complete list of the ECM Template files is the same as that of the HTML files. Moreover, the content between Groovy tags <% %> is ignored.

##### Netvibes widget auto-complete list

The auto-complete list of the Netvibes Widget files is the same as that of the HTML files.

The auto-complete list inside JavaScript tags is the composition of the JavaScript auto-complete list and Netvibes snippets:

- JSON request snippet

- Flash object snippet

- Pager Control snippet

- Tabview Control snippet

- Thumbnailed List snippet

eXo IDE supports auto-complete for Netvibes Universal Widget.

It is possible to auto-complete the created Netvibes object's properties and methods.

You can get more details about this snippets and code that will be inserted via the hint window of the Auto-complete form.

##### Groovy code specific auto-complete list

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:

- <local variable name>

- <object's field name>

- <static field name>

- <method's parameter name>

- <class name>

- @<annotation name>

- in the line after the space

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:

    [ERROR] Error (500: Internal Server Error)
    startup failed, /ide-project/data/Pojo.groovy: 9: unexpected token: vpid @ line 9, column 3.
    vpid fg(){
    ^

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:

- Be located in folder with respect to package structure.

- Have the same file name as the class name located in a file.

- Have the .groovy or .grs extension.

The Groovy code specific auto-complete list supports 5 cases as follows:

- Class name

- Object's fields and methods auto-completion

- Static fields and methods auto-completion

- Annotations auto-completion

- Local variables and parameters auto-completion

Class name

You can view class's JavaDoc and class name from the Auto-complete form. eXo IDE provides appropriate import statement into the file header automatically, if needed. There is a list of default packages for the Groovy code and so are imported explicitly:

There is a list of default packages for the Groovy code and so are imported explicitly:

- java.lang

- java.io

- java.lang

- java.math.BigDecimal

- java.math.BigInteger

- java.net

- java.util

- groovy.lang

- groovy.util

Object's fields and methods auto-completion

You can also view JavaDoc and auto-complete the object's fields and methods as follows:

1. Print the instance name with the dot (.) at the end.

2. Press Ctrl+Space to view all public methods and fields of the object. The JavaDoc for the selected field or method is shown.

3. Select the appropriate item in the Auto-complete form and press the Enter key; or double-click this item.

Static fields and methods auto-completion

eXo IDE supports the auto-completion of static fields, methods and object's fields and methods.

### Note

The auto-completion for methods and fields of the class or instance can only work if it is called after the symbol ".".

Annotations auto-completion

It is possible to auto-complete the annotations, followed by the symbol "@". The Auto-complete form for annotation contains the list of available annotations like this:

Local variables and parameters auto-completion

Local variables and method's parameters are marked with in the Auto-complete form. eXo IDE supports the auto-completion for local variables and method's parameters.

Besides, the keywords of Groovy code are not marked with icons in the auto-complete list.

##### Validate Java types and fix import statements

If you forget to insert the import statement, the line with error will be marked as follows.

View and fix the Java types error

1. Hover the cursor over error marks to see the error message in tooltips.

2. Click the error icon in the Line numbers field.

3. Select the appropriate import statement and press the Enter key; or double-click to insert it into the header of the file.

#### Code outline

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.

Code outline for Groovy Code

In the Outline pane for the Groovy code of REST Service, ECM Template, POGO and Data Object files, you can see not only names and types of your classes, variables, methods, fields, or parameters, but also their modifiers and annotations in the view of icons and tooltips.

The following table lists icons connected to different access modifiers.

Access modification | Icon
--- | ---
private | Red square
public | Green circle
protected | Yellow rhombus
without access modifier | Blue triangle

The following table lists letters placed over the node icons of outline node and one icon connected to special modifiers.

Letter/Icon | Modifier
--- | ---
a | Abstract
s | Static
f | Final
t | Transient
v | Volatile
Clock | Synchronized

Class or method with annotation(s) is displayed with the "@" symbol near the title in the outline tree. To see the full list of annotations, hover your cursor on "@".

### 1.5.15. Preview file properties/HTML files

Connected with the JCR repository node, file properties are displayed in the Properties tab at the bottom of Content pane.

View file properties

1. Open the file in the Content pane.

2. Click at the right corner of the toolbar;

Or, go to View → Properties from the top menu.

### Note

It is impossible to view the properties of files created but unsaved yet.

The history of opened files is saved in browser cookies, so you can see all the file tabs opened even after refreshing the browser window.

Preview HTML files

To preview the HTML file stored in the JCR, simply click on the toolbar;

Or, go to Run → Show Preview from the top menu after opening the HTML file in the Content pane. The content of the HTML file is opened as a webpage in the Preview tab.

### Note

- You cannot view files created but not saved yet.

- Unsaved changes are not displayed when you edit the HTML file.

## 1.6. Search

Search files

1. Select the target folder or root folder in the Workspace pane.

2. Click on the toolbar;

Or, go to File → Search... from the top menu to open the Search form.

3. Set parameters for two criteria fields, including Containing text and MIME type. If those fields are empty, the gadget will display all files in the search results.

4. Click Search.

The found results are displayed in the Search pane:

Within the Search pane, you can only open found files, edit, save, save as template, or perform some specific operations, such as deploying for services, and going to the parent folder in the Workspace pane.

If you maximize the Editor pane, Properties, Output, Outline or other panes, the default perspective will be restored to show the Search tab when you receive search results.

Search the location of an opened file

This feature will help you quickly find the location of a file opened in the Content pane.

1. Select an appropriate file tab in the Content pane.

2. Go to View → Go to Folder from the top menu.

Your selected file will be highlighted in the Workspace pane. Similarly, you can localize the found file from the Search tab.

## 1.7. Versioning

- View version history

  How to view the version history of a file which is being opened/selected.

- Version navigation

  How to navigate to any older or newer versions of an opened file.

- Restore a file to the older version

  How to restore a file to its older version.

eXo IDE provides the versioning that enables you to realize the versions history of the file.

A new version of the file is created each time after the file content has been saved by clicking Save. There is no version in the version history after the file had been created only.

`See also`

- eXo IDE interface

- Select a workspace

- View and Copy a file's URL

- Copy/Cut/Paste files and folders

- Manage folders

- Mange files

- Search

### 1.7.1. View version history

To view the version history of the file which is being opened/selected, click at the right part of the toolbar;

Or, select View → Version History... from the top menu.

The Version pane with content of the latest version are opened at the right column of the eXo IDE window.

The version name is displayed in the title of the Version pane.

### Note

- If the selected/opened file is not versioned yet, the View Version History function will be disabled.

- The file version is opened in the read-only mode so you cannot edit it.

- If any files are opened, the Version pane of the previously opened file will be closed automatically.

### 1.7.2. Version navigation

With eXo IDE, you can navigate to any older or newer versions of the opened file.

To view the older/newer version of the opened file, click or on the toolbar, or select View → Older Version/Newer Version from the top menu. If there is no newer/older version, the View Newer Version/View Older Version command will be disabled respectively.

View another version from the versions history

1. Click on the toolbar;

Or, select View → Version... from the top menu.

2. Select the target version.

3. Click Open or double-click the version item.

Versions are listed in the reverse order, with the latest version first.

### 1.7.3. Restore a file to the older version

1. Click at the right corner of toolbar, or select File → Restore To Version from the top menu.

2. Click Yes in the confirmation message to restore to the version.

### Note

The Restore version command is disabled, if the latest version is displayed.

Copyright © 2009-2012. All rights reserved. eXo Platform SAS