private void OnMouseHover(ScintillaNet.ScintillaControl sci, int position) { if (!ASContext.Context.IsFileValid) { return; } lastHoverPosition = position; // get word at mouse position int style = sci.BaseStyleAt(position); if (!ASComplete.IsTextStyle(style)) { return; } position = sci.WordEndPosition(position, true); ASResult result = ASComplete.GetExpressionType(sci, position); // set tooltip if (!result.IsNull()) { string text = ASComplete.GetToolTipText(result); if (text == null) { return; } // show tooltip UITools.Tip.ShowAtMouseLocation(text); } }
private void OnMouseHover(ScintillaNet.ScintillaControl sci, int position) { if (ASContext.Locked || !ASContext.Context.IsFileValid()) { return; } // get word at mouse position int style = sci.BaseStyleAt(position); DebugConsole.Trace("Style=" + style); if (!ASComplete.IsTextStyle(style)) { return; } position = sci.WordEndPosition(position, true); ASResult result = ASComplete.GetExpressionType(sci, position); // set tooltip if (!result.IsNull()) { string text = ASComplete.GetToolTipText(result); DebugConsole.Trace("SHOW " + text); if (text == null) { return; } // show tooltip InfoTip.ShowAtMouseLocation(text); } }
private void OnMouseHover(ScintillaControl sci, int position) { if (!ASContext.Context.IsFileValid) { return; } lastHoverPosition = position; // get word at mouse position int style = sci.BaseStyleAt(position); if (!ASComplete.IsTextStyle(style)) { return; } position = sci.WordEndPosition(position, true); ASResult result = ASComplete.GetExpressionType(sci, position); // set tooltip if (!result.IsNull()) { if (Control.ModifierKeys == Keys.Control) { var code = ASComplete.GetCodeTipCode(result); if (code == null) { return; } UITools.CodeTip.Show(sci, position - result.Path.Length, code); } else { string text = ASComplete.GetToolTipText(result); if (text == null) { return; } // show tooltip UITools.Tip.ShowAtMouseLocation(text); } } }