1

My problem is that I have lombok used in my project and intellisense doesn't recoginze it's packages and annotations.

What I have done:

  1. dependency added to maven pom.xml (jar appears in "External Libraries")

  2. lombok plugin installed via "Settings -> Plugins -> Browse repositories"

  3. "Enable annotation processing" enabled in "Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors"

  4. IntelliJ Idea restart with invalidate cache

  5. Project rebuilded

Strange thing is that project get's builded without any errors and works perfectly. I just can't see this package in IntelliJ and it's cumbersome, because a lot of code is "red". My current IntelliJ IDEA version is 2017.3.1. I've looked up in every post simillar to my problem and tried every method (including reinstalling plugin, doing everything again, changing order in things that were done etc.), but it still doesn't work.

Kamil Przybyo
  • 115
  • 1
  • 8
  • When you move your mouse cursor over the "red" code, what it says ? – whatamidoingwithmylife Jan 16 '18 at 08:14
  • On "import lombok.*" it's "Package not found: lombok". On annotations etc. it's "Cannot resolve symbol (..)". – Kamil Przybyo Jan 16 '18 at 09:26
  • Can you please go here: https://projectlombok.org/download, download the lombok and manually add it to the libraries, if you don't know how to do it, let me know. – whatamidoingwithmylife Jan 16 '18 at 11:59
  • @EdinMujakic I did it through "File -> Project Structure". Here I've tried to add it in "Project Settings -> Libraries" and also in "Platform Settings -> Global Libraries". Both cases failed. I've restarted IDE after adding lib, but still everything was red. Is it possible to be lombok plugin version issue? I haven't tried installing other version than this in IntelliJ Idea brwose repository. – Kamil Przybyo Jan 16 '18 at 13:58
  • Go to Project Structure, Modules, click on Dependencies tab, click on the green + (add) button and select the .jar file you downloaded. – whatamidoingwithmylife Jan 16 '18 at 14:06
  • @EdinMujakic I did it this way too, but still it didn't helped. – Kamil Przybyo Jan 16 '18 at 14:43

1 Answers1

0

I've solved issue. The problem Was that IntelliJ Idea mistakenly created projects from my main project and they were in conflict. Under "File -> Project Structure" I had 5 different projects which were created from and they still were included in this one that was separate from them. All I had to do was to delete those wrong projects.

Kamil Przybyo
  • 115
  • 1
  • 8