DataContext (@NotNull DataContext originalContext, @NotNull Project project, @NotNull Caret caret) { DataContext context = originalContext instanceof UserDataHolder ? originalContext : new DataContextWrapper(originalContext); ((UserDataHolder)context).putUserData(CONTEXT_LANGUAGE, PsiUtilBase.getLanguageInEditor(caret, project)); return context; }