Eclipse for Roo Project AutoComplete

I have a Roo project where I created a couple of entities, and when I load the project in Eclipse, it loads fine, but if I i.e. I create an instance of MyEntity entity , and then I write entity. I do not get any properties (i.e. getMyField) in the autocomplete list. If I write entity.getMyField() , it compiles in the order that aspects care about. How to enable autofill features generated by aspects?

Greetings

Nick

+4
source share
2 answers

What type of eclipse are you using? Do you have AJDT installed inside your eclipse? If so, there is still the option to disable JDT weaving. The note below (taken from the Roo documentation) should help you enable JDT weaving (Window -> Preferences> JDT Weaving.

When using AJDT, you may be asked whether to enable JDT weaving. You must choose to enable it to provide the Java editor in Eclipse (or STS) gives you the best AspectJ-based Experience. You can also make sure that this setting is active loading Eclipse (or STS) and choosing Window> Preferences> JDT Weaving.

By the way, did you decide to try the Spring Source Tool Suite ? There you will find that all plugins (AJDT support ...) are already installed. And it fits very well for Roo, as it offers Roo functionality from within an eclipse.

+3
source

I had the same problem as niklassaers: Roo AspectJ methods that don't show up in eclipse autocomplete when compiling in order. I use the latest version of STS with AJDT installed by default and checked that JDT Weaving is active, but the problem persists.

On the other hand, I found out that doing Maven > Update project... (Alt-F5) makes the ROO AJ methods visible for automatic completion.

This decision may be related to the way I structured my project (I have two eclipse Maven projects in my workspace, myproject.data , containing the roo classes using the aj and myproject.services methods acting as the client for these classes); Also, I have to repeat Alt-F5 every time I open my workspace, but this seems to work.

I would like to better understand the causes of this problem with code completion and maybe find some way to solve the problem forever without having to update maven projects every time. Could this be due to the interaction between the AJDT plugin and the mavenlipse Maven plugin?

+1
source

Source: https://habr.com/ru/post/1306101/


All Articles