ModCommand (@NotNull ActionContext context, @NotNull NavigatablePsiElement element) { if (element instanceof PsiNameIdentifierOwner owner) { PsiElement identifier = owner.getNameIdentifier(); if (identifier != null) { return ModCommand.select(identifier); } } return ModCommand.select(element); }