DelayData ShouldInstallDelayHandler() { ThreadHelper.ThrowIfNotOnUIThread(); IVsWindowFrame frame = ActiveFrame; if (frame != null) { IVsTextViewEx textView = GetTextView(frame) as IVsTextViewEx; if (textView != null) { if (textView.IsCompletorWindowActive() == 0 || textView.IsExpansionUIActive() == 0) { return(new DelayData(textView)); } return(null); } } IntPtr handle; if (IsEditBoxActive(out handle)) { return(new DelayData(handle)); } return(null); }
public DelayData(IVsTextViewEx textView) { if (textView == null) { throw new ArgumentNullException("textView"); } _textView = textView; }
bool IsCompletorActive(IVsTextView view) { if (this.source.IsCompletorActive) { return(true); } IVsTextViewEx viewex = view as IVsTextViewEx; if (viewex != null) { return(viewex.IsCompletorWindowActive() == VSConstants.S_OK); } return(false); }
public static Result <IVsWindowFrame> GetWindowFrame(this IVsTextViewEx textViewEx) { if (!ErrorHandler.Succeeded(textViewEx.GetWindowFrame(out object frame))) { return(Result.Error); } var vsWindowFrame = frame as IVsWindowFrame; if (vsWindowFrame == null) { return(Result.Error); } return(Result.CreateSuccess(vsWindowFrame)); }
public DelayData(IVsTextViewEx textView) { if (textView == null) throw new ArgumentNullException("textView"); _textView = textView; }