ReformatCode() public static method

public static ReformatCode ( IVsTextLines pBuffer, TextSpan span, int tabSize ) : List
pBuffer IVsTextLines
span TextSpan
tabSize int
return List
Example #1
0
        private void DoFormatting(EditArray mgr, TextSpan span)
        {
            // Make sure there is one space after every comma unless followed
            // by a tab or comma is at end of line.
            IVsTextLines pBuffer = GetTextLines();

            if (pBuffer != null)
            {
                List <EditSpan> changeList = AsmHighlighterFormatHelper.ReformatCode(pBuffer, span, LanguageService.GetLanguagePreferences().TabSize);
                if (changeList != null)
                {
                    foreach (EditSpan editSpan in changeList)
                    {
                        // Add edit operation
                        mgr.Add(editSpan);
                    }
                }
            }
        }