IVsTextMarkerContextProvider::UpdateContextForMarker Method (UInt32, Object^)

 

Called by the language service to indicate that the context for a text marker should be added to the context bag.

Namespace:   Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

int UpdateContextForMarker(
	unsigned int dwReserved,
	Object^ pUC
)

Parameters

dwReserved
Type: System::UInt32

Unused parameter. Must be set to null.

pUC
Type: System::Object^

Pointer to the context bag on the Visual Studio core editor.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From textmgr.idl:

HRESULT IVsTextMarkerContextProvider::UpdateContextForMarker(
   DWORD dwReserved,
   IVsUserContext *pUC
);

The core text editor calls IVsTextMarkerContextProvider.UpdateContextForMarker at the same time that it updates other context. The TextMarker object should implement this method and add a keyword and/or attributes to the given context bag that is specific to the text marker (probably a squiggly).

If a marker has the MV_CONTEXT_CONTRIBUTION_FOR_BODY style set, its client will be QueryInterfaced for this interface.

Return to top
Show: