Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IVsTextLayer.MapLocalSpansToTextOriginatingLayer Method

Maps a set of local spans to the shallowest layer that originates text.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
int MapLocalSpansToTextOriginatingLayer(
	uint dwFlags,
	IVsEnumTextSpans pLocalSpanEnum,
	out IVsTextLayer ppTargetLayer,
	out IVsEnumTextSpans ppTargetSpanEnum
)

Parameters

dwFlags
Type: System.UInt32

[in] One of the MapLocalSpanFlags values.

pLocalSpanEnum
Type: Microsoft.VisualStudio.TextManager.Interop.IVsEnumTextSpans

[in] The local text spans to be mapped.

ppTargetLayer
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer

[out] The shallowest layer that originates text.

ppTargetSpanEnum
Type: Microsoft.VisualStudio.TextManager.Interop.IVsEnumTextSpans

[out] The mapped layer set of text spans.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From textmgr.idl:

HRESULT IVsTextLayer::MapLocalSpansToTextOriginatingLayer(
   [in] DWORD dwFlags,
   [in] IVsEnumTextSpans *pLocalSpanEnum,
   [out] IVsTextLayer **ppTargetLayer,
   [out] IVsEnumTextSpans **ppTargetSpanEnum
);

MapLocalSpansToTextOriginatingLayer will take a set of local spans and map them down to the shallowest layer that originates text. You are not guaranteed that you will get back the layer that actually originates a given set of text, that is, text which excludes non-text atoms.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.