Hi I'm using Project Lombok (version 0.11.2) in a project. I have both Intellij, and Eclipse (STS) installed, with lombok integrated with both IDEs (STS, via the lombok JAR, IntelliJ via the plugin [version 0.4, released 22/01/12]).
When I try to use the 'val' data type in IntelliJ, it fails to recognise the resulting types, however the same code works in STS.
Is this an issue with the IntelliJ plugin, or does the plugin just not support this feature?
val types were added in lombok 0.10.0, so are not a new feature.
Lombok.val allows you to. use val as the type of a local variable declaration instead of actually writing the type. When you do this, the type will be inferred from the initializer expression. The local variable will also be made final.
Lombok plugin[Preference->plugins->browse repositories->search 'lombok'->install and restart idea. Preference ->search 'annotation'->enter annotation processor ->enable annotation processing.
What is Lombok. Project Lombok (from now on, Lombok) is an annotation-based Java library that allows you to reduce boilerplate code. Lombok offers various annotations aimed at replacing Java code that is well known for being boilerplate, repetitive, or tedious to write.
At this time, according to the documentation of the Lombok IntelliJ Plugin, this is not yet supported.
Disclosure: I am one of the core Lombok developers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With