boolean (TooltipEvent event) { InputEvent inputEvent = event.getInputEvent(); if (inputEvent instanceof MouseEvent) { Component comp = inputEvent.getComponent(); if (comp instanceof EditorComponentImpl) { EditorImpl editor = ((EditorComponentImpl)comp).getEditor(); return !isInsideCurrentRange(editor, ((MouseEvent)inputEvent).getPoint()); } } return true; }