Is there a simple way to check is some type imported? Basically, I have a code that I need to inject into some Java editor and I have all the bindings related to that code. What I need to is to check is some type, that is referenced in the code to be injected, imported within the targeted editor. I can get import statements and its binding but there seems to be none built-in functionality to achieve this check. Did I maybe miss it or I'll need to hack around it?

Simplified checking if a type is imported is probably not exposed (I may be wrong) because the typical way of dealing with imports is to use org.eclipse.jdt.core.dom.rewrite.ImportRewrite, if you're performing your changes by ast rewriting that is.

If you want to see example usage, just search for callers of org.eclipse.jdt.core.dom.rewrite.ImportRewrite.addImport(ITypeBinding, ImportRewriteContext).