Object (@NotNull String dataId) { if (myEditor.isDisposed()) return null; if (PlatformDataKeys.COPY_PROVIDER.is(dataId)) { // enable copying from editor in renderer mode return myEditor.getCopyProvider(); } if (myEditor.isRendererMode()) return null; if (CommonDataKeys.EDITOR.is(dataId)) { return myEditor; } if (CommonDataKeys.CARET.is(dataId)) { return myEditor.getCaretModel().getCurrentCaret(); } if (PlatformDataKeys.DELETE_ELEMENT_PROVIDER.is(dataId)) { return myEditor.getDeleteProvider(); } if (PlatformDataKeys.CUT_PROVIDER.is(dataId)) { return myEditor.getCutProvider(); } if (PlatformDataKeys.PASTE_PROVIDER.is(dataId)) { return myEditor.getPasteProvider(); } if (CommonDataKeys.EDITOR_VIRTUAL_SPACE.is(dataId)) { LogicalPosition location = myEditor.myLastMousePressedLocation; if (location == null) { location = myEditor.getCaretModel().getLogicalPosition(); } return EditorCoreUtil.inVirtualSpace(myEditor, location); } if (PlatformDataKeys.EDITOR_CLICK_OVER_TEXT.is(dataId)) { Point point = myEditor.myLastMousePressedPoint; if (point != null) { return EditorUtil.isPointOverText(myEditor, point); } } return null; }