Why IntelliJ needs Lombok plugin?

后端 未结 3 1455
忘掉有多难
忘掉有多难 2021-01-12 14:46

As far as I understand, Lombok uses Java\'s Annotation Processors to generate additional methods.

With Maven 3.5 it works perfectly without adding any additional con

3条回答
  •  礼貌的吻别
    2021-01-12 15:23

    It's because IDEA syntax highlighter uses internal Java parser. If IDEA used just javac, then it wouldn't be able to highlight syntax errors as you type. It also gives much better hints about wrong code, so each Java construct, feature or annotation must be implemented by JetBrains team or there's plugin for it like in this case.

    Annotation processing option is just for building project which is done via javac, but it's not for syntax highlighting.

提交回复
热议问题