문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top