In my current project I'm working with Java
, Spring Boot
and .aj
files. However, the main problem about work with AspectJ
is that there are not a lot of IDEs that supports this feature.
Eclipse (and i think that netbeans too) supports the AspectJ language because I've used it in the past. However, I've worked with IntelliJ and Visual Studio Code IDEs during the last years and I don't really want to come back to Eclipse (or Netbeans). :)
Also, I know that the Ultimate Version of IntelliJ
has support to AspectJ. The problem is that you must have an IntelliJ license to use it.
https://www.jetbrains.com/help/idea/enabling-aspectj-support-plugins.html
I started to create a new language server
for the Visual Studio Code to manage the .aj
files. I'm following this guide.
https://code.visualstudio.com/docs/extensions/example-language-server
The .aj
files are now correct colored and shows a valid syntax!
However, I'm getting errors in the Java code. Check this schema about the AspectJ description:
As you could see, I have a .java
file called Point
and I want to have some methods divided in some .aj
files. When the project is compiled, I'll have just one Point.class
that includes the methods clone()
, compareTo()
, etc.
Also, another possible use is that if my .java
class implements some interface, I'm able to implements the methods in a .aj
file.
Problem: I'm not able to see my Java project without errors because the .java
files and the .aj
files are not "synchronized", so the .java
class says that needs to implements some methods although they're defined in the .aj
file.
Someone could help me with tips about language server development?
Regards,