public static String resolveTypeName(IType context,String typeName) throws JavaModelException {
  String[][] matches=context.resolveType(typeName);
  if (matches == null) {
    return null;
  }
  String matchPckg=matches[0][0];
  String matchType=matches[0][1];
  if (matchPckg.length() == 0) {
    return matchType;
  }
  return matchPckg + "." + matchType;
}

public static String resolveTypeName ( IType context , String typeName ) throws JavaModelException { String [ ] [ ] matches = context . resolveType ( typeName ) ; if ( matches == null ) { return null ; } String matchPckg = matches [ 0 ] [ 0 ] ; String matchType = matches [ 0 ] [ 1 ] ; if ( matchPckg . length ( ) == 0 ) { return matchType ; } return matchPckg + "." + matchType ; }
resolves a type name to a fully - qualified name . < p > note : this only returns the first match on ambiguous lookups .
