RubyMine: How to find out if cursor is in injected code?

Good day, everybody. I'm writing a plugin for RubyMine and I have a question. Is there any way to check if cursor is in injected ruby code at the moment, i.e. between <% and %> ?   Of course, I can check it manually in document, but if this feature is implemented, I want to use it, because it can be useful for checking all other languages injections (ex. php in html). I see that it's implemented in some way, because RubyMine shows "Ruby injection" text on the top of editor when cursor gets between <% and %>, but how can I use it? Thanks.

Please sign in to leave a comment.