/// <summary> /// Raises the <see cref="InsightRequest" /> event. /// </summary> /// <param name="e"><see cref="InsightEventArgs" /> object that provides the arguments for the event.</param> protected virtual void OnInsightRequest(InsightEventArgs e) { EventHandler<InsightEventArgs> handler = InsightRequest; if (handler != null) handler(this, e); }
private void InsightRequest(object sender, InsightEventArgs e) { textEditorControl.ShowInsightWindow(new MethodInsightDataProvider()); }
private void TextArea_KeyPress(object sender, KeyPressEventArgs keyEventArgs) { if (_inHandleKeyPress) return; // First, let all subscribers handle the key event. OnTextAreaKeyPress(keyEventArgs); if (keyEventArgs.Handled) return; _inHandleKeyPress = true; try { char ch = keyEventArgs.KeyChar; if (CompletionWindowVisible) { // Forward key event to completion window if (completionWindow.ProcessKeyEvent(ch)) keyEventArgs.Handled = true; } if (EnableMethodInsight && (ch == '(' || ch == ',')) { // Request insight window InsightEventArgs e = new InsightEventArgs(ch); OnInsightRequest(e); } else if (!keyEventArgs.Handled && EnableCompletion) { // Request completion window CompletionEventArgs e = new CompletionEventArgs(ch); OnCompletionRequest(e); } } //catch (Exception exception) //{ // // TODO: Log exception //} finally { _inHandleKeyPress = false; } }
private static void InsightRequest(object sender, InsightEventArgs e) { var textEditorControl = (TextEditorControl)sender; textEditorControl.ShowInsightWindow(_insight); }