Static Import Incorrectly Shown as Unused (Gray)
Hi,
I have a Grails controller class with a static import of a method that is used (called in an action closure), but JetGroovy labels it "Unused import" and shows it in gray.
(Upon seeing the "unused" status indication, I mindlessly commented it out, leading to an exception at run-time when it could no longer be called!)
I'm running IDEA 7.0.3 and JetGroovy 1.5.16466 running under Sun JVM 1.6.0_04 on Linux.
Randall Schulz
请先登录再写评论。
Hi,
I got bit by this again. Of course, it shows up immediately in testing, but it would be nice if the "unused import" indication were accurate (or else disabled).
Randall Schulz
Fixed. BTW, you don't need to remove imports manually, you can use optimize imports feature available for groovy as well.
Will the automated import override the spurious "unused" status currently assigned by JetGroovy?
Additionally, because IDEA invariably alters my code formatting (mostly surrounding horizontal white-space), I avoid automated refactorings for trivial things like import fix-up. Cleaning up afterwards is just too time-consuming. Also, I often just want (currently) unused imports commented out so I can easily reinstate them.
RRS