Checking Java Files for Errors

I am compiling Java classes when they are saved in order to HotSwap them afterwards. In order to avoid unnecessary compilation I would like to figure out when IntelliJ has discovered errors in the code.

Is the an easy way to check that?

Thanks - Andy Schaefer

2 comments
Comment actions Permalink

The easiest API to use is probably CodeSmellDetector.findCodeSmells(). You can also see how it's implemented and implement something similar if its exact behavior is not suitable for you.

0
Comment actions Permalink

Thaks. that worked fine. I had to change my code because of some of the restrictions (Dispatcher but not Write Access Thread).

0

Please sign in to leave a comment.