本文整理汇总了Java中com.intellij.codeInsight.hint.TooltipController.showTooltipByMouseMove方法的典型用法代码示例。如果您正苦于以下问题:Java TooltipController.showTooltipByMouseMove方法的具体用法?Java TooltipController.showTooltipByMouseMove怎么用?Java TooltipController.showTooltipByMouseMove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.codeInsight.hint.TooltipController
的用法示例。
在下文中一共展示了TooltipController.showTooltipByMouseMove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mouseMoved
import com.intellij.codeInsight.hint.TooltipController; //导入方法依赖的package包/类
@Override
public void mouseMoved(MouseEvent e) {
int line = EditorUtil.yPositionToLogicalLine(editor, e.getPoint());
if (line == lastGutterToolTipLine) {
return;
}
TooltipController controller = TooltipController.getInstance();
if (lastGutterToolTipLine != -1) {
controller.cancelTooltip(TOOLTIP_GROUP, e, true);
}
String toolTip = gutterContentProvider.getToolTip(line, editor);
setCursor(toolTip == null ? Cursor.getDefaultCursor() : Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
if (toolTip == null) {
lastGutterToolTipLine = -1;
controller.cancelTooltip(TOOLTIP_GROUP, e, false);
}
else {
lastGutterToolTipLine = line;
RelativePoint showPoint = new RelativePoint(this, e.getPoint());
controller.showTooltipByMouseMove(editor,
showPoint,
((EditorMarkupModel)editor.getMarkupModel()).getErrorStripTooltipRendererProvider().calcTooltipRenderer(toolTip),
false,
TOOLTIP_GROUP,
new HintHint(this, e.getPoint()).setAwtTooltip(true));
}
}
示例2: showTooltip
import com.intellij.codeInsight.hint.TooltipController; //导入方法依赖的package包/类
private void showTooltip(MouseEvent e, final TooltipRenderer tooltipObject, @NotNull HintHint hintHint) {
TooltipController tooltipController = TooltipController.getInstance();
tooltipController.showTooltipByMouseMove(myEditor, new RelativePoint(e), tooltipObject,
myEditor.getVerticalScrollbarOrientation() == EditorEx.VERTICAL_SCROLLBAR_RIGHT,
ERROR_STRIPE_TOOLTIP_GROUP, hintHint);
}