Question

In my Struts2 action, the getters and setters are not being used according to IntelliJ IDEA. Which obviously isn't the case. They are both greyed out and have the grey squiggly lines underneath them. Is there anyway to tell IntelliJ IDEA they are being used?

I'm new to IntelliJ IDEA, and I did not have this problem with Eclipse.

Was it helpful?

Solution

IntelliJ IDEA marks grey unused methods or fields if they are not used in the code. You could check that with highlighting a word and press Alt+F7. If you do this with grey word it will show a message that "No usages found". This means that usages in your code, it doesn't include a reflection API code. IntelliJ IDEA use inspections to highlight elements of the code if it doesn't comply the rules defined in the inspection profile which you can configure if you click on the man icon in the status bar. Also, there you can choose a highlighting level.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top