mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DS-5533 Initial command execution for IPython console fixed
GitOrigin-RevId: 5055212dd5e95d9c5d290df77f5ffa549bd305f7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3a88549859
commit
e90c4cf301
@@ -291,19 +291,21 @@ public abstract class PydevConsoleCommunication extends AbstractConsoleCommunica
|
||||
|
||||
// add code fragment to myConsoleView.getHistoryPsiFile()
|
||||
PsiFile psi = getHistoryPsiFile();
|
||||
if (myConsoleView != null && psi != null) {
|
||||
WriteCommandAction.runWriteCommandAction(myProject, null, null,
|
||||
() -> {
|
||||
PsiElement[] newElems =
|
||||
PyElementGenerator.getInstance(myProject)
|
||||
.createDummyFile(LanguageLevel.forElement(myConsoleView.getFile()), command.getText())
|
||||
.getChildren();
|
||||
for (PsiElement elem : newElems) {
|
||||
psi.add(elem);
|
||||
}
|
||||
},
|
||||
psi);
|
||||
}
|
||||
if (myConsoleView != null && psi != null) {
|
||||
ApplicationManager.getApplication().invokeLater(
|
||||
() -> WriteCommandAction.runWriteCommandAction(myProject, null, null,
|
||||
() -> {
|
||||
PsiElement[] newElems =
|
||||
PyElementGenerator.getInstance(myProject)
|
||||
.createDummyFile(LanguageLevel.forElement(myConsoleView.getFile()),
|
||||
command.getText())
|
||||
.getChildren();
|
||||
for (PsiElement elem : newElems) {
|
||||
psi.add(elem);
|
||||
}
|
||||
},
|
||||
psi));
|
||||
}
|
||||
|
||||
boolean more;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user