Exemple #1
0
 protected static void SetCaretPosition(ITextControl textControl, PsiIntentionResult result)
 {
     if (result.PrefferedSelection != DocumentRange.InvalidRange)
     {
         textControl.Selection.SetRange(result.PrefferedSelection.TextRange);
     }
 }
 protected static void SetCaretPosition(ITextControl textControl, PsiIntentionResult result)
 {
   if (result.PrefferedSelection != DocumentRange.InvalidRange)
   {
     textControl.Selection.SetRange(result.PrefferedSelection.TextRange);
   }
 }
 protected virtual void OnHotspotSessionExecutionStartedInternal(PsiIntentionResult result, ITextControl textControl)
 {
   var hotspotSessionUi = HotspotSessionExecutor.CurrentSession;
   if (hotspotSessionUi == null)
     SetCaretPosition(textControl, result);
   else
     hotspotSessionUi.HotspotSession.Closed += (session, type) =>
       {
         if (type != TerminationType.Finished) return;
         SetCaretPosition(textControl, result);
       };
 }
Exemple #4
0
        protected virtual void OnHotspotSessionExecutionStartedInternal(PsiIntentionResult result, ITextControl textControl)
        {
            var hotspotSessionUi = HotspotSessionExecutor.CurrentSession;

            if (hotspotSessionUi == null)
            {
                SetCaretPosition(textControl, result);
            }
            else
            {
                hotspotSessionUi.HotspotSession.Closed.Advise(EternalLifetime.Instance, args => {
                    if (args.TerminationType != TerminationType.Finished)
                    {
                        return;
                    }
                    SetCaretPosition(textControl, result);
                });
            }
        }
        protected virtual void OnHotspotSessionExecutionStartedInternal(PsiIntentionResult result, ITextControl textControl)
        {
            var hotspotSessionUi = HotspotSessionExecutor.CurrentSession;

            if (hotspotSessionUi == null)
            {
                SetCaretPosition(textControl, result);
            }
            else
            {
                hotspotSessionUi.HotspotSession.Closed += (session, type) =>
                {
                    if (type != TerminationType.Finished)
                    {
                        return;
                    }
                    SetCaretPosition(textControl, result);
                }
            };
        }
 public void OnHotspotSessionExecutionStarted(PsiIntentionResult result, ITextControl textControl)
 {
   OnHotspotSessionExecutionStartedInternal(result, textControl);
 }
Exemple #7
0
 public void OnHotspotSessionExecutionStarted(PsiIntentionResult result, ITextControl textControl)
 {
     OnHotspotSessionExecutionStartedInternal(result, textControl);
 }