From 0477c6720148539031f5d5458fbd2de2cb07f0b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Mon, 14 Mar 2022 18:01:21 +0100 Subject: [PATCH] psi_elements.md: update --- topics/basics/architectural_overview/psi_elements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topics/basics/architectural_overview/psi_elements.md b/topics/basics/architectural_overview/psi_elements.md index 9c706b804..9e144413f 100644 --- a/topics/basics/architectural_overview/psi_elements.md +++ b/topics/basics/architectural_overview/psi_elements.md @@ -13,7 +13,7 @@ The [`PsiElement`](upsource:///platform/core-api/src/com/intellij/psi/PsiElement ## How do I get a PSI element? -* From an Action: `e.getData(LangDataKeys.PSI_ELEMENT)`. +* From an Action: `e.getData(CommonDataKeys.PSI_ELEMENT)`. Note: if an editor is currently open and the element under caret is a [reference](psi_references.md), this will return the result of resolving the reference. This may or may not be what you need. * From a file by offset: `PsiFile.findElementAt()`.