protected override Action <ITextControl> ExecutePsiTransaction(ISolution solution, IProgressIndicator progress) { var statement = myNewArgument.GetContainingStatement().NotNull("myNewArgument.GetContainingStatement() != null"); var factory = CSharpElementFactory.GetInstance(myInvocation); var first = myInvocation.Arguments[0]; var second = myInvocation.AddArgumentAfter(factory.CreateArgument(ParameterKind.VALUE, myNewArgument.Copy()), first); var boolLiteral = factory.CreateExpression(myStayInWorldCoords.ToString().ToLower()); myInvocation.AddArgumentAfter(factory.CreateArgument(ParameterKind.VALUE, boolLiteral), second); statement.RemoveOrReplaceByEmptyStatement(); return(null); }
public ICSharpArgument AddArgumentAfter(ICSharpArgument param, ICSharpArgument anchor) { return(_invocationExpression.AddArgumentAfter(param, anchor)); }