Lombok-intellij-plugin: Importing @Builder generated builder classes does not work

Created on 4 Apr 2014  路  16Comments  路  Source: mplushnikov/lombok-intellij-plugin

For example, if I have:

@Builder
public class Test
{
  private int foo;
}

This will generate an internal class named TestBuilder. If I then try to import it in another class like import Test.TestBuilder it thinks the class doesn't exist.

However, I can still import the class Test and assign the builder to a new variable like Test.TestBuilder builder = Test.builder(); but I would like to just reference the builder class itself if possible

enhancement

Most helpful comment

if you are usinng intelliJ, you can install the lombok plugins to let IntelliJ knows that the references are preCompiled

All 16 comments

:+1:

:+1:

+1

+1

:+1:

+1
Are there any workarounds?

+1

+1

I still have the problem. While googling I saw that this issue has been resolved. I am using lombok-plugin-0.8.8 and still the issue is not resolved and there is compile errors while making the project from intellij.

There is an ugly hack though.
If the @builder errors are thrown in finite number of places, create the builder classes yourself, that is, write the code which is supposed to be generated(I said ugly hack). This will help you get rid of the compilation errors in intellij. If the number of places you have to add this is more, think twice.

+1

:+1:

+1

+1, really drives crazy...

+1

if you are usinng intelliJ, you can install the lombok plugins to let IntelliJ knows that the references are preCompiled

if you are usinng intelliJ, you can install the lombok plugins to let IntelliJ knows that the references are preCompiled

brilliant! thank you so much

Was this page helpful?
0 / 5 - 0 ratings