1.5.14.3.7. 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:

IDE compiles classes, which are described in the project's classpath, before generation of the auto-complete list. If the compilation of some classes is failed, the error message will appear in the Output panel 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:

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

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:

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.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus