* @throws CoreException
* @throws Exception
*/
protected ITypeBinding getTypeBinding(String content, int fromIndex)
throws CoreException, Exception {
Program program = createAndParse(content);
// locate the expression to test
int indexOf = locateElement(content, fromIndex);
Expression expr = (Expression) program.getElementAt(indexOf);
// resolve binding of the expression
ITypeBinding type = expr.resolveTypeBinding();
return type;
}