How to refresh Lombok annotation processing in IntelliJ? - intellij-idea

Suppose part of annotations are not processed. Below you see setMinLatitude() setter is not discovered:
Simultaneously all getters are seen:
Building of project works fine, only IntelliJ hits are not up-to-date.

For me "Build -> Rebuild project" fix this kind of issues.

Go to build > Rebuild Project that will fix your problem
by the way you can use the annotation #Getter and #Setter on the
class filed and it will generate for all the members in the class

I've had this problem when I've updated IDEA to a newer version, but the Lombok plugin wasn't automatically updated, and the existing version of the plugin was incompatible with the new version of IDEA. I didn't notice anything obvious to suggest that the plugin was the issue with annotation processing failures. Pulling up the "Plugins" settings (IntelliJ IDEA -> Preferences... -> Plugins on macOS) made it obvious that the plugin was no longer supported and needed to be updated. Updating the plugin and restarting immediately fixed the issue.
This probably doesn't apply in your case where some of the Lombok annotations are being processed, but will hopefully be helpful for others who have this issue.

Related

"No such property" when refreshing project in IntelliJ IDEA Ultimate

I have a groovy project in IntelliJ Ultimate 2017.1.5 based on gradle. I'm using groovy 2.4.4. My IDEA is set up to run gradle with gradle 4.0.2.
Gradle 'webclient' project refresh failed
Error:No such property: from for class: org.gradle.api.internal.tasks.DefaultTaskOutputs$TaskOutputUnionFileCollection
Unfortunately, nothing in IntelliJ tells me where this error comes from. All I know is, from the package name, that it has to do with gradle. This IDE is seemingly really unhelpful. It either works, which is rarely, and when it doesn't work, doesn't give you much error reporting.
I found a work-around. If I add
apply plugin: 'idea'
To the top of my module's build.gradle
and run
./gradlew idea
It downloads my dependencies in to the right place (where, IDK, but it works - im guessing IDEA knows how to find my local ~/.gradle repo).
But refreshing the project from the UI still fails. It would be nice of IntelliJ told you what it's doing. I don't know why they want to hide everything it's doing, when the system is so brittle and breakable.

FindBugs in Intellij Idea doesn't refresh the result

Intellij Idea - version 14.1.3. Installed Findbugs plugin (v.0.9.997) and run once.
After fixing found bugs, I run it again but unfortunately the plugin still shows the same list of errors, ignoring my changes. Some of errors even point to the nonexisting lines (which I deleted).
Tried to invalidate IDE cache (with restarting), nevertheless it didn't help.
Could you please assist?
Unlike IntelliJ IDEA's built in inspections, FindBugs uses the class files to find problems, not the source files. Make sure you compile your project after fixing the problems, otherwise FindBugs will keep seeing the problems in the out-of-date class files.

Is it possible to customize IntelliJ IDEA 14.0's "Refresh all Gradle projects" / Gradle projects sync behavior?

When I hit the Refresh all Gradle projects button in IntelliJ IDEA, it uses its built-in Gradle scripts comprehension mechanism to produce the IDE's build configuration. However, it doesn't always do exactly what I want. Is there a way to customize its behavior? Perhaps make IDEA understand Gradle's IDEA plugin?
Experiments show that IntelliJ IDEA is completely oblivious to the apply plugin: 'idea'. There is no auto-complete and no Gradle tasks from it are recognized. The IDEA's Gradle integration roadmap linked from Gradle's tooling page is severely outdated and doesn't seem to mention anything on this subject.
IntelliJ is affected by apply plugin: 'idea' (which should always be done) and (some of the) related configuration in the build script. There is already quite some auto-completion, but obviously it's not perfect yet. Expect improvements with every new IntelliJ and Gradle release.
For now, if you want utmost customizability, consider generating the IntelliJ project with gradle idea, rather than using IntelliJ's Gradle integration.

IntelliJ 12 + Gradle 1.3 - Basic Gradle syntax seems non-functional

I am attempting to play around with Gradle integration in IntelliJ Idea (Ultimate) v12.
It seems even if $GRADLE_HOME is configured properly, basic syntax such as 'apply', 'dependencies', etc. is not recognized.
I would seem like the solution should be something simple. Any help is appreciated.
IntelliJ IDEA doesn't currently offer syntax completion for Gradle build scripts. All you get is the standard Groovy support.
I was having the same problem until this morning. I did the following steps and it solved itself:
added the root build.gradle file (we have several) to the JetGradle tab and refreshed
updated to IDEA 12.0.1 (it restarts and reindexes)
I think doing the first one and restarting may be enough, but I'm not sure.
I'm using Intellij 13 and have had similar problems. What I noticed was, creating a new Project from Intellij (i.e. new Groovy Project or Gradle project), I get the syntax error markers. I also have noticed it didn't do a good job pulling in Gradle dependencies.
On the other hand, if I Import a Project through an already created build.gradle file, the syntax error markings go away and the dependencies seem to play more nicely. Not sure if this works for you.
With Intellij 14 and Gradle 2.3 I found that adding {$GRADLE_HOME}/lib and {$GRADLE_HOME}/lib/plugins as libraries in my project settings got rid of all the warnings like "dependencies cannot be applied to groovy.lang.Closure".

Working with IntelliJ + Spring Data + AspectJ

I am attempting to work with a Spring Data Graph project in IntelliJ 11.1.4 Ultimate edition. The project builds fine but the editor says that the persist() method on my classes annotated with #NodeEntity can't be found. Additionally, none if the aspect enhanced methods, like persist, show up for auto-complete suggestions.
I am using the AspectJ Support plugin and I have the compiler set to AJC. Both IntelliJ and Maven can build and run the project, it appears that the editor is the only piece that has the problem.
Am I missing something obvious? Is this a limitation of IntelliJ? I thought 11.1.4 addressed this but I might be mistaken.
Unfortunately AspectJ support isn't fully implemented yet - though resolve and completion should work. Could you please file a ticket in the tracker with a small demo project attached?