mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 23:31:05 +07:00
PY-24044 Evaluate expression and conditional breakpoints should allow adding imports for unresolved names
Added new PyCodeFragmentWithHiddenImports that allows adding imports for unresolved names into a hidden file GitOrigin-RevId: fb3fa4e491164bdd376d3b25204202034994afa5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
00f06dad90
commit
9b5b413d45
@@ -298,8 +298,8 @@ public final class PyPsiUtils {
|
||||
public static PsiElement getRealContext(@NotNull final PsiElement element) {
|
||||
assertValid(element);
|
||||
final PsiFile file = element.getContainingFile();
|
||||
if (file instanceof PyExpressionCodeFragment) {
|
||||
final PsiElement context = file.getContext();
|
||||
if (file instanceof PyExpressionCodeFragment fragment) {
|
||||
final PsiElement context = fragment.getRealContext();
|
||||
return context != null ? context : element;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user