public void mouseClicked(@NotNull EditorMouseEvent event) { if (!VimPlugin.isEnabled()) return; if (event.getArea() == EditorMouseEventArea.EDITING_AREA) { VimPlugin.getMotion().processMouseClick(event.getEditor(), event.getMouseEvent()); } else if (event.getArea() != EditorMouseEventArea.ANNOTATIONS_AREA && event.getArea() != EditorMouseEventArea.FOLDING_OUTLINE_AREA) { VimPlugin.getMotion() .processLineSelection(event.getEditor(), event.getMouseEvent().getButton() == MouseEvent.BUTTON3); } }
public void mouseDragged(@NotNull EditorMouseEvent event) { if (!VimPlugin.isEnabled()) return; if (event.getArea() == EditorMouseEventArea.EDITING_AREA || event.getArea() != EditorMouseEventArea.ANNOTATIONS_AREA) { if (dragEditor == null) { if (event.getArea() == EditorMouseEventArea.EDITING_AREA) { mode = CommandState.SubMode.VISUAL_CHARACTER; } else if (event.getArea() != EditorMouseEventArea.ANNOTATIONS_AREA) { mode = CommandState.SubMode.VISUAL_LINE; } startOff = event.getEditor().getSelectionModel().getSelectionStart(); endOff = event.getEditor().getSelectionModel().getSelectionEnd(); } dragEditor = event.getEditor(); } }
public int getEditorCharOffsetAndRemoveTokenHighlighters(EditorMouseEvent e) { if ( e.getArea()!=EditorMouseEventArea.EDITING_AREA ) { return -1; } MouseEvent mouseEvent=e.getMouseEvent(); Editor editor=e.getEditor(); int offset = MyActionUtils.getMouseOffset(mouseEvent, editor); // System.out.println("offset="+offset); if ( offset >= editor.getDocument().getTextLength() ) { return -1; } // Mouse has moved so make sure we don't show any token information tooltips InputPanel.clearTokenInfoHighlighters(e.getEditor()); return offset; }
@Override public void mouseClicked(EditorMouseEvent e) { if (e.getArea() == EditorMouseEventArea.EDITING_AREA) { @Nullable EditorEx editorEx = e.getEditor() instanceof EditorEx ? ((EditorEx) e.getEditor()) : null; if (editorEx != null) {
@Override public void mouseMoved(EditorMouseEvent e) { if (!DumbService.isDumb(myProject) && e.getArea() == EditorMouseEventArea.EDITING_AREA) { @Nullable EditorEx editorEx = e.getEditor() instanceof EditorEx ? ((EditorEx) e.getEditor()) : null; if (editorEx != null) {