/** * Wraps all blocks that have any part between the two given text points * Returns if any blocks found. */ static public bool WrapAllBlocksInSelection( ParameterSet pset, string fileName, EnvDTE.TextPoint selectionStart, EnvDTE.TextPoint selectionEnd) { bool blockFound = false; EnvDTE.EditPoint selStart = selectionStart.CreateEditPoint(); selStart.StartOfLine(); while (selStart.LessThan(selectionEnd)) { CommentBlock block; MatchedBlockData bdata; if (GetBlockContainingPoint(pset, fileName, selStart, out block, out bdata)) { blockFound = true; selStart.LineDown((bdata.mEndLine - bdata.mStartLine) + 1); WrapBlock(pset, block, bdata, selectionStart); } else { selStart.LineDown(1); } } return(blockFound); }