public int GetTextMarkerType(ref Guid pguidMarker, out IVsPackageDefinedTextMarkerType ppMarkerType) { if (pguidMarker == GuidList.GUIDTestMarker) { ppMarkerType = new TestMarkerType(); return(VSConstants.S_OK); } ppMarkerType = null; return(VSConstants.S_FALSE); }
/// <summary> /// Allows you to return a pointer to your <see cref="T:Microsoft.VisualStudio.TextManager.Interop.IVsPackageDefinedTextMarkerType"/> implementation for a custom marker type. /// </summary> /// <returns> /// If the method succeeds, it returns <see cref="F:Microsoft.VisualStudio.VSConstants.S_OK"/>. If it fails, it returns an error code. /// </returns> /// <param name="pguidMarker">[in] Pointer to a GUID identifying the external marker type. </param> /// <param name="ppMarkerType">[out] Pointer to the <see cref="T:Microsoft.VisualStudio.TextManager.Interop.IVsPackageDefinedTextMarkerType"/> implementation for the external marker type.</param> public int GetTextMarkerType(ref Guid pguidMarker, out IVsPackageDefinedTextMarkerType ppMarkerType) { if (pguidMarker == GuidConstants.BaseMarkerProviderGuid) { ppMarkerType = new BaseMarker(); return(VSConstants.S_OK); } ppMarkerType = null; return(VSConstants.E_UNEXPECTED); }
/// <summary> /// Allows you to return a pointer to your <see cref="T:Microsoft.VisualStudio.TextManager.Interop.IVsPackageDefinedTextMarkerType"/> implementation for a custom marker type. /// </summary> /// <returns> /// If the method succeeds, it returns <see cref="F:Microsoft.VisualStudio.VSConstants.S_OK"/>. If it fails, it returns an error code. /// </returns> /// <param name="pguidMarker">[in] Pointer to a GUID identifying the external marker type. </param> /// <param name="ppMarkerType">[out] Pointer to the <see cref="T:Microsoft.VisualStudio.TextManager.Interop.IVsPackageDefinedTextMarkerType"/> implementation for the external marker type.</param> public int GetTextMarkerType(ref Guid pguidMarker, out IVsPackageDefinedTextMarkerType ppMarkerType) { if (pguidMarker == GuidConstants.BaseMarkerProviderGuid) { ppMarkerType = new BaseMarker(); return VSConstants.S_OK; } ppMarkerType = null; return VSConstants.E_UNEXPECTED; }
public int GetTextMarkerType(ref Guid pguidMarker, out IVsPackageDefinedTextMarkerType ppMarkerType) { //When a package registers an external marker type, this interface is //implemented once by the specified service. This method passes you a //GUID that matches the GUID of a marker that you have registered under //"External Markers." You then need to pass back a pointer to your //IVsPackageDefinedTextMarkerType implementation for this marker type. ppMarkerType = this; return(0); }
public int GetTextMarkerType(ref Guid pguidMarker, out IVsPackageDefinedTextMarkerType ppMarkerType) { // This method is called by Visual Studio when it needs the marker // type information in order to retrieve the implementing objects. if (pguidMarker == Guids.GuidCloneBackgroundMarker) { ppMarkerType = _backgroundMarkerType; return(VSConstants.S_OK); } else if (pguidMarker == Guids.GuidCloneMarginMarker) { ppMarkerType = _marginMarkerType; return(VSConstants.S_OK); } ppMarkerType = null; return(VSConstants.E_FAIL); }
public int GetTextMarkerType(ref Guid pguidMarker, out IVsPackageDefinedTextMarkerType ppMarkerType) { // This method is called by Visual Studio when it needs the marker // type information in order to retrieve the implementing objects. if (pguidMarker == GuidList.JiraLinkBackgroundMarker) { ppMarkerType = backgroundMarkerType; return VSConstants.S_OK; } if (pguidMarker == GuidList.JiraLinkMarginMarker) { ppMarkerType = marginMarkerType; return VSConstants.S_OK; } ppMarkerType = null; return VSConstants.E_FAIL; }