FileCodeModel2::CodeElementFromPoint Method (TextPoint^, vsCMElement)

 

Returns a code element at a specific location in a source file.

Namespace:   EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

CodeElement^ CodeElementFromPoint(
	TextPoint^ Point,
	vsCMElement Scope
)

Parameters

Point
Type: EnvDTE::TextPoint^

Required. A TextPoint object representing the editor location for which you want a code element.

Scope
Type: EnvDTE::vsCMElement

Required. A vsCMElement value representing the code element of the specified type that contains the editor location.

Return Value

Type: EnvDTE::CodeElement^

A CodeElement object.

CodeElementFromPoint returns the code element associated with the TextPoint based on the specified scope or granularity of containment. If no code element of the specified type contains the editor location, then CodeElementFromPoint fails.

No code example is currently available or this language may not be supported.
Return to top
Show: