Extracting method calls from fluent invocation


given a statement like:


When I select the calls UsingSerialization and With, I want to transform it like:


void Method(Wireup w) { w.UsingSerialization().With("xxx"); }

I started with:

      var solution = context.GetData (DataConstants.SOLUTION);

      var textControl = context.GetData (JetBrains.TextControl.DataContext.DataConstants.TEXT_CONTROL);

      var invocations = TextControlToPsi.GetElements<IInvocationExpression> (solution, textControl);

But it seems that this is a complete reference to Wireup......Build();

Would appreciate any help.

Please sign in to leave a comment.