better method to recognize CodeRay 1.2 API
API didn't change after all, reverting switch