converts the given selection into a type using the following rules : if the selection is enclosed by a type than that type is returned . if the selection is inside a compilation unit or class file than the primary type is returned . otherwise null is returned . concode_field_sep PlaceHolder placeHolder concode_field_sep IType convertToEnclosingOrPrimaryType concode_elem_sep IType convertToEnclosingType concode_elem_sep IType getEnclosingType concode_elem_sep IType getEnclosingType
IType function ( JavaTextSelection arg0 ) { final IJavaScriptElement loc0 = arg0 . resolveEnclosingElement ( ) ; if ( loc0 != null ) return convertToEnclosingOrPrimaryType ( loc0 ) ; return null ; }