protected sealed override Action <ITextControl> ExecutePsiTransaction(ISolution solution, IProgressIndicator progress)
        {
            MergeInvocations(myOuterInvocation.NotNull());

            var hotspotInfo = CreateHostHotspotInfo();

            return(HotspotHelper.ExecuteHotspotSession(solution, new[] { hotspotInfo }));
        }
Esempio n. 2
0
        protected override Action <ITextControl> ExecutePsiTransaction(ISolution solution, IProgressIndicator progress)
        {
            var invocation = myChainedInvocation.NotNull();

            invocation = ((IInvocationExpression)StatementUtil.EnsureStatementExpression(invocation)).NotNull();

            var declarations            = new LocalList <IDeclarationStatement>(myInvocationsCount - 1);
            var variableNameSuggestions = new LocalList <IList <string> >(myInvocationsCount - 1);

            SplitInvocation(invocation, ref declarations, ref variableNameSuggestions);
            InsertDeclarations(invocation, ref declarations);

            var hotspots = CreateHotspots(invocation, ref declarations, ref variableNameSuggestions);

            var invocationLine = DocumentHelper.GetNodeEndLine(invocation, myProvider.Document);

            Action <ITextControl> onFinish = textControl => textControl.MoveCaretToEndOfLine(invocationLine);

            return(HotspotHelper.ExecuteHotspotSession(solution, hotspots, onFinish));
        }