private void MakeFormat(FormattingRange range, IEnumerable <string> space)
        {
            PsiFormatterHelper.ReplaceSpaces(range.First, range.Last, space);

            // TODO: Move antiglueing logic into CalcSpaces()
            ITokenNode nextToken;
            ITokenNode prevToken = range.First.FindLastTokenIn();

            if (prevToken != null)
            {
                nextToken = prevToken.GetNextToken();
            }
            else
            {
                nextToken = range.First.NextSibling.FindFirstTokenIn();
                if (nextToken != null)
                {
                    prevToken = nextToken.GetPrevToken();
                }
            }

            if (prevToken != null && nextToken != null)
            {
                ITokenNode separator = Context.CodeFormatter.GetMinimalSeparator(prevToken, nextToken);
                if (separator != null)
                {
                    LowLevelModificationUtil.AddChildAfter(range.First, separator);
                }
            }
        }
 private void MakeFormat(FormattingRange range, IEnumerable <string> space)
 {
     PsiFormatterHelper.ReplaceSpaces(range.First, range.Last, space);
 }