private static void LineUpArgumentsOfFinalMethodCall(TextDocument ActiveDoc) { // Line up arguments of final method call. SourceRange FirstPrimRange = SourceRange.Empty; try { SourceRange LineRange = ActiveDoc.GetLineRange(CodeRush.Caret.Line); FirstPrimRange = GetPrimitives(LineRange).OfType<PrimitiveExpression>().First().Range; } catch (Exception ex) { Console.WriteLine(ex); } CodeRush.Caret.MoveTo(FirstPrimRange.Start); var Node = DevExpress.CodeRush.Core.CodeRush.Documents.ActiveTextDocument.GetNodeAt(DevExpress.CodeRush.Core.CodeRush.Caret.SourcePoint); ExecuteRefactoring("Line-up Parameters"); CodeRush.Documents.ActiveTextDocument.ParseIfTextChanged(); }